diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml new file mode 100644 index 00000000..5cd53e97 --- /dev/null +++ b/.github/workflows/release-pr.yml @@ -0,0 +1,14 @@ +name: Create release PR + +on: + workflow_dispatch: + inputs: + release: + description: "Define release version (ex: v1, v2, v3)" + required: true + +jobs: + release-pr: + uses: OliverMKing/javascript-release-workflow/.github/workflows/release-pr.yml@main + with: + release: ${{ github.event.inputs.release }} diff --git a/.github/workflows/tag-and-draft.yml b/.github/workflows/tag-and-draft.yml new file mode 100644 index 00000000..1e94b1bf --- /dev/null +++ b/.github/workflows/tag-and-draft.yml @@ -0,0 +1,10 @@ +name: Tag and create release draft + +on: + push: + branches: + - releases/* + +jobs: + tag-and-release: + uses: OliverMKing/javascript-release-workflow/.github/workflows/tag-and-release.yml@main diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 793c14fc..7ad5e387 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -3,7 +3,7 @@ on: # rebuild any PRs and main branch changes pull_request: push: branches: - - master + - main - "releases/*" jobs: diff --git a/.gitignore b/.gitignore index 2c58c0b0..4d5e4aec 100644 --- a/.gitignore +++ b/.gitignore @@ -333,4 +333,5 @@ ASALocalRun/ .secrets event.json +# MacOS .DS_Store \ No newline at end of file diff --git a/README.md b/README.md index ef17800c..de3f0a22 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ jobs: uses: azure/k8s-create-secret@v2 with: namespace: 'myapp' - secret-type: 'docker-registry' + secret-type: 'kubernetes.io/dockerconfigjson' secret-name: 'contoso-cr' string-data: ${{ secrets.SECRET_STRING_DATA}} id: create-secret @@ -37,7 +37,7 @@ jobs: example-job: runs-on: ubuntu-latest steps: - - uses: azure/k8s-create-secret@v1 + - uses: azure/k8s-create-secret@v2 with: namespace: 'default' secret-type: 'generic' diff --git a/lib/exec-child.js b/lib/exec-child.js new file mode 100644 index 00000000..eab86ed3 --- /dev/null +++ b/lib/exec-child.js @@ -0,0 +1,39 @@ +if (require.main !== module) { + throw new Error('This file should not be required'); +} + +var childProcess = require('child_process'); +var fs = require('fs'); + +var paramFilePath = process.argv[2]; + +var serializedParams = fs.readFileSync(paramFilePath, 'utf8'); +var params = JSON.parse(serializedParams); + +var cmd = params.command; +var execOptions = params.execOptions; +var pipe = params.pipe; +var stdoutFile = params.stdoutFile; +var stderrFile = params.stderrFile; + +var c = childProcess.exec(cmd, execOptions, function (err) { + if (!err) { + process.exitCode = 0; + } else if (err.code === undefined) { + process.exitCode = 1; + } else { + process.exitCode = err.code; + } +}); + +var stdoutStream = fs.createWriteStream(stdoutFile); +var stderrStream = fs.createWriteStream(stderrFile); + +c.stdout.pipe(stdoutStream); +c.stderr.pipe(stderrStream); +c.stdout.pipe(process.stdout); +c.stderr.pipe(process.stderr); + +if (pipe) { + c.stdin.end(pipe); +} diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 00000000..ff9b86f5 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,209919 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 45350: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +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 os = __importStar(__nccwpck_require__(22037)); +const utils_1 = __nccwpck_require__(47369); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 26024: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"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 command_1 = __nccwpck_require__(45350); +const file_command_1 = __nccwpck_require__(38466); +const utils_1 = __nccwpck_require__(47369); +const os = __importStar(__nccwpck_require__(22037)); +const path = __importStar(__nccwpck_require__(71017)); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + const delimiter = '_GitHubActionsFileCommandDelimeter_'; + const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; + file_command_1.issueCommand('ENV', commandValue); + } + else { + command_1.issueCommand('set-env', { name }, convertedVal); + } +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. 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. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + command_1.issueCommand('set-output', { name }, value); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + */ +function error(message) { + command_1.issue('error', message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds an warning issue + * @param message warning issue message. Errors will be converted to string via toString() + */ +function warning(message) { + command_1.issue('warning', message instanceof Error ? message.toString() : 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. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 38466: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// For internal use, subject to change. +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 })); +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(__nccwpck_require__(57147)); +const os = __importStar(__nccwpck_require__(22037)); +const utils_1 = __nccwpck_require__(47369); +function issueCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueCommand = issueCommand; +//# sourceMappingURL=file-command.js.map + +/***/ }), + +/***/ 47369: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 71918: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(49109); +tslib_1.__exportStar(__nccwpck_require__(34574), exports); +//# sourceMappingURL=api.js.map + +/***/ }), + +/***/ 48657: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Attach = void 0; +const querystring = __nccwpck_require__(63477); +const terminal_size_queue_1 = __nccwpck_require__(94052); +const web_socket_handler_1 = __nccwpck_require__(11339); +class Attach { + constructor(config, websocketInterface) { + this.handler = websocketInterface || new web_socket_handler_1.WebSocketHandler(config); + } + async attach(namespace, podName, containerName, stdout, stderr, stdin, tty) { + const query = { + container: containerName, + stderr: stderr != null, + stdin: stdin != null, + stdout: stdout != null, + tty, + }; + const queryStr = querystring.stringify(query); + const path = `/api/v1/namespaces/${namespace}/pods/${podName}/attach?${queryStr}`; + const conn = await this.handler.connect(path, null, (streamNum, buff) => { + web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr); + return true; + }); + if (stdin != null) { + web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream); + } + if (terminal_size_queue_1.isResizable(stdout)) { + this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue(); + web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream); + this.terminalSizeQueue.handleResizes(stdout); + } + return conn; + } +} +exports.Attach = Attach; +//# sourceMappingURL=attach.js.map + +/***/ }), + +/***/ 11763: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureAuth = void 0; +const proc = __nccwpck_require__(32081); +const jsonpath = __nccwpck_require__(47523); +class AzureAuth { + isAuthProvider(user) { + if (!user || !user.authProvider) { + return false; + } + return user.authProvider.name === 'azure'; + } + async applyAuthentication(user, opts) { + const token = this.getToken(user); + if (token) { + opts.headers.Authorization = `Bearer ${token}`; + } + } + getToken(user) { + const config = user.authProvider.config; + if (this.isExpired(config)) { + this.updateAccessToken(config); + } + return config['access-token']; + } + isExpired(config) { + const token = config['access-token']; + const expiry = config.expiry; + if (!token) { + return true; + } + if (!expiry) { + return false; + } + const expiration = Date.parse(expiry); + if (expiration < Date.now()) { + return true; + } + return false; + } + updateAccessToken(config) { + let cmd = config['cmd-path']; + if (!cmd) { + throw new Error('Token is expired!'); + } + // Wrap cmd in quotes to make it cope with spaces in path + cmd = `"${cmd}"`; + const args = config['cmd-args']; + if (args) { + cmd = cmd + ' ' + args; + } + // TODO: Cache to file? + // TODO: do this asynchronously + let output; + try { + output = proc.execSync(cmd); + } + catch (err) { + throw new Error('Failed to refresh token: ' + err.message); + } + const resultObj = JSON.parse(output); + const tokenPathKeyInConfig = config['token-key']; + const expiryPathKeyInConfig = config['expiry-key']; + // Format in file is {}, so slice it out and add '$' + const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1); + const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1); + config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj); + config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj); + } +} +exports.AzureAuth = AzureAuth; +//# sourceMappingURL=azure_auth.js.map + +/***/ }), + +/***/ 13523: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deleteObject = exports.addOrUpdateObject = exports.deleteItems = exports.ListWatch = void 0; +const api_1 = __nccwpck_require__(71918); +const informer_1 = __nccwpck_require__(93864); +class ListWatch { + constructor(path, watch, listFn, autoStart = true, labelSelector) { + this.path = path; + this.watch = watch; + this.listFn = listFn; + this.labelSelector = labelSelector; + this.objects = []; + this.indexCache = {}; + this.callbackCache = {}; + this.stopped = false; + this.callbackCache[informer_1.ADD] = []; + this.callbackCache[informer_1.UPDATE] = []; + this.callbackCache[informer_1.DELETE] = []; + this.callbackCache[informer_1.ERROR] = []; + this.callbackCache[informer_1.CONNECT] = []; + this.resourceVersion = ''; + if (autoStart) { + this.doneHandler(null); + } + } + async start() { + this.stopped = false; + await this.doneHandler(null); + } + async stop() { + this.stopped = true; + this._stop(); + } + on(verb, cb) { + if (verb === informer_1.CHANGE) { + this.on('add', cb); + this.on('update', cb); + this.on('delete', cb); + return; + } + if (this.callbackCache[verb] === undefined) { + throw new Error(`Unknown verb: ${verb}`); + } + this.callbackCache[verb].push(cb); + } + off(verb, cb) { + if (verb === informer_1.CHANGE) { + this.off('add', cb); + this.off('update', cb); + this.off('delete', cb); + return; + } + if (this.callbackCache[verb] === undefined) { + throw new Error(`Unknown verb: ${verb}`); + } + const indexToRemove = this.callbackCache[verb].findIndex((cachedCb) => cachedCb === cb); + if (indexToRemove === -1) { + return; + } + this.callbackCache[verb].splice(indexToRemove, 1); + } + get(name, namespace) { + return this.objects.find((obj) => { + return obj.metadata.name === name && (!namespace || obj.metadata.namespace === namespace); + }); + } + list(namespace) { + if (!namespace) { + return this.objects; + } + return this.indexCache[namespace]; + } + latestResourceVersion() { + return this.resourceVersion; + } + _stop() { + if (this.request) { + this.request.abort(); + this.request = undefined; + } + } + async doneHandler(err) { + this._stop(); + if (err) { + this.callbackCache[informer_1.ERROR].forEach((elt) => elt(err)); + return; + } + if (this.stopped) { + // do not auto-restart + return; + } + this.callbackCache[informer_1.CONNECT].forEach((elt) => elt(undefined)); + // TODO: Don't always list here for efficiency + // try to restart the watch from resourceVersion, but detect 410 GONE and relist in that case. + // Or if resourceVersion is empty. + const promise = this.listFn(); + const result = await promise; + const list = result.body; + this.objects = deleteItems(this.objects, list.items, this.callbackCache[informer_1.DELETE].slice()); + Object.keys(this.indexCache).forEach((key) => { + const updateObjects = deleteItems(this.indexCache[key], list.items); + if (updateObjects.length !== 0) { + this.indexCache[key] = updateObjects; + } + else { + delete this.indexCache[key]; + } + }); + this.addOrUpdateItems(list.items); + const queryParams = { + resourceVersion: list.metadata.resourceVersion, + }; + if (this.labelSelector !== undefined) { + queryParams.labelSelector = api_1.ObjectSerializer.serialize(this.labelSelector, 'string'); + } + this.request = await this.watch.watch(this.path, queryParams, this.watchHandler.bind(this), this.doneHandler.bind(this)); + } + addOrUpdateItems(items) { + items.forEach((obj) => { + addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice()); + if (obj.metadata.namespace) { + this.indexObj(obj); + } + }); + } + indexObj(obj) { + let namespaceList = this.indexCache[obj.metadata.namespace]; + if (!namespaceList) { + namespaceList = []; + this.indexCache[obj.metadata.namespace] = namespaceList; + } + addOrUpdateObject(namespaceList, obj); + } + watchHandler(phase, obj, watchObj) { + switch (phase) { + case 'ADDED': + case 'MODIFIED': + addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice()); + if (obj.metadata.namespace) { + this.indexObj(obj); + } + break; + case 'DELETED': + deleteObject(this.objects, obj, this.callbackCache[informer_1.DELETE].slice()); + if (obj.metadata.namespace) { + const namespaceList = this.indexCache[obj.metadata.namespace]; + if (namespaceList) { + deleteObject(namespaceList, obj); + } + } + break; + case 'BOOKMARK': + // nothing to do, here for documentation, mostly. + break; + } + if (watchObj && watchObj.metadata) { + this.resourceVersion = watchObj.metadata.resourceVersion; + } + } +} +exports.ListWatch = ListWatch; +// external for testing +function deleteItems(oldObjects, newObjects, deleteCallback) { + return oldObjects.filter((obj) => { + if (findKubernetesObject(newObjects, obj) === -1) { + if (deleteCallback) { + deleteCallback.forEach((fn) => fn(obj)); + } + return false; + } + return true; + }); +} +exports.deleteItems = deleteItems; +// Only public for testing. +function addOrUpdateObject(objects, obj, addCallback, updateCallback) { + const ix = findKubernetesObject(objects, obj); + if (ix === -1) { + objects.push(obj); + if (addCallback) { + addCallback.forEach((elt) => elt(obj)); + } + } + else { + if (!isSameVersion(objects[ix], obj)) { + objects[ix] = obj; + if (updateCallback) { + updateCallback.forEach((elt) => elt(obj)); + } + } + } +} +exports.addOrUpdateObject = addOrUpdateObject; +function isSameObject(o1, o2) { + return o1.metadata.name === o2.metadata.name && o1.metadata.namespace === o2.metadata.namespace; +} +function isSameVersion(o1, o2) { + return (o1.metadata.resourceVersion !== undefined && + o1.metadata.resourceVersion !== null && + o1.metadata.resourceVersion === o2.metadata.resourceVersion); +} +function findKubernetesObject(objects, obj) { + return objects.findIndex((elt) => { + return isSameObject(elt, obj); + }); +} +// Public for testing. +function deleteObject(objects, obj, deleteCallback) { + const ix = findKubernetesObject(objects, obj); + if (ix !== -1) { + objects.splice(ix, 1); + if (deleteCallback) { + deleteCallback.forEach((elt) => elt(obj)); + } + } +} +exports.deleteObject = deleteObject; +//# sourceMappingURL=cache.js.map + +/***/ }), + +/***/ 50276: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.findObject = exports.findHomeDir = exports.bufferFromFileOrString = exports.makeAbsolutePath = exports.Config = exports.KubeConfig = void 0; +const execa = __nccwpck_require__(83443); +const fs = __nccwpck_require__(57147); +const yaml = __nccwpck_require__(41783); +const net = __nccwpck_require__(41808); +const path = __nccwpck_require__(71017); +const shelljs = __nccwpck_require__(18675); +const api = __nccwpck_require__(71918); +const azure_auth_1 = __nccwpck_require__(11763); +const config_types_1 = __nccwpck_require__(12085); +const exec_auth_1 = __nccwpck_require__(26730); +const file_auth_1 = __nccwpck_require__(84812); +const gcp_auth_1 = __nccwpck_require__(99566); +const oidc_auth_1 = __nccwpck_require__(67117); +// fs.existsSync was removed in node 10 +function fileExists(filepath) { + try { + fs.accessSync(filepath); + return true; + } + catch (ignore) { + return false; + } +} +class KubeConfig { + constructor() { + this.contexts = []; + this.clusters = []; + this.users = []; + } + getContexts() { + return this.contexts; + } + getClusters() { + return this.clusters; + } + getUsers() { + return this.users; + } + getCurrentContext() { + return this.currentContext; + } + setCurrentContext(context) { + this.currentContext = context; + } + getContextObject(name) { + if (!this.contexts) { + return null; + } + return findObject(this.contexts, name, 'context'); + } + getCurrentCluster() { + const context = this.getCurrentContextObject(); + if (!context) { + return null; + } + return this.getCluster(context.cluster); + } + getCluster(name) { + return findObject(this.clusters, name, 'cluster'); + } + getCurrentUser() { + const ctx = this.getCurrentContextObject(); + if (!ctx) { + return null; + } + return this.getUser(ctx.user); + } + getUser(name) { + return findObject(this.users, name, 'user'); + } + loadFromFile(file, opts) { + const rootDirectory = path.dirname(file); + this.loadFromString(fs.readFileSync(file, 'utf8'), opts); + this.makePathsAbsolute(rootDirectory); + } + async applytoHTTPSOptions(opts) { + const user = this.getCurrentUser(); + await this.applyOptions(opts); + if (user && user.username) { + opts.auth = `${user.username}:${user.password}`; + } + } + async applyToRequest(opts) { + const cluster = this.getCurrentCluster(); + const user = this.getCurrentUser(); + await this.applyOptions(opts); + if (cluster && cluster.skipTLSVerify) { + opts.strictSSL = false; + } + if (user && user.username) { + opts.auth = { + password: user.password, + username: user.username, + }; + } + } + loadFromString(config, opts) { + const obj = yaml.load(config); + this.clusters = config_types_1.newClusters(obj.clusters, opts); + this.contexts = config_types_1.newContexts(obj.contexts, opts); + this.users = config_types_1.newUsers(obj.users, opts); + this.currentContext = obj['current-context']; + } + loadFromOptions(options) { + this.clusters = options.clusters; + this.contexts = options.contexts; + this.users = options.users; + this.currentContext = options.currentContext; + } + loadFromClusterAndUser(cluster, user) { + this.clusters = [cluster]; + this.users = [user]; + this.currentContext = 'loaded-context'; + this.contexts = [ + { + cluster: cluster.name, + user: user.name, + name: this.currentContext, + }, + ]; + } + loadFromCluster(pathPrefix = '') { + const host = process.env.KUBERNETES_SERVICE_HOST; + const port = process.env.KUBERNETES_SERVICE_PORT; + const clusterName = 'inCluster'; + const userName = 'inClusterUser'; + const contextName = 'inClusterContext'; + let scheme = 'https'; + if (port === '80' || port === '8080' || port === '8001') { + scheme = 'http'; + } + // Wrap raw IPv6 addresses in brackets. + let serverHost = host; + if (host && net.isIPv6(host)) { + serverHost = `[${host}]`; + } + this.clusters = [ + { + name: clusterName, + caFile: `${pathPrefix}${Config.SERVICEACCOUNT_CA_PATH}`, + server: `${scheme}://${serverHost}:${port}`, + skipTLSVerify: false, + }, + ]; + this.users = [ + { + name: userName, + authProvider: { + name: 'tokenFile', + config: { + tokenFile: `${pathPrefix}${Config.SERVICEACCOUNT_TOKEN_PATH}`, + }, + }, + }, + ]; + const namespaceFile = `${pathPrefix}${Config.SERVICEACCOUNT_NAMESPACE_PATH}`; + let namespace; + if (fileExists(namespaceFile)) { + namespace = fs.readFileSync(namespaceFile, 'utf8'); + } + this.contexts = [ + { + cluster: clusterName, + name: contextName, + user: userName, + namespace, + }, + ]; + this.currentContext = contextName; + } + mergeConfig(config, preserveContext = false) { + if (!preserveContext) { + this.currentContext = config.currentContext; + } + config.clusters.forEach((cluster) => { + this.addCluster(cluster); + }); + config.users.forEach((user) => { + this.addUser(user); + }); + config.contexts.forEach((ctx) => { + this.addContext(ctx); + }); + } + addCluster(cluster) { + if (!this.clusters) { + this.clusters = []; + } + this.clusters.forEach((c, ix) => { + if (c.name === cluster.name) { + throw new Error(`Duplicate cluster: ${c.name}`); + } + }); + this.clusters.push(cluster); + } + addUser(user) { + if (!this.users) { + this.users = []; + } + this.users.forEach((c, ix) => { + if (c.name === user.name) { + throw new Error(`Duplicate user: ${c.name}`); + } + }); + this.users.push(user); + } + addContext(ctx) { + if (!this.contexts) { + this.contexts = []; + } + this.contexts.forEach((c, ix) => { + if (c.name === ctx.name) { + throw new Error(`Duplicate context: ${c.name}`); + } + }); + this.contexts.push(ctx); + } + loadFromDefault(opts, contextFromStartingConfig = false) { + if (process.env.KUBECONFIG && process.env.KUBECONFIG.length > 0) { + const files = process.env.KUBECONFIG.split(path.delimiter).filter((filename) => filename); + this.loadFromFile(files[0], opts); + for (let i = 1; i < files.length; i++) { + const kc = new KubeConfig(); + kc.loadFromFile(files[i], opts); + this.mergeConfig(kc, contextFromStartingConfig); + } + return; + } + const home = findHomeDir(); + if (home) { + const config = path.join(home, '.kube', 'config'); + if (fileExists(config)) { + this.loadFromFile(config, opts); + return; + } + } + if (process.platform === 'win32' && shelljs.which('wsl.exe')) { + try { + const envKubeconfigPathResult = execa.sync('wsl.exe', ['bash', '-ic', 'printenv KUBECONFIG']); + if (envKubeconfigPathResult.exitCode === 0 && envKubeconfigPathResult.stdout.length > 0) { + const result = execa.sync('wsl.exe', ['cat', envKubeconfigPathResult.stdout]); + if (result.exitCode === 0) { + this.loadFromString(result.stdout, opts); + return; + } + if (result.exitCode === 0) { + this.loadFromString(result.stdout, opts); + return; + } + } + } + catch (err) { + // Falling back to default kubeconfig + } + try { + const result = execa.sync('wsl.exe', ['cat', '~/.kube/config']); + if (result.exitCode === 0) { + this.loadFromString(result.stdout, opts); + return; + } + } + catch (err) { + // Falling back to alternative auth + } + } + if (fileExists(Config.SERVICEACCOUNT_TOKEN_PATH)) { + this.loadFromCluster(); + return; + } + this.loadFromClusterAndUser({ name: 'cluster', server: 'http://localhost:8080' }, { name: 'user' }); + } + makeApiClient(apiClientType) { + const cluster = this.getCurrentCluster(); + if (!cluster) { + throw new Error('No active cluster!'); + } + const apiClient = new apiClientType(cluster.server); + apiClient.setDefaultAuthentication(this); + return apiClient; + } + makePathsAbsolute(rootDirectory) { + this.clusters.forEach((cluster) => { + if (cluster.caFile) { + cluster.caFile = makeAbsolutePath(rootDirectory, cluster.caFile); + } + }); + this.users.forEach((user) => { + if (user.certFile) { + user.certFile = makeAbsolutePath(rootDirectory, user.certFile); + } + if (user.keyFile) { + user.keyFile = makeAbsolutePath(rootDirectory, user.keyFile); + } + }); + } + exportConfig() { + const configObj = { + apiVersion: 'v1', + kind: 'Config', + clusters: this.clusters.map(config_types_1.exportCluster), + users: this.users.map(config_types_1.exportUser), + contexts: this.contexts.map(config_types_1.exportContext), + preferences: {}, + 'current-context': this.getCurrentContext(), + }; + return JSON.stringify(configObj); + } + getCurrentContextObject() { + return this.getContextObject(this.currentContext); + } + applyHTTPSOptions(opts) { + const cluster = this.getCurrentCluster(); + const user = this.getCurrentUser(); + if (!user) { + return; + } + if (cluster != null && cluster.skipTLSVerify) { + opts.rejectUnauthorized = false; + } + const ca = cluster != null ? bufferFromFileOrString(cluster.caFile, cluster.caData) : null; + if (ca) { + opts.ca = ca; + } + const cert = bufferFromFileOrString(user.certFile, user.certData); + if (cert) { + opts.cert = cert; + } + const key = bufferFromFileOrString(user.keyFile, user.keyData); + if (key) { + opts.key = key; + } + } + async applyAuthorizationHeader(opts) { + const user = this.getCurrentUser(); + if (!user) { + return; + } + const authenticator = KubeConfig.authenticators.find((elt) => { + return elt.isAuthProvider(user); + }); + if (!opts.headers) { + opts.headers = {}; + } + if (authenticator) { + await authenticator.applyAuthentication(user, opts); + } + if (user.token) { + opts.headers.Authorization = `Bearer ${user.token}`; + } + } + async applyOptions(opts) { + this.applyHTTPSOptions(opts); + await this.applyAuthorizationHeader(opts); + } +} +exports.KubeConfig = KubeConfig; +KubeConfig.authenticators = [ + new azure_auth_1.AzureAuth(), + new gcp_auth_1.GoogleCloudPlatformAuth(), + new exec_auth_1.ExecAuth(), + new file_auth_1.FileAuth(), + new oidc_auth_1.OpenIDConnectAuth(), +]; +// This class is deprecated and will eventually be removed. +class Config { + static fromFile(filename) { + return Config.apiFromFile(filename, api.CoreV1Api); + } + static fromCluster() { + return Config.apiFromCluster(api.CoreV1Api); + } + static defaultClient() { + return Config.apiFromDefaultClient(api.CoreV1Api); + } + static apiFromFile(filename, apiClientType) { + const kc = new KubeConfig(); + kc.loadFromFile(filename); + return kc.makeApiClient(apiClientType); + } + static apiFromCluster(apiClientType) { + const kc = new KubeConfig(); + kc.loadFromCluster(); + const cluster = kc.getCurrentCluster(); + if (!cluster) { + throw new Error('No active cluster!'); + } + const k8sApi = new apiClientType(cluster.server); + k8sApi.setDefaultAuthentication(kc); + return k8sApi; + } + static apiFromDefaultClient(apiClientType) { + const kc = new KubeConfig(); + kc.loadFromDefault(); + return kc.makeApiClient(apiClientType); + } +} +exports.Config = Config; +Config.SERVICEACCOUNT_ROOT = '/var/run/secrets/kubernetes.io/serviceaccount'; +Config.SERVICEACCOUNT_CA_PATH = Config.SERVICEACCOUNT_ROOT + '/ca.crt'; +Config.SERVICEACCOUNT_TOKEN_PATH = Config.SERVICEACCOUNT_ROOT + '/token'; +Config.SERVICEACCOUNT_NAMESPACE_PATH = Config.SERVICEACCOUNT_ROOT + '/namespace'; +function makeAbsolutePath(root, file) { + if (!root || path.isAbsolute(file)) { + return file; + } + return path.join(root, file); +} +exports.makeAbsolutePath = makeAbsolutePath; +// This is public really only for testing. +function bufferFromFileOrString(file, data) { + if (file) { + return fs.readFileSync(file); + } + if (data) { + return Buffer.from(data, 'base64'); + } + return null; +} +exports.bufferFromFileOrString = bufferFromFileOrString; +// Only public for testing. +function findHomeDir() { + if (process.env.HOME) { + try { + fs.accessSync(process.env.HOME); + return process.env.HOME; + // tslint:disable-next-line:no-empty + } + catch (ignore) { } + } + if (process.platform !== 'win32') { + return null; + } + if (process.env.HOMEDRIVE && process.env.HOMEPATH) { + const dir = path.join(process.env.HOMEDRIVE, process.env.HOMEPATH); + try { + fs.accessSync(dir); + return dir; + // tslint:disable-next-line:no-empty + } + catch (ignore) { } + } + if (process.env.USERPROFILE) { + try { + fs.accessSync(process.env.USERPROFILE); + return process.env.USERPROFILE; + // tslint:disable-next-line:no-empty + } + catch (ignore) { } + } + return null; +} +exports.findHomeDir = findHomeDir; +// Only really public for testing... +function findObject(list, name, key) { + if (!list) { + return null; + } + for (const obj of list) { + if (obj.name === name) { + if (obj[key]) { + obj[key].name = name; + return obj[key]; + } + return obj; + } + } + return null; +} +exports.findObject = findObject; +//# sourceMappingURL=config.js.map + +/***/ }), + +/***/ 12085: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.exportContext = exports.newContexts = exports.exportUser = exports.newUsers = exports.exportCluster = exports.newClusters = exports.ActionOnInvalid = void 0; +const fs = __nccwpck_require__(57147); +const _ = __nccwpck_require__(57005); +var ActionOnInvalid; +(function (ActionOnInvalid) { + ActionOnInvalid["THROW"] = "throw"; + ActionOnInvalid["FILTER"] = "filter"; +})(ActionOnInvalid = exports.ActionOnInvalid || (exports.ActionOnInvalid = {})); +function defaultNewConfigOptions() { + return { + onInvalidEntry: ActionOnInvalid.THROW, + }; +} +function newClusters(a, opts) { + const options = Object.assign(defaultNewConfigOptions(), opts || {}); + return _.compact(_.map(a, clusterIterator(options.onInvalidEntry))); +} +exports.newClusters = newClusters; +function exportCluster(cluster) { + return { + name: cluster.name, + cluster: { + server: cluster.server, + 'certificate-authority-data': cluster.caData, + 'certificate-authority': cluster.caFile, + 'insecure-skip-tls-verify': cluster.skipTLSVerify, + }, + }; +} +exports.exportCluster = exportCluster; +function clusterIterator(onInvalidEntry) { + return (elt, i, list) => { + try { + if (!elt.name) { + throw new Error(`clusters[${i}].name is missing`); + } + if (!elt.cluster) { + throw new Error(`clusters[${i}].cluster is missing`); + } + if (!elt.cluster.server) { + throw new Error(`clusters[${i}].cluster.server is missing`); + } + return { + caData: elt.cluster['certificate-authority-data'], + caFile: elt.cluster['certificate-authority'], + name: elt.name, + server: elt.cluster.server, + skipTLSVerify: elt.cluster['insecure-skip-tls-verify'] === true, + }; + } + catch (err) { + switch (onInvalidEntry) { + case ActionOnInvalid.FILTER: + return null; + default: + case ActionOnInvalid.THROW: + throw err; + } + } + }; +} +function newUsers(a, opts) { + const options = Object.assign(defaultNewConfigOptions(), opts || {}); + return _.compact(_.map(a, userIterator(options.onInvalidEntry))); +} +exports.newUsers = newUsers; +function exportUser(user) { + return { + name: user.name, + user: { + 'auth-provider': user.authProvider, + 'client-certificate-data': user.certData, + 'client-certificate': user.certFile, + exec: user.exec, + 'client-key-data': user.keyData, + 'client-key': user.keyFile, + token: user.token, + password: user.password, + username: user.username, + }, + }; +} +exports.exportUser = exportUser; +function userIterator(onInvalidEntry) { + return (elt, i, list) => { + try { + if (!elt.name) { + throw new Error(`users[${i}].name is missing`); + } + return { + authProvider: elt.user ? elt.user['auth-provider'] : null, + certData: elt.user ? elt.user['client-certificate-data'] : null, + certFile: elt.user ? elt.user['client-certificate'] : null, + exec: elt.user ? elt.user.exec : null, + keyData: elt.user ? elt.user['client-key-data'] : null, + keyFile: elt.user ? elt.user['client-key'] : null, + name: elt.name, + token: findToken(elt.user), + password: elt.user ? elt.user.password : null, + username: elt.user ? elt.user.username : null, + }; + } + catch (err) { + switch (onInvalidEntry) { + case ActionOnInvalid.FILTER: + return null; + default: + case ActionOnInvalid.THROW: + throw err; + } + } + }; +} +function findToken(user) { + if (user) { + if (user.token) { + return user.token; + } + if (user['token-file']) { + return fs.readFileSync(user['token-file']).toString(); + } + } +} +function newContexts(a, opts) { + const options = Object.assign(defaultNewConfigOptions(), opts || {}); + return _.compact(_.map(a, contextIterator(options.onInvalidEntry))); +} +exports.newContexts = newContexts; +function exportContext(ctx) { + return { + name: ctx.name, + context: ctx, + }; +} +exports.exportContext = exportContext; +function contextIterator(onInvalidEntry) { + return (elt, i, list) => { + try { + if (!elt.name) { + throw new Error(`contexts[${i}].name is missing`); + } + if (!elt.context) { + throw new Error(`contexts[${i}].context is missing`); + } + if (!elt.context.cluster) { + throw new Error(`contexts[${i}].context.cluster is missing`); + } + return { + cluster: elt.context.cluster, + name: elt.name, + user: elt.context.user || undefined, + namespace: elt.context.namespace || undefined, + }; + } + catch (err) { + switch (onInvalidEntry) { + case ActionOnInvalid.FILTER: + return null; + default: + case ActionOnInvalid.THROW: + throw err; + } + } + }; +} +//# sourceMappingURL=config_types.js.map + +/***/ }), + +/***/ 78627: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Cp = void 0; +const fs = __nccwpck_require__(57147); +const stream_buffers_1 = __nccwpck_require__(88040); +const tar = __nccwpck_require__(11506); +const tmp = __nccwpck_require__(3286); +const exec_1 = __nccwpck_require__(73065); +class Cp { + constructor(config, execInstance) { + this.execInstance = execInstance || new exec_1.Exec(config); + } + /** + * @param {string} namespace - The namespace of the pod to exec the command inside. + * @param {string} podName - The name of the pod to exec the command inside. + * @param {string} containerName - The name of the container in the pod to exec the command inside. + * @param {string} srcPath - The source path in the pod + * @param {string} tgtPath - The target path in local + */ + async cpFromPod(namespace, podName, containerName, srcPath, tgtPath) { + const tmpFile = tmp.fileSync(); + const tmpFileName = tmpFile.name; + const command = ['tar', 'zcf', '-', srcPath]; + const writerStream = fs.createWriteStream(tmpFileName); + const errStream = new stream_buffers_1.WritableStreamBuffer(); + this.execInstance.exec(namespace, podName, containerName, command, writerStream, errStream, null, false, async () => { + if (errStream.size()) { + throw new Error(`Error from cpFromPod - details: \n ${errStream.getContentsAsString()}`); + } + await tar.x({ + file: tmpFileName, + cwd: tgtPath, + }); + }); + } + /** + * @param {string} namespace - The namespace of the pod to exec the command inside. + * @param {string} podName - The name of the pod to exec the command inside. + * @param {string} containerName - The name of the container in the pod to exec the command inside. + * @param {string} srcPath - The source path in local + * @param {string} tgtPath - The target path in the pod + */ + async cpToPod(namespace, podName, containerName, srcPath, tgtPath) { + const tmpFile = tmp.fileSync(); + const tmpFileName = tmpFile.name; + const command = ['tar', 'xf', '-', '-C', tgtPath]; + await tar.c({ + file: tmpFile.name, + }, [srcPath]); + const readStream = fs.createReadStream(tmpFileName); + const errStream = new stream_buffers_1.WritableStreamBuffer(); + this.execInstance.exec(namespace, podName, containerName, command, null, errStream, readStream, false, async () => { + if (errStream.size()) { + throw new Error(`Error from cpToPod - details: \n ${errStream.getContentsAsString()}`); + } + }); + } +} +exports.Cp = Cp; +//# sourceMappingURL=cp.js.map + +/***/ }), + +/***/ 73065: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Exec = void 0; +const querystring = __nccwpck_require__(63477); +const terminal_size_queue_1 = __nccwpck_require__(94052); +const web_socket_handler_1 = __nccwpck_require__(11339); +class Exec { + constructor(config, wsInterface) { + this.handler = wsInterface || new web_socket_handler_1.WebSocketHandler(config); + } + /** + * @param {string} namespace - The namespace of the pod to exec the command inside. + * @param {string} podName - The name of the pod to exec the command inside. + * @param {string} containerName - The name of the container in the pod to exec the command inside. + * @param {(string|string[])} command - The command or command and arguments to execute. + * @param {stream.Writable} stdout - The stream to write stdout data from the command. + * @param {stream.Writable} stderr - The stream to write stderr data from the command. + * @param {stream.Readable} stdin - The strream to write stdin data into the command. + * @param {boolean} tty - Should the command execute in a TTY enabled session. + * @param {(V1Status) => void} statusCallback - + * A callback to received the status (e.g. exit code) from the command, optional. + * @return {string} This is the result + */ + async exec(namespace, podName, containerName, command, stdout, stderr, stdin, tty, statusCallback) { + const query = { + stdout: stdout != null, + stderr: stderr != null, + stdin: stdin != null, + tty, + command, + container: containerName, + }; + const queryStr = querystring.stringify(query); + const path = `/api/v1/namespaces/${namespace}/pods/${podName}/exec?${queryStr}`; + const conn = await this.handler.connect(path, null, (streamNum, buff) => { + const status = web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr); + if (status != null) { + if (statusCallback) { + statusCallback(status); + } + return false; + } + return true; + }); + if (stdin != null) { + web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream); + } + if (terminal_size_queue_1.isResizable(stdout)) { + this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue(); + web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream); + this.terminalSizeQueue.handleResizes(stdout); + } + return conn; + } +} +exports.Exec = Exec; +//# sourceMappingURL=exec.js.map + +/***/ }), + +/***/ 26730: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExecAuth = void 0; +const execa = __nccwpck_require__(83443); +class ExecAuth { + constructor() { + this.tokenCache = {}; + this.execFn = execa.sync; + } + isAuthProvider(user) { + if (!user) { + return false; + } + if (user.exec) { + return true; + } + if (!user.authProvider) { + return false; + } + return (user.authProvider.name === 'exec' || !!(user.authProvider.config && user.authProvider.config.exec)); + } + async applyAuthentication(user, opts) { + const credential = this.getCredential(user); + if (!credential) { + return; + } + if (credential.status.clientCertificateData) { + opts.cert = credential.status.clientCertificateData; + } + if (credential.status.clientKeyData) { + opts.key = credential.status.clientKeyData; + } + const token = this.getToken(credential); + if (token) { + if (!opts.headers) { + opts.headers = []; + } + opts.headers.Authorization = `Bearer ${token}`; + } + } + getToken(credential) { + if (!credential) { + return null; + } + if (credential.status.token) { + return credential.status.token; + } + return null; + } + getCredential(user) { + // TODO: Add a unit test for token caching. + const cachedToken = this.tokenCache[user.name]; + if (cachedToken) { + const date = Date.parse(cachedToken.status.expirationTimestamp); + if (date > Date.now()) { + return cachedToken; + } + this.tokenCache[user.name] = null; + } + let exec = null; + if (user.authProvider && user.authProvider.config) { + exec = user.authProvider.config.exec; + } + if (user.exec) { + exec = user.exec; + } + if (!exec) { + return null; + } + if (!exec.command) { + throw new Error('No command was specified for exec authProvider!'); + } + let opts = {}; + if (exec.env) { + const env = process.env; + exec.env.forEach((elt) => (env[elt.name] = elt.value)); + opts = { ...opts, env }; + } + const result = this.execFn(exec.command, exec.args, opts); + if (result.exitCode === 0) { + const obj = JSON.parse(result.stdout); + this.tokenCache[user.name] = obj; + return obj; + } + throw new Error(result.stderr); + } +} +exports.ExecAuth = ExecAuth; +//# sourceMappingURL=exec_auth.js.map + +/***/ }), + +/***/ 84812: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FileAuth = void 0; +const fs = __nccwpck_require__(57147); +class FileAuth { + constructor() { + this.token = null; + this.lastRead = null; + } + isAuthProvider(user) { + return user.authProvider && user.authProvider.config && user.authProvider.config.tokenFile; + } + async applyAuthentication(user, opts) { + if (this.token == null) { + this.refreshToken(user.authProvider.config.tokenFile); + } + if (this.isTokenExpired()) { + this.refreshToken(user.authProvider.config.tokenFile); + } + if (this.token) { + opts.headers.Authorization = `Bearer ${this.token}`; + } + } + refreshToken(filePath) { + // TODO make this async? + this.token = fs.readFileSync(filePath).toString('UTF-8'); + this.lastRead = new Date(); + } + isTokenExpired() { + if (this.lastRead === null) { + return true; + } + const now = new Date(); + const delta = (now.getTime() - this.lastRead.getTime()) / 1000; + // For now just refresh every 60 seconds. This is imperfect since the token + // could be out of date for this time, but it is unlikely and it's also what + // the client-go library does. + // TODO: Use file notifications instead? + return delta > 60; + } +} +exports.FileAuth = FileAuth; +//# sourceMappingURL=file_auth.js.map + +/***/ }), + +/***/ 99566: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GoogleCloudPlatformAuth = void 0; +const proc = __nccwpck_require__(32081); +const jsonpath = __nccwpck_require__(47523); +class GoogleCloudPlatformAuth { + isAuthProvider(user) { + if (!user || !user.authProvider) { + return false; + } + return user.authProvider.name === 'gcp'; + } + async applyAuthentication(user, opts) { + const token = this.getToken(user); + if (token) { + opts.headers.Authorization = `Bearer ${token}`; + } + } + getToken(user) { + const config = user.authProvider.config; + if (this.isExpired(config)) { + this.updateAccessToken(config); + } + return config['access-token']; + } + isExpired(config) { + const token = config['access-token']; + const expiry = config.expiry; + if (!token) { + return true; + } + if (!expiry) { + return false; + } + const expiration = Date.parse(expiry); + if (expiration < Date.now()) { + return true; + } + return false; + } + updateAccessToken(config) { + let cmd = config['cmd-path']; + if (!cmd) { + throw new Error('Token is expired!'); + } + // Wrap cmd in quotes to make it cope with spaces in path + cmd = `"${cmd}"`; + const args = config['cmd-args']; + if (args) { + cmd = cmd + ' ' + args; + } + // TODO: Cache to file? + // TODO: do this asynchronously + let output; + try { + output = proc.execSync(cmd); + } + catch (err) { + throw new Error('Failed to refresh token: ' + err.message); + } + const resultObj = JSON.parse(output); + const tokenPathKeyInConfig = config['token-key']; + const expiryPathKeyInConfig = config['expiry-key']; + // Format in file is {}, so slice it out and add '$' + const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1); + const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1); + config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj); + config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj); + } +} +exports.GoogleCloudPlatformAuth = GoogleCloudPlatformAuth; +//# sourceMappingURL=gcp_auth.js.map + +/***/ }), + +/***/ 34574: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(49109); +// This is the entrypoint for the package +tslib_1.__exportStar(__nccwpck_require__(57678), exports); +tslib_1.__exportStar(__nccwpck_require__(82963), exports); +//# sourceMappingURL=api.js.map + +/***/ }), + +/***/ 27064: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdmissionregistrationApi = exports.AdmissionregistrationApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AdmissionregistrationApiApiKeys; +(function (AdmissionregistrationApiApiKeys) { + AdmissionregistrationApiApiKeys[AdmissionregistrationApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AdmissionregistrationApiApiKeys = exports.AdmissionregistrationApiApiKeys || (exports.AdmissionregistrationApiApiKeys = {})); +class AdmissionregistrationApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AdmissionregistrationApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AdmissionregistrationApi = AdmissionregistrationApi; +//# sourceMappingURL=admissionregistrationApi.js.map + +/***/ }), + +/***/ 47556: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdmissionregistrationV1Api = exports.AdmissionregistrationV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AdmissionregistrationV1ApiApiKeys; +(function (AdmissionregistrationV1ApiApiKeys) { + AdmissionregistrationV1ApiApiKeys[AdmissionregistrationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AdmissionregistrationV1ApiApiKeys = exports.AdmissionregistrationV1ApiApiKeys || (exports.AdmissionregistrationV1ApiApiKeys = {})); +class AdmissionregistrationV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AdmissionregistrationV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a MutatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1MutatingWebhookConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ValidatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ValidatingWebhookConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of MutatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ValidatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a MutatingWebhookConfiguration + * @param name name of the MutatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ValidatingWebhookConfiguration + * @param name name of the ValidatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind MutatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfigurationList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ValidatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfigurationList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified MutatingWebhookConfiguration + * @param name name of the MutatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchMutatingWebhookConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ValidatingWebhookConfiguration + * @param name name of the ValidatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchValidatingWebhookConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified MutatingWebhookConfiguration + * @param name name of the MutatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + */ + async readMutatingWebhookConfiguration(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ValidatingWebhookConfiguration + * @param name name of the ValidatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + */ + async readValidatingWebhookConfiguration(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified MutatingWebhookConfiguration + * @param name name of the MutatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceMutatingWebhookConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1MutatingWebhookConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ValidatingWebhookConfiguration + * @param name name of the ValidatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceValidatingWebhookConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ValidatingWebhookConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AdmissionregistrationV1Api = AdmissionregistrationV1Api; +//# sourceMappingURL=admissionregistrationV1Api.js.map + +/***/ }), + +/***/ 42546: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdmissionregistrationV1beta1Api = exports.AdmissionregistrationV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AdmissionregistrationV1beta1ApiApiKeys; +(function (AdmissionregistrationV1beta1ApiApiKeys) { + AdmissionregistrationV1beta1ApiApiKeys[AdmissionregistrationV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AdmissionregistrationV1beta1ApiApiKeys = exports.AdmissionregistrationV1beta1ApiApiKeys || (exports.AdmissionregistrationV1beta1ApiApiKeys = {})); +class AdmissionregistrationV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AdmissionregistrationV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a MutatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1MutatingWebhookConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ValidatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1ValidatingWebhookConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of MutatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ValidatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a MutatingWebhookConfiguration + * @param name name of the MutatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ValidatingWebhookConfiguration + * @param name name of the ValidatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind MutatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfigurationList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ValidatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfigurationList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified MutatingWebhookConfiguration + * @param name name of the MutatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchMutatingWebhookConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ValidatingWebhookConfiguration + * @param name name of the ValidatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchValidatingWebhookConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified MutatingWebhookConfiguration + * @param name name of the MutatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + */ + async readMutatingWebhookConfiguration(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ValidatingWebhookConfiguration + * @param name name of the ValidatingWebhookConfiguration + * @param pretty If \'true\', then the output is pretty printed. + */ + async readValidatingWebhookConfiguration(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified MutatingWebhookConfiguration + * @param name name of the MutatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceMutatingWebhookConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceMutatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1MutatingWebhookConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ValidatingWebhookConfiguration + * @param name name of the ValidatingWebhookConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceValidatingWebhookConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceValidatingWebhookConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1ValidatingWebhookConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AdmissionregistrationV1beta1Api = AdmissionregistrationV1beta1Api; +//# sourceMappingURL=admissionregistrationV1beta1Api.js.map + +/***/ }), + +/***/ 45846: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiextensionsApi = exports.ApiextensionsApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var ApiextensionsApiApiKeys; +(function (ApiextensionsApiApiKeys) { + ApiextensionsApiApiKeys[ApiextensionsApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(ApiextensionsApiApiKeys = exports.ApiextensionsApiApiKeys || (exports.ApiextensionsApiApiKeys = {})); +class ApiextensionsApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[ApiextensionsApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.ApiextensionsApi = ApiextensionsApi; +//# sourceMappingURL=apiextensionsApi.js.map + +/***/ }), + +/***/ 44256: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiextensionsV1Api = exports.ApiextensionsV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var ApiextensionsV1ApiApiKeys; +(function (ApiextensionsV1ApiApiKeys) { + ApiextensionsV1ApiApiKeys[ApiextensionsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(ApiextensionsV1ApiApiKeys = exports.ApiextensionsV1ApiApiKeys || (exports.ApiextensionsV1ApiApiKeys = {})); +class ApiextensionsV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[ApiextensionsV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createCustomResourceDefinition(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinitionList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinition.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinitionStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinitionStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCustomResourceDefinition(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCustomResourceDefinitionStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinitionStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinition.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinitionStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinitionStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.ApiextensionsV1Api = ApiextensionsV1Api; +//# sourceMappingURL=apiextensionsV1Api.js.map + +/***/ }), + +/***/ 5953: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiextensionsV1beta1Api = exports.ApiextensionsV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var ApiextensionsV1beta1ApiApiKeys; +(function (ApiextensionsV1beta1ApiApiKeys) { + ApiextensionsV1beta1ApiApiKeys[ApiextensionsV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(ApiextensionsV1beta1ApiApiKeys = exports.ApiextensionsV1beta1ApiApiKeys || (exports.ApiextensionsV1beta1ApiApiKeys = {})); +class ApiextensionsV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[ApiextensionsV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createCustomResourceDefinition(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CustomResourceDefinition") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinitionList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinition.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinitionStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinitionStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCustomResourceDefinition(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCustomResourceDefinitionStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinitionStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinition.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinition.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CustomResourceDefinition") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified CustomResourceDefinition + * @param name name of the CustomResourceDefinition + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinitionStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinitionStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CustomResourceDefinition") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.ApiextensionsV1beta1Api = ApiextensionsV1beta1Api; +//# sourceMappingURL=apiextensionsV1beta1Api.js.map + +/***/ }), + +/***/ 60881: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiregistrationApi = exports.ApiregistrationApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var ApiregistrationApiApiKeys; +(function (ApiregistrationApiApiKeys) { + ApiregistrationApiApiKeys[ApiregistrationApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(ApiregistrationApiApiKeys = exports.ApiregistrationApiApiKeys || (exports.ApiregistrationApiApiKeys = {})); +class ApiregistrationApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[ApiregistrationApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.ApiregistrationApi = ApiregistrationApi; +//# sourceMappingURL=apiregistrationApi.js.map + +/***/ }), + +/***/ 39509: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiregistrationV1Api = exports.ApiregistrationV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var ApiregistrationV1ApiApiKeys; +(function (ApiregistrationV1ApiApiKeys) { + ApiregistrationV1ApiApiKeys[ApiregistrationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(ApiregistrationV1ApiApiKeys = exports.ApiregistrationV1ApiApiKeys || (exports.ApiregistrationV1ApiApiKeys = {})); +class ApiregistrationV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[ApiregistrationV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create an APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createAPIService(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1APIService") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an APIService + * @param name name of the APIService + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of APIService + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind APIService + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIServiceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified APIService + * @param name name of the APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchAPIService(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchAPIService.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified APIService + * @param name name of the APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchAPIServiceStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchAPIServiceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified APIService + * @param name name of the APIService + * @param pretty If \'true\', then the output is pretty printed. + */ + async readAPIService(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified APIService + * @param name name of the APIService + * @param pretty If \'true\', then the output is pretty printed. + */ + async readAPIServiceStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readAPIServiceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified APIService + * @param name name of the APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceAPIService(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceAPIService.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1APIService") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified APIService + * @param name name of the APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceAPIServiceStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceAPIServiceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1APIService") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.ApiregistrationV1Api = ApiregistrationV1Api; +//# sourceMappingURL=apiregistrationV1Api.js.map + +/***/ }), + +/***/ 69193: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiregistrationV1beta1Api = exports.ApiregistrationV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var ApiregistrationV1beta1ApiApiKeys; +(function (ApiregistrationV1beta1ApiApiKeys) { + ApiregistrationV1beta1ApiApiKeys[ApiregistrationV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(ApiregistrationV1beta1ApiApiKeys = exports.ApiregistrationV1beta1ApiApiKeys || (exports.ApiregistrationV1beta1ApiApiKeys = {})); +class ApiregistrationV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[ApiregistrationV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create an APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createAPIService(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1APIService") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an APIService + * @param name name of the APIService + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of APIService + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind APIService + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1APIServiceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified APIService + * @param name name of the APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchAPIService(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchAPIService.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified APIService + * @param name name of the APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchAPIServiceStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchAPIServiceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified APIService + * @param name name of the APIService + * @param pretty If \'true\', then the output is pretty printed. + */ + async readAPIService(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified APIService + * @param name name of the APIService + * @param pretty If \'true\', then the output is pretty printed. + */ + async readAPIServiceStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readAPIServiceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified APIService + * @param name name of the APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceAPIService(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceAPIService.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceAPIService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1APIService") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified APIService + * @param name name of the APIService + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceAPIServiceStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceAPIServiceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1APIService") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1APIService"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.ApiregistrationV1beta1Api = ApiregistrationV1beta1Api; +//# sourceMappingURL=apiregistrationV1beta1Api.js.map + +/***/ }), + +/***/ 57678: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.APIS = exports.HttpError = void 0; +const tslib_1 = __nccwpck_require__(49109); +tslib_1.__exportStar(__nccwpck_require__(27064), exports); +const admissionregistrationApi_1 = __nccwpck_require__(27064); +tslib_1.__exportStar(__nccwpck_require__(47556), exports); +const admissionregistrationV1Api_1 = __nccwpck_require__(47556); +tslib_1.__exportStar(__nccwpck_require__(42546), exports); +const admissionregistrationV1beta1Api_1 = __nccwpck_require__(42546); +tslib_1.__exportStar(__nccwpck_require__(45846), exports); +const apiextensionsApi_1 = __nccwpck_require__(45846); +tslib_1.__exportStar(__nccwpck_require__(44256), exports); +const apiextensionsV1Api_1 = __nccwpck_require__(44256); +tslib_1.__exportStar(__nccwpck_require__(5953), exports); +const apiextensionsV1beta1Api_1 = __nccwpck_require__(5953); +tslib_1.__exportStar(__nccwpck_require__(60881), exports); +const apiregistrationApi_1 = __nccwpck_require__(60881); +tslib_1.__exportStar(__nccwpck_require__(39509), exports); +const apiregistrationV1Api_1 = __nccwpck_require__(39509); +tslib_1.__exportStar(__nccwpck_require__(69193), exports); +const apiregistrationV1beta1Api_1 = __nccwpck_require__(69193); +tslib_1.__exportStar(__nccwpck_require__(73971), exports); +const apisApi_1 = __nccwpck_require__(73971); +tslib_1.__exportStar(__nccwpck_require__(67506), exports); +const appsApi_1 = __nccwpck_require__(67506); +tslib_1.__exportStar(__nccwpck_require__(8602), exports); +const appsV1Api_1 = __nccwpck_require__(8602); +tslib_1.__exportStar(__nccwpck_require__(31250), exports); +const authenticationApi_1 = __nccwpck_require__(31250); +tslib_1.__exportStar(__nccwpck_require__(20423), exports); +const authenticationV1Api_1 = __nccwpck_require__(20423); +tslib_1.__exportStar(__nccwpck_require__(21076), exports); +const authenticationV1beta1Api_1 = __nccwpck_require__(21076); +tslib_1.__exportStar(__nccwpck_require__(78773), exports); +const authorizationApi_1 = __nccwpck_require__(78773); +tslib_1.__exportStar(__nccwpck_require__(49663), exports); +const authorizationV1Api_1 = __nccwpck_require__(49663); +tslib_1.__exportStar(__nccwpck_require__(40756), exports); +const authorizationV1beta1Api_1 = __nccwpck_require__(40756); +tslib_1.__exportStar(__nccwpck_require__(68126), exports); +const autoscalingApi_1 = __nccwpck_require__(68126); +tslib_1.__exportStar(__nccwpck_require__(80025), exports); +const autoscalingV1Api_1 = __nccwpck_require__(80025); +tslib_1.__exportStar(__nccwpck_require__(31335), exports); +const autoscalingV2beta1Api_1 = __nccwpck_require__(31335); +tslib_1.__exportStar(__nccwpck_require__(57903), exports); +const autoscalingV2beta2Api_1 = __nccwpck_require__(57903); +tslib_1.__exportStar(__nccwpck_require__(28409), exports); +const batchApi_1 = __nccwpck_require__(28409); +tslib_1.__exportStar(__nccwpck_require__(5415), exports); +const batchV1Api_1 = __nccwpck_require__(5415); +tslib_1.__exportStar(__nccwpck_require__(19889), exports); +const batchV1beta1Api_1 = __nccwpck_require__(19889); +tslib_1.__exportStar(__nccwpck_require__(61202), exports); +const certificatesApi_1 = __nccwpck_require__(61202); +tslib_1.__exportStar(__nccwpck_require__(69400), exports); +const certificatesV1Api_1 = __nccwpck_require__(69400); +tslib_1.__exportStar(__nccwpck_require__(54288), exports); +const certificatesV1beta1Api_1 = __nccwpck_require__(54288); +tslib_1.__exportStar(__nccwpck_require__(57419), exports); +const coordinationApi_1 = __nccwpck_require__(57419); +tslib_1.__exportStar(__nccwpck_require__(63998), exports); +const coordinationV1Api_1 = __nccwpck_require__(63998); +tslib_1.__exportStar(__nccwpck_require__(59952), exports); +const coordinationV1beta1Api_1 = __nccwpck_require__(59952); +tslib_1.__exportStar(__nccwpck_require__(53363), exports); +const coreApi_1 = __nccwpck_require__(53363); +tslib_1.__exportStar(__nccwpck_require__(41026), exports); +const coreV1Api_1 = __nccwpck_require__(41026); +tslib_1.__exportStar(__nccwpck_require__(52866), exports); +const customObjectsApi_1 = __nccwpck_require__(52866); +tslib_1.__exportStar(__nccwpck_require__(43624), exports); +const discoveryApi_1 = __nccwpck_require__(43624); +tslib_1.__exportStar(__nccwpck_require__(73289), exports); +const discoveryV1Api_1 = __nccwpck_require__(73289); +tslib_1.__exportStar(__nccwpck_require__(34357), exports); +const discoveryV1beta1Api_1 = __nccwpck_require__(34357); +tslib_1.__exportStar(__nccwpck_require__(84531), exports); +const eventsApi_1 = __nccwpck_require__(84531); +tslib_1.__exportStar(__nccwpck_require__(98965), exports); +const eventsV1Api_1 = __nccwpck_require__(98965); +tslib_1.__exportStar(__nccwpck_require__(15574), exports); +const eventsV1beta1Api_1 = __nccwpck_require__(15574); +tslib_1.__exportStar(__nccwpck_require__(35605), exports); +const extensionsApi_1 = __nccwpck_require__(35605); +tslib_1.__exportStar(__nccwpck_require__(45598), exports); +const extensionsV1beta1Api_1 = __nccwpck_require__(45598); +tslib_1.__exportStar(__nccwpck_require__(93444), exports); +const flowcontrolApiserverApi_1 = __nccwpck_require__(93444); +tslib_1.__exportStar(__nccwpck_require__(11259), exports); +const flowcontrolApiserverV1beta1Api_1 = __nccwpck_require__(11259); +tslib_1.__exportStar(__nccwpck_require__(24890), exports); +const internalApiserverApi_1 = __nccwpck_require__(24890); +tslib_1.__exportStar(__nccwpck_require__(13246), exports); +const internalApiserverV1alpha1Api_1 = __nccwpck_require__(13246); +tslib_1.__exportStar(__nccwpck_require__(41430), exports); +const logsApi_1 = __nccwpck_require__(41430); +tslib_1.__exportStar(__nccwpck_require__(23319), exports); +const networkingApi_1 = __nccwpck_require__(23319); +tslib_1.__exportStar(__nccwpck_require__(95108), exports); +const networkingV1Api_1 = __nccwpck_require__(95108); +tslib_1.__exportStar(__nccwpck_require__(68386), exports); +const networkingV1beta1Api_1 = __nccwpck_require__(68386); +tslib_1.__exportStar(__nccwpck_require__(8218), exports); +const nodeApi_1 = __nccwpck_require__(8218); +tslib_1.__exportStar(__nccwpck_require__(76493), exports); +const nodeV1Api_1 = __nccwpck_require__(76493); +tslib_1.__exportStar(__nccwpck_require__(16245), exports); +const nodeV1alpha1Api_1 = __nccwpck_require__(16245); +tslib_1.__exportStar(__nccwpck_require__(9052), exports); +const nodeV1beta1Api_1 = __nccwpck_require__(9052); +tslib_1.__exportStar(__nccwpck_require__(81378), exports); +const openidApi_1 = __nccwpck_require__(81378); +tslib_1.__exportStar(__nccwpck_require__(70762), exports); +const policyApi_1 = __nccwpck_require__(70762); +tslib_1.__exportStar(__nccwpck_require__(8822), exports); +const policyV1Api_1 = __nccwpck_require__(8822); +tslib_1.__exportStar(__nccwpck_require__(99420), exports); +const policyV1beta1Api_1 = __nccwpck_require__(99420); +tslib_1.__exportStar(__nccwpck_require__(93735), exports); +const rbacAuthorizationApi_1 = __nccwpck_require__(93735); +tslib_1.__exportStar(__nccwpck_require__(45450), exports); +const rbacAuthorizationV1Api_1 = __nccwpck_require__(45450); +tslib_1.__exportStar(__nccwpck_require__(78874), exports); +const rbacAuthorizationV1alpha1Api_1 = __nccwpck_require__(78874); +tslib_1.__exportStar(__nccwpck_require__(31999), exports); +const rbacAuthorizationV1beta1Api_1 = __nccwpck_require__(31999); +tslib_1.__exportStar(__nccwpck_require__(7847), exports); +const schedulingApi_1 = __nccwpck_require__(7847); +tslib_1.__exportStar(__nccwpck_require__(14806), exports); +const schedulingV1Api_1 = __nccwpck_require__(14806); +tslib_1.__exportStar(__nccwpck_require__(33509), exports); +const schedulingV1alpha1Api_1 = __nccwpck_require__(33509); +tslib_1.__exportStar(__nccwpck_require__(55255), exports); +const schedulingV1beta1Api_1 = __nccwpck_require__(55255); +tslib_1.__exportStar(__nccwpck_require__(25132), exports); +const storageApi_1 = __nccwpck_require__(25132); +tslib_1.__exportStar(__nccwpck_require__(28814), exports); +const storageV1Api_1 = __nccwpck_require__(28814); +tslib_1.__exportStar(__nccwpck_require__(45265), exports); +const storageV1alpha1Api_1 = __nccwpck_require__(45265); +tslib_1.__exportStar(__nccwpck_require__(40564), exports); +const storageV1beta1Api_1 = __nccwpck_require__(40564); +tslib_1.__exportStar(__nccwpck_require__(34135), exports); +const versionApi_1 = __nccwpck_require__(34135); +tslib_1.__exportStar(__nccwpck_require__(26088), exports); +const wellKnownApi_1 = __nccwpck_require__(26088); +class HttpError extends Error { + constructor(response, body, statusCode) { + super('HTTP request failed'); + this.response = response; + this.body = body; + this.statusCode = statusCode; + this.name = 'HttpError'; + } +} +exports.HttpError = HttpError; +exports.APIS = [admissionregistrationApi_1.AdmissionregistrationApi, admissionregistrationV1Api_1.AdmissionregistrationV1Api, admissionregistrationV1beta1Api_1.AdmissionregistrationV1beta1Api, apiextensionsApi_1.ApiextensionsApi, apiextensionsV1Api_1.ApiextensionsV1Api, apiextensionsV1beta1Api_1.ApiextensionsV1beta1Api, apiregistrationApi_1.ApiregistrationApi, apiregistrationV1Api_1.ApiregistrationV1Api, apiregistrationV1beta1Api_1.ApiregistrationV1beta1Api, apisApi_1.ApisApi, appsApi_1.AppsApi, appsV1Api_1.AppsV1Api, authenticationApi_1.AuthenticationApi, authenticationV1Api_1.AuthenticationV1Api, authenticationV1beta1Api_1.AuthenticationV1beta1Api, authorizationApi_1.AuthorizationApi, authorizationV1Api_1.AuthorizationV1Api, authorizationV1beta1Api_1.AuthorizationV1beta1Api, autoscalingApi_1.AutoscalingApi, autoscalingV1Api_1.AutoscalingV1Api, autoscalingV2beta1Api_1.AutoscalingV2beta1Api, autoscalingV2beta2Api_1.AutoscalingV2beta2Api, batchApi_1.BatchApi, batchV1Api_1.BatchV1Api, batchV1beta1Api_1.BatchV1beta1Api, certificatesApi_1.CertificatesApi, certificatesV1Api_1.CertificatesV1Api, certificatesV1beta1Api_1.CertificatesV1beta1Api, coordinationApi_1.CoordinationApi, coordinationV1Api_1.CoordinationV1Api, coordinationV1beta1Api_1.CoordinationV1beta1Api, coreApi_1.CoreApi, coreV1Api_1.CoreV1Api, customObjectsApi_1.CustomObjectsApi, discoveryApi_1.DiscoveryApi, discoveryV1Api_1.DiscoveryV1Api, discoveryV1beta1Api_1.DiscoveryV1beta1Api, eventsApi_1.EventsApi, eventsV1Api_1.EventsV1Api, eventsV1beta1Api_1.EventsV1beta1Api, extensionsApi_1.ExtensionsApi, extensionsV1beta1Api_1.ExtensionsV1beta1Api, flowcontrolApiserverApi_1.FlowcontrolApiserverApi, flowcontrolApiserverV1beta1Api_1.FlowcontrolApiserverV1beta1Api, internalApiserverApi_1.InternalApiserverApi, internalApiserverV1alpha1Api_1.InternalApiserverV1alpha1Api, logsApi_1.LogsApi, networkingApi_1.NetworkingApi, networkingV1Api_1.NetworkingV1Api, networkingV1beta1Api_1.NetworkingV1beta1Api, nodeApi_1.NodeApi, nodeV1Api_1.NodeV1Api, nodeV1alpha1Api_1.NodeV1alpha1Api, nodeV1beta1Api_1.NodeV1beta1Api, openidApi_1.OpenidApi, policyApi_1.PolicyApi, policyV1Api_1.PolicyV1Api, policyV1beta1Api_1.PolicyV1beta1Api, rbacAuthorizationApi_1.RbacAuthorizationApi, rbacAuthorizationV1Api_1.RbacAuthorizationV1Api, rbacAuthorizationV1alpha1Api_1.RbacAuthorizationV1alpha1Api, rbacAuthorizationV1beta1Api_1.RbacAuthorizationV1beta1Api, schedulingApi_1.SchedulingApi, schedulingV1Api_1.SchedulingV1Api, schedulingV1alpha1Api_1.SchedulingV1alpha1Api, schedulingV1beta1Api_1.SchedulingV1beta1Api, storageApi_1.StorageApi, storageV1Api_1.StorageV1Api, storageV1alpha1Api_1.StorageV1alpha1Api, storageV1beta1Api_1.StorageV1beta1Api, versionApi_1.VersionApi, wellKnownApi_1.WellKnownApi]; +//# sourceMappingURL=apis.js.map + +/***/ }), + +/***/ 73971: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApisApi = exports.ApisApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var ApisApiApiKeys; +(function (ApisApiApiKeys) { + ApisApiApiKeys[ApisApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(ApisApiApiKeys = exports.ApisApiApiKeys || (exports.ApisApiApiKeys = {})); +class ApisApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[ApisApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get available API versions + */ + async getAPIVersions(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroupList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.ApisApi = ApisApi; +//# sourceMappingURL=apisApi.js.map + +/***/ }), + +/***/ 67506: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AppsApi = exports.AppsApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AppsApiApiKeys; +(function (AppsApiApiKeys) { + AppsApiApiKeys[AppsApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AppsApiApiKeys = exports.AppsApiApiKeys || (exports.AppsApiApiKeys = {})); +class AppsApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AppsApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AppsApi = AppsApi; +//# sourceMappingURL=appsApi.js.map + +/***/ }), + +/***/ 8602: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AppsV1Api = exports.AppsV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AppsV1ApiApiKeys; +(function (AppsV1ApiApiKeys) { + AppsV1ApiApiKeys[AppsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AppsV1ApiApiKeys = exports.AppsV1ApiApiKeys || (exports.AppsV1ApiApiKeys = {})); +class AppsV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AppsV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a ControllerRevision + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedControllerRevision(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedControllerRevision.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedControllerRevision.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ControllerRevision") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedDaemonSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDaemonSet.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedDaemonSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedDeployment(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeployment.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedDeployment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Deployment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedReplicaSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicaSet.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicaSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedStatefulSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedStatefulSet.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedStatefulSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ControllerRevision + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedControllerRevision(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedControllerRevision.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedDaemonSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDaemonSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedDeployment(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedReplicaSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicaSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedStatefulSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedStatefulSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ControllerRevision + * @param name name of the ControllerRevision + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedControllerRevision(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedControllerRevision.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedControllerRevision.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a DaemonSet + * @param name name of the DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedDaemonSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDaemonSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDaemonSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Deployment + * @param name name of the Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedDeployment(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDeployment.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ReplicaSet + * @param name name of the ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedReplicaSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicaSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicaSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a StatefulSet + * @param name name of the StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedStatefulSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedStatefulSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedStatefulSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ControllerRevision + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listControllerRevisionForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/controllerrevisions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevisionList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind DaemonSet + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listDaemonSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/daemonsets'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Deployment + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listDeploymentForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/deployments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DeploymentList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ControllerRevision + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedControllerRevision(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedControllerRevision.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevisionList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedDaemonSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDaemonSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedDeployment(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDeployment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DeploymentList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedReplicaSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicaSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedStatefulSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedStatefulSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ReplicaSet + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listReplicaSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/replicasets'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind StatefulSet + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listStatefulSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/statefulsets'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ControllerRevision + * @param name name of the ControllerRevision + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedControllerRevision.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedControllerRevision.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedControllerRevision.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified DaemonSet + * @param name name of the DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSet.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified DaemonSet + * @param name name of the DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Deployment + * @param name name of the Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeployment.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeployment.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeployment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update scale of the specified Deployment + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified Deployment + * @param name name of the Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ReplicaSet + * @param name name of the ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSet.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update scale of the specified ReplicaSet + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified ReplicaSet + * @param name name of the ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified StatefulSet + * @param name name of the StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSet.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update scale of the specified StatefulSet + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified StatefulSet + * @param name name of the StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ControllerRevision + * @param name name of the ControllerRevision + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedControllerRevision(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedControllerRevision.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedControllerRevision.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified DaemonSet + * @param name name of the DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedDaemonSet(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified DaemonSet + * @param name name of the DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedDaemonSetStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Deployment + * @param name name of the Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedDeployment(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedDeployment.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeployment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read scale of the specified Deployment + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedDeploymentScale(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified Deployment + * @param name name of the Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedDeploymentStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ReplicaSet + * @param name name of the ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedReplicaSet(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read scale of the specified ReplicaSet + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedReplicaSetScale(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified ReplicaSet + * @param name name of the ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedReplicaSetStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified StatefulSet + * @param name name of the StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedStatefulSet(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read scale of the specified StatefulSet + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedStatefulSetScale(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified StatefulSet + * @param name name of the StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedStatefulSetStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ControllerRevision + * @param name name of the ControllerRevision + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedControllerRevision.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedControllerRevision.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedControllerRevision.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ControllerRevision") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified DaemonSet + * @param name name of the DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSet.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified DaemonSet + * @param name name of the DaemonSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Deployment + * @param name name of the Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeployment.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeployment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Deployment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace scale of the specified Deployment + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Scale") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified Deployment + * @param name name of the Deployment + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Deployment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ReplicaSet + * @param name name of the ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSet.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace scale of the specified ReplicaSet + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Scale") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified ReplicaSet + * @param name name of the ReplicaSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified StatefulSet + * @param name name of the StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSet.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSet.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSet.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace scale of the specified StatefulSet + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Scale") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified StatefulSet + * @param name name of the StatefulSet + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AppsV1Api = AppsV1Api; +//# sourceMappingURL=appsV1Api.js.map + +/***/ }), + +/***/ 31250: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AuthenticationApi = exports.AuthenticationApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AuthenticationApiApiKeys; +(function (AuthenticationApiApiKeys) { + AuthenticationApiApiKeys[AuthenticationApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AuthenticationApiApiKeys = exports.AuthenticationApiApiKeys || (exports.AuthenticationApiApiKeys = {})); +class AuthenticationApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AuthenticationApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authentication.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AuthenticationApi = AuthenticationApi; +//# sourceMappingURL=authenticationApi.js.map + +/***/ }), + +/***/ 20423: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AuthenticationV1Api = exports.AuthenticationV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AuthenticationV1ApiApiKeys; +(function (AuthenticationV1ApiApiKeys) { + AuthenticationV1ApiApiKeys[AuthenticationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AuthenticationV1ApiApiKeys = exports.AuthenticationV1ApiApiKeys || (exports.AuthenticationV1ApiApiKeys = {})); +class AuthenticationV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AuthenticationV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a TokenReview + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createTokenReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/tokenreviews'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createTokenReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1TokenReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1TokenReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AuthenticationV1Api = AuthenticationV1Api; +//# sourceMappingURL=authenticationV1Api.js.map + +/***/ }), + +/***/ 21076: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AuthenticationV1beta1Api = exports.AuthenticationV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AuthenticationV1beta1ApiApiKeys; +(function (AuthenticationV1beta1ApiApiKeys) { + AuthenticationV1beta1ApiApiKeys[AuthenticationV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AuthenticationV1beta1ApiApiKeys = exports.AuthenticationV1beta1ApiApiKeys || (exports.AuthenticationV1beta1ApiApiKeys = {})); +class AuthenticationV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AuthenticationV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a TokenReview + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createTokenReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1beta1/tokenreviews'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createTokenReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1TokenReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1TokenReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AuthenticationV1beta1Api = AuthenticationV1beta1Api; +//# sourceMappingURL=authenticationV1beta1Api.js.map + +/***/ }), + +/***/ 78773: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AuthorizationApi = exports.AuthorizationApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AuthorizationApiApiKeys; +(function (AuthorizationApiApiKeys) { + AuthorizationApiApiKeys[AuthorizationApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AuthorizationApiApiKeys = exports.AuthorizationApiApiKeys || (exports.AuthorizationApiApiKeys = {})); +class AuthorizationApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AuthorizationApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AuthorizationApi = AuthorizationApi; +//# sourceMappingURL=authorizationApi.js.map + +/***/ }), + +/***/ 49663: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AuthorizationV1Api = exports.AuthorizationV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AuthorizationV1ApiApiKeys; +(function (AuthorizationV1ApiApiKeys) { + AuthorizationV1ApiApiKeys[AuthorizationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AuthorizationV1ApiApiKeys = exports.AuthorizationV1ApiApiKeys || (exports.AuthorizationV1ApiApiKeys = {})); +class AuthorizationV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AuthorizationV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a LocalSubjectAccessReview + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1LocalSubjectAccessReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1LocalSubjectAccessReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a SelfSubjectAccessReview + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createSelfSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createSelfSubjectAccessReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1SelfSubjectAccessReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1SelfSubjectAccessReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a SelfSubjectRulesReview + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createSelfSubjectRulesReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectrulesreviews'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createSelfSubjectRulesReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1SelfSubjectRulesReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1SelfSubjectRulesReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a SubjectAccessReview + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/subjectaccessreviews'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createSubjectAccessReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1SubjectAccessReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1SubjectAccessReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AuthorizationV1Api = AuthorizationV1Api; +//# sourceMappingURL=authorizationV1Api.js.map + +/***/ }), + +/***/ 40756: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AuthorizationV1beta1Api = exports.AuthorizationV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AuthorizationV1beta1ApiApiKeys; +(function (AuthorizationV1beta1ApiApiKeys) { + AuthorizationV1beta1ApiApiKeys[AuthorizationV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AuthorizationV1beta1ApiApiKeys = exports.AuthorizationV1beta1ApiApiKeys || (exports.AuthorizationV1beta1ApiApiKeys = {})); +class AuthorizationV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AuthorizationV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a LocalSubjectAccessReview + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1LocalSubjectAccessReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1LocalSubjectAccessReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a SelfSubjectAccessReview + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createSelfSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/selfsubjectaccessreviews'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createSelfSubjectAccessReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1SelfSubjectAccessReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1SelfSubjectAccessReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a SelfSubjectRulesReview + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createSelfSubjectRulesReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createSelfSubjectRulesReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1SelfSubjectRulesReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1SelfSubjectRulesReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a SubjectAccessReview + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/subjectaccessreviews'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createSubjectAccessReview.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1SubjectAccessReview") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1SubjectAccessReview"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AuthorizationV1beta1Api = AuthorizationV1beta1Api; +//# sourceMappingURL=authorizationV1beta1Api.js.map + +/***/ }), + +/***/ 68126: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AutoscalingApi = exports.AutoscalingApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AutoscalingApiApiKeys; +(function (AutoscalingApiApiKeys) { + AutoscalingApiApiKeys[AutoscalingApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AutoscalingApiApiKeys = exports.AutoscalingApiApiKeys || (exports.AutoscalingApiApiKeys = {})); +class AutoscalingApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AutoscalingApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AutoscalingApi = AutoscalingApi; +//# sourceMappingURL=autoscalingApi.js.map + +/***/ }), + +/***/ 80025: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AutoscalingV1Api = exports.AutoscalingV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AutoscalingV1ApiApiKeys; +(function (AutoscalingV1ApiApiKeys) { + AutoscalingV1ApiApiKeys[AutoscalingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AutoscalingV1ApiApiKeys = exports.AutoscalingV1ApiApiKeys || (exports.AutoscalingV1ApiApiKeys = {})); +class AutoscalingV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AutoscalingV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind HorizontalPodAutoscaler + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/horizontalpodautoscalers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AutoscalingV1Api = AutoscalingV1Api; +//# sourceMappingURL=autoscalingV1Api.js.map + +/***/ }), + +/***/ 31335: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AutoscalingV2beta1Api = exports.AutoscalingV2beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AutoscalingV2beta1ApiApiKeys; +(function (AutoscalingV2beta1ApiApiKeys) { + AutoscalingV2beta1ApiApiKeys[AutoscalingV2beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AutoscalingV2beta1ApiApiKeys = exports.AutoscalingV2beta1ApiApiKeys || (exports.AutoscalingV2beta1ApiApiKeys = {})); +class AutoscalingV2beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AutoscalingV2beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind HorizontalPodAutoscaler + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/horizontalpodautoscalers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AutoscalingV2beta1Api = AutoscalingV2beta1Api; +//# sourceMappingURL=autoscalingV2beta1Api.js.map + +/***/ }), + +/***/ 57903: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AutoscalingV2beta2Api = exports.AutoscalingV2beta2ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var AutoscalingV2beta2ApiApiKeys; +(function (AutoscalingV2beta2ApiApiKeys) { + AutoscalingV2beta2ApiApiKeys[AutoscalingV2beta2ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(AutoscalingV2beta2ApiApiKeys = exports.AutoscalingV2beta2ApiApiKeys || (exports.AutoscalingV2beta2ApiApiKeys = {})); +class AutoscalingV2beta2Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[AutoscalingV2beta2ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind HorizontalPodAutoscaler + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/horizontalpodautoscalers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified HorizontalPodAutoscaler + * @param name name of the HorizontalPodAutoscaler + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.AutoscalingV2beta2Api = AutoscalingV2beta2Api; +//# sourceMappingURL=autoscalingV2beta2Api.js.map + +/***/ }), + +/***/ 28409: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchApi = exports.BatchApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var BatchApiApiKeys; +(function (BatchApiApiKeys) { + BatchApiApiKeys[BatchApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(BatchApiApiKeys = exports.BatchApiApiKeys || (exports.BatchApiApiKeys = {})); +class BatchApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[BatchApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.BatchApi = BatchApi; +//# sourceMappingURL=batchApi.js.map + +/***/ }), + +/***/ 5415: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchV1Api = exports.BatchV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var BatchV1ApiApiKeys; +(function (BatchV1ApiApiKeys) { + BatchV1ApiApiKeys[BatchV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(BatchV1ApiApiKeys = exports.BatchV1ApiApiKeys || (exports.BatchV1ApiApiKeys = {})); +class BatchV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[BatchV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CronJob") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Job + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedJob.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Job") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Job"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Job + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Job + * @param name name of the Job + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CronJob + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/cronjobs'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CronJobList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Job + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/jobs'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1JobList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CronJobList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Job + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1JobList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Job + * @param name name of the Job + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJob.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Job"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified Job + * @param name name of the Job + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedJobStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJobStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedJobStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Job"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Job + * @param name name of the Job + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedJob(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Job"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified Job + * @param name name of the Job + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedJobStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedJobStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJobStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Job"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CronJob") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CronJob") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Job + * @param name name of the Job + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJob.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Job") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Job"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified Job + * @param name name of the Job + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJobStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJobStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJobStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Job") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Job"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.BatchV1Api = BatchV1Api; +//# sourceMappingURL=batchV1Api.js.map + +/***/ }), + +/***/ 19889: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchV1beta1Api = exports.BatchV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var BatchV1beta1ApiApiKeys; +(function (BatchV1beta1ApiApiKeys) { + BatchV1beta1ApiApiKeys[BatchV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(BatchV1beta1ApiApiKeys = exports.BatchV1beta1ApiApiKeys || (exports.BatchV1beta1ApiApiKeys = {})); +class BatchV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[BatchV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CronJob + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/cronjobs'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJobList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJobList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified CronJob + * @param name name of the CronJob + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.BatchV1beta1Api = BatchV1beta1Api; +//# sourceMappingURL=batchV1beta1Api.js.map + +/***/ }), + +/***/ 61202: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CertificatesApi = exports.CertificatesApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var CertificatesApiApiKeys; +(function (CertificatesApiApiKeys) { + CertificatesApiApiKeys[CertificatesApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(CertificatesApiApiKeys = exports.CertificatesApiApiKeys || (exports.CertificatesApiApiKeys = {})); +class CertificatesApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[CertificatesApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.CertificatesApi = CertificatesApi; +//# sourceMappingURL=certificatesApi.js.map + +/***/ }), + +/***/ 69400: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CertificatesV1Api = exports.CertificatesV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var CertificatesV1ApiApiKeys; +(function (CertificatesV1ApiApiKeys) { + CertificatesV1ApiApiKeys[CertificatesV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(CertificatesV1ApiApiKeys = exports.CertificatesV1ApiApiKeys || (exports.CertificatesV1ApiApiKeys = {})); +class CertificatesV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[CertificatesV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createCertificateSigningRequest(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequestList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequest.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update approval of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestApproval.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestApproval.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCertificateSigningRequest(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read approval of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCertificateSigningRequestApproval(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestApproval.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCertificateSigningRequestStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequest.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace approval of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestApproval.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestApproval.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.CertificatesV1Api = CertificatesV1Api; +//# sourceMappingURL=certificatesV1Api.js.map + +/***/ }), + +/***/ 54288: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CertificatesV1beta1Api = exports.CertificatesV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var CertificatesV1beta1ApiApiKeys; +(function (CertificatesV1beta1ApiApiKeys) { + CertificatesV1beta1ApiApiKeys[CertificatesV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(CertificatesV1beta1ApiApiKeys = exports.CertificatesV1beta1ApiApiKeys || (exports.CertificatesV1beta1ApiApiKeys = {})); +class CertificatesV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[CertificatesV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createCertificateSigningRequest(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CertificateSigningRequest") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequestList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequest.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update approval of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestApproval.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestApproval.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCertificateSigningRequest(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read approval of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCertificateSigningRequestApproval(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestApproval.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCertificateSigningRequestStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequest.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequest.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CertificateSigningRequest") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace approval of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestApproval.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestApproval.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CertificateSigningRequest") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified CertificateSigningRequest + * @param name name of the CertificateSigningRequest + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CertificateSigningRequest") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.CertificatesV1beta1Api = CertificatesV1beta1Api; +//# sourceMappingURL=certificatesV1beta1Api.js.map + +/***/ }), + +/***/ 57419: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CoordinationApi = exports.CoordinationApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var CoordinationApiApiKeys; +(function (CoordinationApiApiKeys) { + CoordinationApiApiKeys[CoordinationApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(CoordinationApiApiKeys = exports.CoordinationApiApiKeys || (exports.CoordinationApiApiKeys = {})); +class CoordinationApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[CoordinationApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.CoordinationApi = CoordinationApi; +//# sourceMappingURL=coordinationApi.js.map + +/***/ }), + +/***/ 63998: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CoordinationV1Api = exports.CoordinationV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var CoordinationV1ApiApiKeys; +(function (CoordinationV1ApiApiKeys) { + CoordinationV1ApiApiKeys[CoordinationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(CoordinationV1ApiApiKeys = exports.CoordinationV1ApiApiKeys || (exports.CoordinationV1ApiApiKeys = {})); +class CoordinationV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[CoordinationV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLease.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Lease") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Lease"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Lease + * @param name name of the Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLease.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Lease + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/leases'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1LeaseList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1LeaseList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Lease + * @param name name of the Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedLease.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLease.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Lease"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Lease + * @param name name of the Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedLease(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedLease.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Lease"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Lease + * @param name name of the Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLease.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLease.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Lease") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Lease"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.CoordinationV1Api = CoordinationV1Api; +//# sourceMappingURL=coordinationV1Api.js.map + +/***/ }), + +/***/ 59952: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CoordinationV1beta1Api = exports.CoordinationV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var CoordinationV1beta1ApiApiKeys; +(function (CoordinationV1beta1ApiApiKeys) { + CoordinationV1beta1ApiApiKeys[CoordinationV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(CoordinationV1beta1ApiApiKeys = exports.CoordinationV1beta1ApiApiKeys || (exports.CoordinationV1beta1ApiApiKeys = {})); +class CoordinationV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[CoordinationV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLease.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1Lease") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Lease"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Lease + * @param name name of the Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLease.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Lease + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/leases'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1LeaseList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1LeaseList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Lease + * @param name name of the Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedLease.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLease.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Lease"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Lease + * @param name name of the Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedLease(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedLease.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Lease"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Lease + * @param name name of the Lease + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLease.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLease.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLease.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1Lease") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Lease"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.CoordinationV1beta1Api = CoordinationV1beta1Api; +//# sourceMappingURL=coordinationV1beta1Api.js.map + +/***/ }), + +/***/ 53363: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CoreApi = exports.CoreApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var CoreApiApiKeys; +(function (CoreApiApiKeys) { + CoreApiApiKeys[CoreApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(CoreApiApiKeys = exports.CoreApiApiKeys || (exports.CoreApiApiKeys = {})); +class CoreApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[CoreApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get available API versions + */ + async getAPIVersions(options = { headers: {} }) { + const localVarPath = this.basePath + '/api/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIVersions"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.CoreApi = CoreApi; +//# sourceMappingURL=coreApi.js.map + +/***/ }), + +/***/ 41026: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CoreV1Api = exports.CoreV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var CoreV1ApiApiKeys; +(function (CoreV1ApiApiKeys) { + CoreV1ApiApiKeys[CoreV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(CoreV1ApiApiKeys = exports.CoreV1ApiApiKeys || (exports.CoreV1ApiApiKeys = {})); +class CoreV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[CoreV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * connect DELETE requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the URL path to use for the current proxy request to pod. + */ + async connectDeleteNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect DELETE requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to pod. + */ + async connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect DELETE requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectDeleteNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect DELETE requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect DELETE requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path Path is the URL path to use for the current proxy request to node. + */ + async connectDeleteNodeProxy(name, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect DELETE requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to node. + */ + async connectDeleteNodeProxyWithPath(name, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectDeleteNodeProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect GET requests to attach of Pod + * @param name name of the PodAttachOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod. + * @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. + * @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. + * @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. + * @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + */ + async connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodAttach.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodAttach.'); + } + if (container !== undefined) { + localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); + } + if (stderr !== undefined) { + localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean"); + } + if (stdin !== undefined) { + localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean"); + } + if (stdout !== undefined) { + localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean"); + } + if (tty !== undefined) { + localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect GET requests to exec of Pod + * @param name name of the PodExecOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param command Command is the remote command to execute. argv array. Not executed within a shell. + * @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod. + * @param stderr Redirect the standard error stream of the pod for this call. Defaults to true. + * @param stdin Redirect the standard input stream of the pod for this call. Defaults to false. + * @param stdout Redirect the standard output stream of the pod for this call. Defaults to true. + * @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + */ + async connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodExec.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodExec.'); + } + if (command !== undefined) { + localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, "string"); + } + if (container !== undefined) { + localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); + } + if (stderr !== undefined) { + localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean"); + } + if (stdin !== undefined) { + localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean"); + } + if (stdout !== undefined) { + localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean"); + } + if (tty !== undefined) { + localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect GET requests to portforward of Pod + * @param name name of the PodPortForwardOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param ports List of ports to forward Required when using WebSockets + */ + async connectGetNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodPortforward.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodPortforward.'); + } + if (ports !== undefined) { + localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect GET requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the URL path to use for the current proxy request to pod. + */ + async connectGetNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect GET requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to pod. + */ + async connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedPodProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect GET requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectGetNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect GET requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedServiceProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect GET requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path Path is the URL path to use for the current proxy request to node. + */ + async connectGetNodeProxy(name, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect GET requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to node. + */ + async connectGetNodeProxyWithPath(name, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectGetNodeProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect HEAD requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the URL path to use for the current proxy request to pod. + */ + async connectHeadNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect HEAD requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to pod. + */ + async connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedPodProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect HEAD requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectHeadNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect HEAD requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect HEAD requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path Path is the URL path to use for the current proxy request to node. + */ + async connectHeadNodeProxy(name, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect HEAD requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to node. + */ + async connectHeadNodeProxyWithPath(name, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectHeadNodeProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect OPTIONS requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the URL path to use for the current proxy request to pod. + */ + async connectOptionsNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'OPTIONS', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect OPTIONS requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to pod. + */ + async connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'OPTIONS', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect OPTIONS requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectOptionsNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'OPTIONS', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect OPTIONS requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'OPTIONS', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect OPTIONS requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path Path is the URL path to use for the current proxy request to node. + */ + async connectOptionsNodeProxy(name, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'OPTIONS', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect OPTIONS requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to node. + */ + async connectOptionsNodeProxyWithPath(name, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectOptionsNodeProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'OPTIONS', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PATCH requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the URL path to use for the current proxy request to pod. + */ + async connectPatchNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PATCH requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to pod. + */ + async connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedPodProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PATCH requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectPatchNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PATCH requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PATCH requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path Path is the URL path to use for the current proxy request to node. + */ + async connectPatchNodeProxy(name, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PATCH requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to node. + */ + async connectPatchNodeProxyWithPath(name, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectPatchNodeProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect POST requests to attach of Pod + * @param name name of the PodAttachOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod. + * @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. + * @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. + * @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. + * @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + */ + async connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodAttach.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodAttach.'); + } + if (container !== undefined) { + localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); + } + if (stderr !== undefined) { + localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean"); + } + if (stdin !== undefined) { + localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean"); + } + if (stdout !== undefined) { + localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean"); + } + if (tty !== undefined) { + localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect POST requests to exec of Pod + * @param name name of the PodExecOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param command Command is the remote command to execute. argv array. Not executed within a shell. + * @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod. + * @param stderr Redirect the standard error stream of the pod for this call. Defaults to true. + * @param stdin Redirect the standard input stream of the pod for this call. Defaults to false. + * @param stdout Redirect the standard output stream of the pod for this call. Defaults to true. + * @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + */ + async connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodExec.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodExec.'); + } + if (command !== undefined) { + localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, "string"); + } + if (container !== undefined) { + localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); + } + if (stderr !== undefined) { + localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean"); + } + if (stdin !== undefined) { + localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean"); + } + if (stdout !== undefined) { + localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean"); + } + if (tty !== undefined) { + localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect POST requests to portforward of Pod + * @param name name of the PodPortForwardOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param ports List of ports to forward Required when using WebSockets + */ + async connectPostNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodPortforward.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodPortforward.'); + } + if (ports !== undefined) { + localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect POST requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the URL path to use for the current proxy request to pod. + */ + async connectPostNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect POST requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to pod. + */ + async connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedPodProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect POST requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectPostNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect POST requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedServiceProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect POST requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path Path is the URL path to use for the current proxy request to node. + */ + async connectPostNodeProxy(name, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect POST requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to node. + */ + async connectPostNodeProxyWithPath(name, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectPostNodeProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PUT requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the URL path to use for the current proxy request to pod. + */ + async connectPutNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PUT requests to proxy of Pod + * @param name name of the PodProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to pod. + */ + async connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedPodProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PUT requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectPutNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PUT requests to proxy of Service + * @param name name of the ServiceProxyOptions + * @param namespace object name and auth scope, such as for teams and projects + * @param path path to the resource + * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + */ + async connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedServiceProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PUT requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path Path is the URL path to use for the current proxy request to node. + */ + async connectPutNodeProxy(name, path, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxy.'); + } + if (path !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * connect PUT requests to proxy of Node + * @param name name of the NodeProxyOptions + * @param path path to the resource + * @param path2 Path is the URL path to use for the current proxy request to node. + */ + async connectPutNodeProxyWithPath(name, path, path2, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['*/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxyWithPath.'); + } + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling connectPutNodeProxyWithPath.'); + } + if (path2 !== undefined) { + localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Namespace + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespace(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespace.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Namespace") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Binding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createNamespacedBinding(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/bindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedBinding.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Binding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Binding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ConfigMap + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedConfigMap(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedConfigMap.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedConfigMap.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ConfigMap") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create Endpoints + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedEndpoints(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpoints.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpoints.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Endpoints") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create an Event + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "CoreV1Event") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a LimitRange + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedLimitRange(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLimitRange.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedLimitRange.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1LimitRange") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedPersistentVolumeClaim(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPersistentVolumeClaim.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedPersistentVolumeClaim.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedPod(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPod.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedPod.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Pod") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create binding of a Pod + * @param name name of the Binding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createNamespacedPodBinding(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/binding' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createNamespacedPodBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedPodBinding.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Binding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Binding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create eviction of a Pod + * @param name name of the Eviction + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createNamespacedPodEviction(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/eviction' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createNamespacedPodEviction.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodEviction.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedPodEviction.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1Eviction") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Eviction"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a PodTemplate + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedPodTemplate(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodTemplate.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedPodTemplate.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PodTemplate") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedReplicationController(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicationController.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicationController.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedResourceQuota(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceQuota.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceQuota.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Secret + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedSecret(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedSecret.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedSecret.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Secret") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Secret"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Service + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedService(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedService.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Service") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Service"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ServiceAccount + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedServiceAccount(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccount.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccount.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ServiceAccount") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create token of a ServiceAccount + * @param name name of the TokenRequest + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async createNamespacedServiceAccountToken(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createNamespacedServiceAccountToken.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccountToken.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccountToken.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "AuthenticationV1TokenRequest") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "AuthenticationV1TokenRequest"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Node + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNode(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Node") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Node"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a PersistentVolume + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createPersistentVolume(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createPersistentVolume.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ConfigMap + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedConfigMap(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedConfigMap.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Endpoints + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedEndpoints(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpoints.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of LimitRange + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedLimitRange(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLimitRange.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedPersistentVolumeClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPersistentVolumeClaim.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedPod(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPod.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PodTemplate + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedPodTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodTemplate.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedReplicationController(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicationController.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedResourceQuota(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceQuota.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Secret + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedSecret(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedSecret.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ServiceAccount + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedServiceAccount(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedServiceAccount.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Node + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PersistentVolume + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionPersistentVolume(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Namespace + * @param name name of the Namespace + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespace(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespace.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ConfigMap + * @param name name of the ConfigMap + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedConfigMap(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedConfigMap.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedConfigMap.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete Endpoints + * @param name name of the Endpoints + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedEndpoints(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpoints.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpoints.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a LimitRange + * @param name name of the LimitRange + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedLimitRange(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLimitRange.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLimitRange.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PersistentVolumeClaim + * @param name name of the PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPersistentVolumeClaim.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPersistentVolumeClaim.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Pod + * @param name name of the Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedPod(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPod.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPod.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PodTemplate + * @param name name of the PodTemplate + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedPodTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodTemplate.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodTemplate.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ReplicationController + * @param name name of the ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedReplicationController(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicationController.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicationController.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ResourceQuota + * @param name name of the ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedResourceQuota(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceQuota.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceQuota.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Secret + * @param name name of the Secret + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedSecret(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedSecret.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedSecret.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Service + * @param name name of the Service + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedService(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedService.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ServiceAccount + * @param name name of the ServiceAccount + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedServiceAccount(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedServiceAccount.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedServiceAccount.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Node + * @param name name of the Node + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PersistentVolume + * @param name name of the PersistentVolume + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deletePersistentVolume(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deletePersistentVolume.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list objects of kind ComponentStatus + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listComponentStatus(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/componentstatuses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ComponentStatusList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ConfigMap + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listConfigMapForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/configmaps'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMapList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Endpoints + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listEndpointsForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/endpoints'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EndpointsList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Event + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/events'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "CoreV1EventList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind LimitRange + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listLimitRangeForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/limitranges'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1LimitRangeList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Namespace + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespace(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1NamespaceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ConfigMap + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedConfigMap(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedConfigMap.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMapList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Endpoints + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedEndpoints(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpoints.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EndpointsList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "CoreV1EventList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind LimitRange + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedLimitRange(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLimitRange.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1LimitRangeList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedPersistentVolumeClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPersistentVolumeClaim.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedPod(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPod.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PodTemplate + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedPodTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodTemplate.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplateList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedReplicationController(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicationController.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationControllerList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedResourceQuota(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedResourceQuota.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuotaList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Secret + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedSecret(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedSecret.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1SecretList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Service + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedService(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ServiceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ServiceAccount + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedServiceAccount(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedServiceAccount.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccountList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Node + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1NodeList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PersistentVolume + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPersistentVolume(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PersistentVolumeClaim + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPersistentVolumeClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumeclaims'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Pod + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPodForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/pods'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PodTemplate + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPodTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/podtemplates'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplateList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ReplicationController + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listReplicationControllerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/replicationcontrollers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationControllerList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ResourceQuota + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listResourceQuotaForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/resourcequotas'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuotaList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Secret + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listSecretForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/secrets'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1SecretList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ServiceAccount + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listServiceAccountForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/serviceaccounts'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccountList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Service + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listServiceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/services'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ServiceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Namespace + * @param name name of the Namespace + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespace(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespace.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespace.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified Namespace + * @param name name of the Namespace + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespaceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespaceStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespaceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ConfigMap + * @param name name of the ConfigMap + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedConfigMap.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedConfigMap.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedConfigMap.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Endpoints + * @param name name of the Endpoints + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpoints.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpoints.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpoints.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified LimitRange + * @param name name of the LimitRange + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedLimitRange.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLimitRange.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedLimitRange.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PersistentVolumeClaim + * @param name name of the PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaim.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaim.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaim.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified PersistentVolumeClaim + * @param name name of the PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Pod + * @param name name of the Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPod.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPod.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPod.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update ephemeralcontainers of the specified Pod + * @param name name of the EphemeralContainers + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodEphemeralcontainers.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodEphemeralcontainers.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodEphemeralcontainers.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EphemeralContainers"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified Pod + * @param name name of the Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PodTemplate + * @param name name of the PodTemplate + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodTemplate.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodTemplate.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodTemplate.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ReplicationController + * @param name name of the ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationController.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationController.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationController.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update scale of the specified ReplicationController + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified ReplicationController + * @param name name of the ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ResourceQuota + * @param name name of the ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuota.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuota.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuota.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified ResourceQuota + * @param name name of the ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuotaStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuotaStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuotaStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Secret + * @param name name of the Secret + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedSecret.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedSecret.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedSecret.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Secret"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Service + * @param name name of the Service + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedService.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedService.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Service"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ServiceAccount + * @param name name of the ServiceAccount + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceAccount.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceAccount.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceAccount.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified Service + * @param name name of the Service + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Service"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Node + * @param name name of the Node + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNode.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Node"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified Node + * @param name name of the Node + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNodeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNodeStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNodeStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Node"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PersistentVolume + * @param name name of the PersistentVolume + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchPersistentVolume(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchPersistentVolume.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchPersistentVolume.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified PersistentVolume + * @param name name of the PersistentVolume + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchPersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchPersistentVolumeStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchPersistentVolumeStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ComponentStatus + * @param name name of the ComponentStatus + * @param pretty If \'true\', then the output is pretty printed. + */ + async readComponentStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/componentstatuses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readComponentStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ComponentStatus"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Namespace + * @param name name of the Namespace + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespace(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespace.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified Namespace + * @param name name of the Namespace + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespaceStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespaceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ConfigMap + * @param name name of the ConfigMap + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedConfigMap(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedConfigMap.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedConfigMap.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Endpoints + * @param name name of the Endpoints + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedEndpoints(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpoints.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpoints.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified LimitRange + * @param name name of the LimitRange + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedLimitRange(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedLimitRange.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLimitRange.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PersistentVolumeClaim + * @param name name of the PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPersistentVolumeClaim(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaim.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaim.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified PersistentVolumeClaim + * @param name name of the PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Pod + * @param name name of the Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPod(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPod.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPod.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read ephemeralcontainers of the specified Pod + * @param name name of the EphemeralContainers + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPodEphemeralcontainers(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPodEphemeralcontainers.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodEphemeralcontainers.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EphemeralContainers"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read log of the specified Pod + * @param name name of the Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param container The container for which to stream logs. Defaults to only container if there is one container in the pod. + * @param follow Follow the log stream of the pod. Defaults to false. + * @param insecureSkipTLSVerifyBackend insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver\'s TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet). + * @param limitBytes If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. + * @param pretty If \'true\', then the output is pretty printed. + * @param previous Return previous terminated container logs. Defaults to false. + * @param sinceSeconds A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. + * @param tailLines If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime + * @param timestamps If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. + */ + async readNamespacedPodLog(name, namespace, container, follow, insecureSkipTLSVerifyBackend, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/log' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['text/plain', 'application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPodLog.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodLog.'); + } + if (container !== undefined) { + localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); + } + if (follow !== undefined) { + localVarQueryParameters['follow'] = models_1.ObjectSerializer.serialize(follow, "boolean"); + } + if (insecureSkipTLSVerifyBackend !== undefined) { + localVarQueryParameters['insecureSkipTLSVerifyBackend'] = models_1.ObjectSerializer.serialize(insecureSkipTLSVerifyBackend, "boolean"); + } + if (limitBytes !== undefined) { + localVarQueryParameters['limitBytes'] = models_1.ObjectSerializer.serialize(limitBytes, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (previous !== undefined) { + localVarQueryParameters['previous'] = models_1.ObjectSerializer.serialize(previous, "boolean"); + } + if (sinceSeconds !== undefined) { + localVarQueryParameters['sinceSeconds'] = models_1.ObjectSerializer.serialize(sinceSeconds, "number"); + } + if (tailLines !== undefined) { + localVarQueryParameters['tailLines'] = models_1.ObjectSerializer.serialize(tailLines, "number"); + } + if (timestamps !== undefined) { + localVarQueryParameters['timestamps'] = models_1.ObjectSerializer.serialize(timestamps, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified Pod + * @param name name of the Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPodStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPodStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PodTemplate + * @param name name of the PodTemplate + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPodTemplate(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPodTemplate.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodTemplate.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ReplicationController + * @param name name of the ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedReplicationController(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationController.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationController.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read scale of the specified ReplicationController + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedReplicationControllerScale(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified ReplicationController + * @param name name of the ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedReplicationControllerStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ResourceQuota + * @param name name of the ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedResourceQuota(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuota.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuota.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified ResourceQuota + * @param name name of the ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedResourceQuotaStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuotaStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuotaStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Secret + * @param name name of the Secret + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedSecret(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedSecret.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedSecret.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Secret"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Service + * @param name name of the Service + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedService(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedService.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Service"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ServiceAccount + * @param name name of the ServiceAccount + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedServiceAccount(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceAccount.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceAccount.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified Service + * @param name name of the Service + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedServiceStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Service"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Node + * @param name name of the Node + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNode(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Node"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified Node + * @param name name of the Node + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNodeStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNodeStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Node"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PersistentVolume + * @param name name of the PersistentVolume + * @param pretty If \'true\', then the output is pretty printed. + */ + async readPersistentVolume(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readPersistentVolume.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified PersistentVolume + * @param name name of the PersistentVolume + * @param pretty If \'true\', then the output is pretty printed. + */ + async readPersistentVolumeStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readPersistentVolumeStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Namespace + * @param name name of the Namespace + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespace(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespace.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespace.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Namespace") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace finalize of the specified Namespace + * @param name name of the Namespace + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + * @param pretty If \'true\', then the output is pretty printed. + */ + async replaceNamespaceFinalize(name, body, dryRun, fieldManager, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{name}/finalize' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespaceFinalize.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespaceFinalize.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Namespace") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified Namespace + * @param name name of the Namespace + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespaceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespaceStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespaceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Namespace") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ConfigMap + * @param name name of the ConfigMap + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedConfigMap.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedConfigMap.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedConfigMap.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ConfigMap") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Endpoints + * @param name name of the Endpoints + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpoints.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpoints.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpoints.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Endpoints") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "CoreV1Event") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified LimitRange + * @param name name of the LimitRange + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLimitRange.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLimitRange.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLimitRange.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1LimitRange") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PersistentVolumeClaim + * @param name name of the PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaim.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaim.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaim.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified PersistentVolumeClaim + * @param name name of the PersistentVolumeClaim + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Pod + * @param name name of the Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPod.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPod.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPod.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Pod") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace ephemeralcontainers of the specified Pod + * @param name name of the EphemeralContainers + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodEphemeralcontainers.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodEphemeralcontainers.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodEphemeralcontainers.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1EphemeralContainers") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EphemeralContainers"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified Pod + * @param name name of the Pod + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Pod") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PodTemplate + * @param name name of the PodTemplate + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodTemplate.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodTemplate.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodTemplate.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PodTemplate") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ReplicationController + * @param name name of the ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationController.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationController.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationController.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace scale of the specified ReplicationController + * @param name name of the Scale + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerScale.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Scale") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified ReplicationController + * @param name name of the ReplicationController + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ResourceQuota + * @param name name of the ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuota.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuota.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuota.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified ResourceQuota + * @param name name of the ResourceQuota + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuotaStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuotaStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuotaStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Secret + * @param name name of the Secret + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedSecret.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedSecret.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedSecret.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Secret") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Secret"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Service + * @param name name of the Service + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedService.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedService.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedService.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Service") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Service"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ServiceAccount + * @param name name of the ServiceAccount + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceAccount.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceAccount.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceAccount.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ServiceAccount") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified Service + * @param name name of the Service + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Service") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Service"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Node + * @param name name of the Node + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNode.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Node") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Node"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified Node + * @param name name of the Node + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNodeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/nodes/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNodeStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNodeStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Node") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Node"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PersistentVolume + * @param name name of the PersistentVolume + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replacePersistentVolume(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replacePersistentVolume.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replacePersistentVolume.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified PersistentVolume + * @param name name of the PersistentVolume + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replacePersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replacePersistentVolumeStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replacePersistentVolumeStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.CoreV1Api = CoreV1Api; +//# sourceMappingURL=coreV1Api.js.map + +/***/ }), + +/***/ 52866: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CustomObjectsApi = exports.CustomObjectsApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var CustomObjectsApiApiKeys; +(function (CustomObjectsApiApiKeys) { + CustomObjectsApiApiKeys[CustomObjectsApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(CustomObjectsApiApiKeys = exports.CustomObjectsApiApiKeys || (exports.CustomObjectsApiApiKeys = {})); +class CustomObjectsApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[CustomObjectsApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * Creates a cluster scoped Custom object + * @param group The custom resource\'s group name + * @param version The custom resource\'s version + * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param body The JSON schema of the Resource to create. + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + */ + async createClusterCustomObject(group, version, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling createClusterCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling createClusterCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling createClusterCustomObject.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createClusterCustomObject.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Creates a namespace scoped Custom object + * @param group The custom resource\'s group name + * @param version The custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param body The JSON schema of the Resource to create. + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedCustomObject(group, version, namespace, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling createNamespacedCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling createNamespacedCustomObject.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling createNamespacedCustomObject.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedCustomObject.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Deletes the specified cluster scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param body + */ + async deleteClusterCustomObject(group, version, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling deleteClusterCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling deleteClusterCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling deleteClusterCustomObject.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteClusterCustomObject.'); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Delete collection of cluster scoped custom objects + * @param group The custom resource\'s group name + * @param version The custom resource\'s version + * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param pretty If \'true\', then the output is pretty printed. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param body + */ + async deleteCollectionClusterCustomObject(group, version, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling deleteCollectionClusterCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling deleteCollectionClusterCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling deleteCollectionClusterCustomObject.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Delete collection of namespace scoped custom objects + * @param group The custom resource\'s group name + * @param version The custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param pretty If \'true\', then the output is pretty printed. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param body + */ + async deleteCollectionNamespacedCustomObject(group, version, namespace, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling deleteCollectionNamespacedCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling deleteCollectionNamespacedCustomObject.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling deleteCollectionNamespacedCustomObject.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Deletes the specified namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param body + */ + async deleteNamespacedCustomObject(group, version, namespace, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling deleteNamespacedCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling deleteNamespacedCustomObject.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling deleteNamespacedCustomObject.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCustomObject.'); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns a cluster scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + */ + async getClusterCustomObject(group, version, plural, name, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getClusterCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling getClusterCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObject.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getClusterCustomObject.'); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read scale of the specified custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + */ + async getClusterCustomObjectScale(group, version, plural, name, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectScale.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectScale.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectScale.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectScale.'); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified cluster scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + */ + async getClusterCustomObjectStatus(group, version, plural, name, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectStatus.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectStatus.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectStatus.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectStatus.'); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Returns a namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + */ + async getNamespacedCustomObject(group, version, namespace, plural, name, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObject.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObject.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObject.'); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read scale of the specified namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + */ + async getNamespacedCustomObjectScale(group, version, namespace, plural, name, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectScale.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectScale.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectScale.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectScale.'); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + */ + async getNamespacedCustomObjectStatus(group, version, namespace, plural, name, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectStatus.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectStatus.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectStatus.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectStatus.'); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch cluster scoped custom objects + * @param group The custom resource\'s group name + * @param version The custom resource\'s version + * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it\'s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + */ + async listClusterCustomObject(group, version, plural, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling listClusterCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling listClusterCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling listClusterCustomObject.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch namespace scoped custom objects + * @param group The custom resource\'s group name + * @param version The custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it\'s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + */ + async listNamespacedCustomObject(group, version, namespace, plural, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling listNamespacedCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling listNamespacedCustomObject.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling listNamespacedCustomObject.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * patch the specified cluster scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body The JSON schema of the Resource to patch. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObject.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObject.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObject.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update scale of the specified cluster scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectScale.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectScale.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectScale.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectScale.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified cluster scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectStatus.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectStatus.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectStatus.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectStatus.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * patch the specified namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body The JSON schema of the Resource to patch. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObject.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObject.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObject.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObject.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update scale of the specified namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectScale.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectScale.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectScale.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectScale.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectStatus.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectStatus.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectStatus.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectStatus.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified cluster scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body The JSON schema of the Resource to replace. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObject.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObject.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObject.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace scale of the specified cluster scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectScale.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectScale.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectScale.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectScale.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the cluster scoped specified custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectStatus.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectStatus.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectStatus.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectStatus.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body The JSON schema of the Resource to replace. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObject.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObject.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObject.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObject.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObject.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObject.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace scale of the specified namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectScale.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectScale.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectScale.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectScale.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectScale.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectScale.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified namespace scoped custom object + * @param group the custom resource\'s group + * @param version the custom resource\'s version + * @param namespace The custom resource\'s namespace + * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. + * @param name the custom object\'s name + * @param body + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status' + .replace('{' + 'group' + '}', encodeURIComponent(String(group))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) + .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'group' is not null or undefined + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectStatus.'); + } + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectStatus.'); + } + // verify required parameter 'plural' is not null or undefined + if (plural === null || plural === undefined) { + throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectStatus.'); + } + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectStatus.'); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "object"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.CustomObjectsApi = CustomObjectsApi; +//# sourceMappingURL=customObjectsApi.js.map + +/***/ }), + +/***/ 43624: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiscoveryApi = exports.DiscoveryApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var DiscoveryApiApiKeys; +(function (DiscoveryApiApiKeys) { + DiscoveryApiApiKeys[DiscoveryApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(DiscoveryApiApiKeys = exports.DiscoveryApiApiKeys || (exports.DiscoveryApiApiKeys = {})); +class DiscoveryApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[DiscoveryApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.DiscoveryApi = DiscoveryApi; +//# sourceMappingURL=discoveryApi.js.map + +/***/ }), + +/***/ 73289: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiscoveryV1Api = exports.DiscoveryV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var DiscoveryV1ApiApiKeys; +(function (DiscoveryV1ApiApiKeys) { + DiscoveryV1ApiApiKeys[DiscoveryV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(DiscoveryV1ApiApiKeys = exports.DiscoveryV1ApiApiKeys || (exports.DiscoveryV1ApiApiKeys = {})); +class DiscoveryV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[DiscoveryV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create an EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1EndpointSlice") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an EndpointSlice + * @param name name of the EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind EndpointSlice + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/endpointslices'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSliceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSliceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified EndpointSlice + * @param name name of the EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified EndpointSlice + * @param name name of the EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified EndpointSlice + * @param name name of the EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1EndpointSlice") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.DiscoveryV1Api = DiscoveryV1Api; +//# sourceMappingURL=discoveryV1Api.js.map + +/***/ }), + +/***/ 34357: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiscoveryV1beta1Api = exports.DiscoveryV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var DiscoveryV1beta1ApiApiKeys; +(function (DiscoveryV1beta1ApiApiKeys) { + DiscoveryV1beta1ApiApiKeys[DiscoveryV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(DiscoveryV1beta1ApiApiKeys = exports.DiscoveryV1beta1ApiApiKeys || (exports.DiscoveryV1beta1ApiApiKeys = {})); +class DiscoveryV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[DiscoveryV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create an EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1EndpointSlice") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an EndpointSlice + * @param name name of the EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind EndpointSlice + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/endpointslices'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSliceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSliceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified EndpointSlice + * @param name name of the EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified EndpointSlice + * @param name name of the EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified EndpointSlice + * @param name name of the EndpointSlice + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1EndpointSlice") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.DiscoveryV1beta1Api = DiscoveryV1beta1Api; +//# sourceMappingURL=discoveryV1beta1Api.js.map + +/***/ }), + +/***/ 84531: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EventsApi = exports.EventsApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var EventsApiApiKeys; +(function (EventsApiApiKeys) { + EventsApiApiKeys[EventsApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(EventsApiApiKeys = exports.EventsApiApiKeys || (exports.EventsApiApiKeys = {})); +class EventsApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[EventsApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.EventsApi = EventsApi; +//# sourceMappingURL=eventsApi.js.map + +/***/ }), + +/***/ 98965: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EventsV1Api = exports.EventsV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var EventsV1ApiApiKeys; +(function (EventsV1ApiApiKeys) { + EventsV1ApiApiKeys[EventsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(EventsV1ApiApiKeys = exports.EventsV1ApiApiKeys || (exports.EventsV1ApiApiKeys = {})); +class EventsV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[EventsV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create an Event + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "EventsV1Event") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Event + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1/events'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "EventsV1EventList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "EventsV1EventList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "EventsV1Event") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.EventsV1Api = EventsV1Api; +//# sourceMappingURL=eventsV1Api.js.map + +/***/ }), + +/***/ 15574: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EventsV1beta1Api = exports.EventsV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var EventsV1beta1ApiApiKeys; +(function (EventsV1beta1ApiApiKeys) { + EventsV1beta1ApiApiKeys[EventsV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(EventsV1beta1ApiApiKeys = exports.EventsV1beta1ApiApiKeys || (exports.EventsV1beta1ApiApiKeys = {})); +class EventsV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[EventsV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create an Event + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1Event") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Event + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/events'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1EventList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1EventList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Event + * @param name name of the Event + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1Event") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.EventsV1beta1Api = EventsV1beta1Api; +//# sourceMappingURL=eventsV1beta1Api.js.map + +/***/ }), + +/***/ 35605: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsApi = exports.ExtensionsApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var ExtensionsApiApiKeys; +(function (ExtensionsApiApiKeys) { + ExtensionsApiApiKeys[ExtensionsApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(ExtensionsApiApiKeys = exports.ExtensionsApiApiKeys || (exports.ExtensionsApiApiKeys = {})); +class ExtensionsApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[ExtensionsApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.ExtensionsApi = ExtensionsApi; +//# sourceMappingURL=extensionsApi.js.map + +/***/ }), + +/***/ 45598: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1Api = exports.ExtensionsV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var ExtensionsV1beta1ApiApiKeys; +(function (ExtensionsV1beta1ApiApiKeys) { + ExtensionsV1beta1ApiApiKeys[ExtensionsV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(ExtensionsV1beta1ApiApiKeys = exports.ExtensionsV1beta1ApiApiKeys || (exports.ExtensionsV1beta1ApiApiKeys = {})); +class ExtensionsV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[ExtensionsV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create an Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedIngress.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "ExtensionsV1beta1Ingress") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "ExtensionsV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Ingress + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/ingresses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "ExtensionsV1beta1IngressList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "ExtensionsV1beta1IngressList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngress.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "ExtensionsV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngressStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngressStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngressStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "ExtensionsV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedIngress(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "ExtensionsV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedIngressStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngressStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "ExtensionsV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngress.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "ExtensionsV1beta1Ingress") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "ExtensionsV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngressStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngressStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngressStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "ExtensionsV1beta1Ingress") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "ExtensionsV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.ExtensionsV1beta1Api = ExtensionsV1beta1Api; +//# sourceMappingURL=extensionsV1beta1Api.js.map + +/***/ }), + +/***/ 93444: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FlowcontrolApiserverApi = exports.FlowcontrolApiserverApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var FlowcontrolApiserverApiApiKeys; +(function (FlowcontrolApiserverApiApiKeys) { + FlowcontrolApiserverApiApiKeys[FlowcontrolApiserverApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(FlowcontrolApiserverApiApiKeys = exports.FlowcontrolApiserverApiApiKeys || (exports.FlowcontrolApiserverApiApiKeys = {})); +class FlowcontrolApiserverApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[FlowcontrolApiserverApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.FlowcontrolApiserverApi = FlowcontrolApiserverApi; +//# sourceMappingURL=flowcontrolApiserverApi.js.map + +/***/ }), + +/***/ 11259: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FlowcontrolApiserverV1beta1Api = exports.FlowcontrolApiserverV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var FlowcontrolApiserverV1beta1ApiApiKeys; +(function (FlowcontrolApiserverV1beta1ApiApiKeys) { + FlowcontrolApiserverV1beta1ApiApiKeys[FlowcontrolApiserverV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(FlowcontrolApiserverV1beta1ApiApiKeys = exports.FlowcontrolApiserverV1beta1ApiApiKeys || (exports.FlowcontrolApiserverV1beta1ApiApiKeys = {})); +class FlowcontrolApiserverV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[FlowcontrolApiserverV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a FlowSchema + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createFlowSchema(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createFlowSchema.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a PriorityLevelConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createPriorityLevelConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of FlowSchema + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionFlowSchema(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PriorityLevelConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionPriorityLevelConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a FlowSchema + * @param name name of the FlowSchema + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteFlowSchema(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteFlowSchema.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PriorityLevelConfiguration + * @param name name of the PriorityLevelConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deletePriorityLevelConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deletePriorityLevelConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind FlowSchema + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listFlowSchema(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchemaList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PriorityLevelConfiguration + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPriorityLevelConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfigurationList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified FlowSchema + * @param name name of the FlowSchema + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchFlowSchema(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchFlowSchema.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchFlowSchema.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified FlowSchema + * @param name name of the FlowSchema + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchFlowSchemaStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchFlowSchemaStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PriorityLevelConfiguration + * @param name name of the PriorityLevelConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchPriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified PriorityLevelConfiguration + * @param name name of the PriorityLevelConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchPriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfigurationStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfigurationStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified FlowSchema + * @param name name of the FlowSchema + * @param pretty If \'true\', then the output is pretty printed. + */ + async readFlowSchema(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readFlowSchema.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified FlowSchema + * @param name name of the FlowSchema + * @param pretty If \'true\', then the output is pretty printed. + */ + async readFlowSchemaStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readFlowSchemaStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PriorityLevelConfiguration + * @param name name of the PriorityLevelConfiguration + * @param pretty If \'true\', then the output is pretty printed. + */ + async readPriorityLevelConfiguration(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified PriorityLevelConfiguration + * @param name name of the PriorityLevelConfiguration + * @param pretty If \'true\', then the output is pretty printed. + */ + async readPriorityLevelConfigurationStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfigurationStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified FlowSchema + * @param name name of the FlowSchema + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceFlowSchema(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceFlowSchema.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceFlowSchema.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified FlowSchema + * @param name name of the FlowSchema + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceFlowSchemaStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceFlowSchemaStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PriorityLevelConfiguration + * @param name name of the PriorityLevelConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfiguration.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfiguration.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified PriorityLevelConfiguration + * @param name name of the PriorityLevelConfiguration + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfigurationStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfigurationStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.FlowcontrolApiserverV1beta1Api = FlowcontrolApiserverV1beta1Api; +//# sourceMappingURL=flowcontrolApiserverV1beta1Api.js.map + +/***/ }), + +/***/ 24890: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InternalApiserverApi = exports.InternalApiserverApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var InternalApiserverApiApiKeys; +(function (InternalApiserverApiApiKeys) { + InternalApiserverApiApiKeys[InternalApiserverApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(InternalApiserverApiApiKeys = exports.InternalApiserverApiApiKeys || (exports.InternalApiserverApiApiKeys = {})); +class InternalApiserverApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[InternalApiserverApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.InternalApiserverApi = InternalApiserverApi; +//# sourceMappingURL=internalApiserverApi.js.map + +/***/ }), + +/***/ 13246: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InternalApiserverV1alpha1Api = exports.InternalApiserverV1alpha1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var InternalApiserverV1alpha1ApiApiKeys; +(function (InternalApiserverV1alpha1ApiApiKeys) { + InternalApiserverV1alpha1ApiApiKeys[InternalApiserverV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(InternalApiserverV1alpha1ApiApiKeys = exports.InternalApiserverV1alpha1ApiApiKeys || (exports.InternalApiserverV1alpha1ApiApiKeys = {})); +class InternalApiserverV1alpha1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[InternalApiserverV1alpha1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a StorageVersion + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createStorageVersion(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createStorageVersion.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of StorageVersion + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionStorageVersion(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a StorageVersion + * @param name name of the StorageVersion + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteStorageVersion(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteStorageVersion.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind StorageVersion + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listStorageVersion(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified StorageVersion + * @param name name of the StorageVersion + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchStorageVersion(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchStorageVersion.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchStorageVersion.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified StorageVersion + * @param name name of the StorageVersion + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchStorageVersionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchStorageVersionStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchStorageVersionStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified StorageVersion + * @param name name of the StorageVersion + * @param pretty If \'true\', then the output is pretty printed. + */ + async readStorageVersion(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readStorageVersion.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified StorageVersion + * @param name name of the StorageVersion + * @param pretty If \'true\', then the output is pretty printed. + */ + async readStorageVersionStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readStorageVersionStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified StorageVersion + * @param name name of the StorageVersion + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceStorageVersion(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceStorageVersion.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceStorageVersion.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified StorageVersion + * @param name name of the StorageVersion + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceStorageVersionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceStorageVersionStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceStorageVersionStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.InternalApiserverV1alpha1Api = InternalApiserverV1alpha1Api; +//# sourceMappingURL=internalApiserverV1alpha1Api.js.map + +/***/ }), + +/***/ 41430: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LogsApi = exports.LogsApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +/* tslint:disable:no-unused-locals */ +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var LogsApiApiKeys; +(function (LogsApiApiKeys) { + LogsApiApiKeys[LogsApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(LogsApiApiKeys = exports.LogsApiApiKeys || (exports.LogsApiApiKeys = {})); +class LogsApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[LogsApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * + * @param logpath path to the log + */ + async logFileHandler(logpath, options = { headers: {} }) { + const localVarPath = this.basePath + '/logs/{logpath}' + .replace('{' + 'logpath' + '}', encodeURIComponent(String(logpath))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + let localVarFormParams = {}; + // verify required parameter 'logpath' is not null or undefined + if (logpath === null || logpath === undefined) { + throw new Error('Required parameter logpath was null or undefined when calling logFileHandler.'); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + */ + async logFileListHandler(options = { headers: {} }) { + const localVarPath = this.basePath + '/logs/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.LogsApi = LogsApi; +//# sourceMappingURL=logsApi.js.map + +/***/ }), + +/***/ 23319: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingApi = exports.NetworkingApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var NetworkingApiApiKeys; +(function (NetworkingApiApiKeys) { + NetworkingApiApiKeys[NetworkingApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(NetworkingApiApiKeys = exports.NetworkingApiApiKeys || (exports.NetworkingApiApiKeys = {})); +class NetworkingApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[NetworkingApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.NetworkingApi = NetworkingApi; +//# sourceMappingURL=networkingApi.js.map + +/***/ }), + +/***/ 95108: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1Api = exports.NetworkingV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var NetworkingV1ApiApiKeys; +(function (NetworkingV1ApiApiKeys) { + NetworkingV1ApiApiKeys[NetworkingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(NetworkingV1ApiApiKeys = exports.NetworkingV1ApiApiKeys || (exports.NetworkingV1ApiApiKeys = {})); +class NetworkingV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[NetworkingV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create an IngressClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createIngressClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1IngressClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create an Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedIngress.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Ingress") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a NetworkPolicy + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedNetworkPolicy(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedNetworkPolicy.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedNetworkPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1NetworkPolicy") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of IngressClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of NetworkPolicy + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedNetworkPolicy(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedNetworkPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an IngressClass + * @param name name of the IngressClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a NetworkPolicy + * @param name name of the NetworkPolicy + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedNetworkPolicy(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedNetworkPolicy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedNetworkPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind IngressClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1IngressClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Ingress + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingresses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1IngressList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1IngressList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind NetworkPolicy + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedNetworkPolicy(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedNetworkPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicyList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind NetworkPolicy + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNetworkPolicyForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/networkpolicies'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicyList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified IngressClass + * @param name name of the IngressClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchIngressClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchIngressClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngress.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngressStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngressStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngressStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified NetworkPolicy + * @param name name of the NetworkPolicy + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedNetworkPolicy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedNetworkPolicy.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedNetworkPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified IngressClass + * @param name name of the IngressClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readIngressClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedIngress(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedIngressStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngressStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified NetworkPolicy + * @param name name of the NetworkPolicy + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedNetworkPolicy(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedNetworkPolicy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedNetworkPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified IngressClass + * @param name name of the IngressClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceIngressClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceIngressClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1IngressClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngress.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Ingress") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngressStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngressStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngressStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Ingress") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified NetworkPolicy + * @param name name of the NetworkPolicy + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedNetworkPolicy.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedNetworkPolicy.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedNetworkPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1NetworkPolicy") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.NetworkingV1Api = NetworkingV1Api; +//# sourceMappingURL=networkingV1Api.js.map + +/***/ }), + +/***/ 68386: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1Api = exports.NetworkingV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var NetworkingV1beta1ApiApiKeys; +(function (NetworkingV1beta1ApiApiKeys) { + NetworkingV1beta1ApiApiKeys[NetworkingV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(NetworkingV1beta1ApiApiKeys = exports.NetworkingV1beta1ApiApiKeys || (exports.NetworkingV1beta1ApiApiKeys = {})); +class NetworkingV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[NetworkingV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create an IngressClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createIngressClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/ingressclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1IngressClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1IngressClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create an Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedIngress.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "NetworkingV1beta1Ingress") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "NetworkingV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of IngressClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/ingressclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an IngressClass + * @param name name of the IngressClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/ingressclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete an Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind IngressClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/ingressclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1IngressClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Ingress + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/ingresses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "NetworkingV1beta1IngressList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "NetworkingV1beta1IngressList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified IngressClass + * @param name name of the IngressClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchIngressClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/ingressclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchIngressClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1IngressClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngress.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "NetworkingV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngressStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngressStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngressStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "NetworkingV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified IngressClass + * @param name name of the IngressClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readIngressClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/ingressclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1IngressClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedIngress(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "NetworkingV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedIngressStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngressStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "NetworkingV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified IngressClass + * @param name name of the IngressClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceIngressClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/ingressclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceIngressClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceIngressClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1IngressClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1IngressClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngress.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngress.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngress.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "NetworkingV1beta1Ingress") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "NetworkingV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified Ingress + * @param name name of the Ingress + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngressStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngressStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngressStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "NetworkingV1beta1Ingress") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "NetworkingV1beta1Ingress"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.NetworkingV1beta1Api = NetworkingV1beta1Api; +//# sourceMappingURL=networkingV1beta1Api.js.map + +/***/ }), + +/***/ 8218: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeApi = exports.NodeApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var NodeApiApiKeys; +(function (NodeApiApiKeys) { + NodeApiApiKeys[NodeApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(NodeApiApiKeys = exports.NodeApiApiKeys || (exports.NodeApiApiKeys = {})); +class NodeApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[NodeApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.NodeApi = NodeApi; +//# sourceMappingURL=nodeApi.js.map + +/***/ }), + +/***/ 76493: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeV1Api = exports.NodeV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var NodeV1ApiApiKeys; +(function (NodeV1ApiApiKeys) { + NodeV1ApiApiKeys[NodeV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(NodeV1ApiApiKeys = exports.NodeV1ApiApiKeys || (exports.NodeV1ApiApiKeys = {})); +class NodeV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[NodeV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a RuntimeClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1RuntimeClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a RuntimeClass + * @param name name of the RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified RuntimeClass + * @param name name of the RuntimeClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified RuntimeClass + * @param name name of the RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readRuntimeClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified RuntimeClass + * @param name name of the RuntimeClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1RuntimeClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.NodeV1Api = NodeV1Api; +//# sourceMappingURL=nodeV1Api.js.map + +/***/ }), + +/***/ 16245: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeV1alpha1Api = exports.NodeV1alpha1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var NodeV1alpha1ApiApiKeys; +(function (NodeV1alpha1ApiApiKeys) { + NodeV1alpha1ApiApiKeys[NodeV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(NodeV1alpha1ApiApiKeys = exports.NodeV1alpha1ApiApiKeys || (exports.NodeV1alpha1ApiApiKeys = {})); +class NodeV1alpha1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[NodeV1alpha1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a RuntimeClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1RuntimeClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a RuntimeClass + * @param name name of the RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified RuntimeClass + * @param name name of the RuntimeClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified RuntimeClass + * @param name name of the RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readRuntimeClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified RuntimeClass + * @param name name of the RuntimeClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1RuntimeClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.NodeV1alpha1Api = NodeV1alpha1Api; +//# sourceMappingURL=nodeV1alpha1Api.js.map + +/***/ }), + +/***/ 9052: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeV1beta1Api = exports.NodeV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var NodeV1beta1ApiApiKeys; +(function (NodeV1beta1ApiApiKeys) { + NodeV1beta1ApiApiKeys[NodeV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(NodeV1beta1ApiApiKeys = exports.NodeV1beta1ApiApiKeys || (exports.NodeV1beta1ApiApiKeys = {})); +class NodeV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[NodeV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a RuntimeClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1RuntimeClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a RuntimeClass + * @param name name of the RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified RuntimeClass + * @param name name of the RuntimeClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified RuntimeClass + * @param name name of the RuntimeClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readRuntimeClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified RuntimeClass + * @param name name of the RuntimeClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1RuntimeClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.NodeV1beta1Api = NodeV1beta1Api; +//# sourceMappingURL=nodeV1beta1Api.js.map + +/***/ }), + +/***/ 81378: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OpenidApi = exports.OpenidApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +/* tslint:disable:no-unused-locals */ +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var OpenidApiApiKeys; +(function (OpenidApiApiKeys) { + OpenidApiApiKeys[OpenidApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(OpenidApiApiKeys = exports.OpenidApiApiKeys || (exports.OpenidApiApiKeys = {})); +class OpenidApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[OpenidApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get service account issuer OpenID JSON Web Key Set (contains public token verification keys) + */ + async getServiceAccountIssuerOpenIDKeyset(options = { headers: {} }) { + const localVarPath = this.basePath + '/openid/v1/jwks/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/jwk-set+json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.OpenidApi = OpenidApi; +//# sourceMappingURL=openidApi.js.map + +/***/ }), + +/***/ 70762: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PolicyApi = exports.PolicyApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var PolicyApiApiKeys; +(function (PolicyApiApiKeys) { + PolicyApiApiKeys[PolicyApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(PolicyApiApiKeys = exports.PolicyApiApiKeys || (exports.PolicyApiApiKeys = {})); +class PolicyApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[PolicyApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.PolicyApi = PolicyApi; +//# sourceMappingURL=policyApi.js.map + +/***/ }), + +/***/ 8822: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PolicyV1Api = exports.PolicyV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var PolicyV1ApiApiKeys; +(function (PolicyV1ApiApiKeys) { + PolicyV1ApiApiKeys[PolicyV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(PolicyV1ApiApiKeys = exports.PolicyV1ApiApiKeys || (exports.PolicyV1ApiApiKeys = {})); +class PolicyV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[PolicyV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudgetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PodDisruptionBudget + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/poddisruptionbudgets'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudgetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.PolicyV1Api = PolicyV1Api; +//# sourceMappingURL=policyV1Api.js.map + +/***/ }), + +/***/ 99420: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PolicyV1beta1Api = exports.PolicyV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var PolicyV1beta1ApiApiKeys; +(function (PolicyV1beta1ApiApiKeys) { + PolicyV1beta1ApiApiKeys[PolicyV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(PolicyV1beta1ApiApiKeys = exports.PolicyV1beta1ApiApiKeys || (exports.PolicyV1beta1ApiApiKeys = {})); +class PolicyV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[PolicyV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a PodSecurityPolicy + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createPodSecurityPolicy(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createPodSecurityPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PodSecurityPolicy") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PodSecurityPolicy + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionPodSecurityPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PodSecurityPolicy + * @param name name of the PodSecurityPolicy + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deletePodSecurityPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deletePodSecurityPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PodDisruptionBudget + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/poddisruptionbudgets'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PodSecurityPolicy + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPodSecurityPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicyList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PodSecurityPolicy + * @param name name of the PodSecurityPolicy + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchPodSecurityPolicy(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchPodSecurityPolicy.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchPodSecurityPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PodSecurityPolicy + * @param name name of the PodSecurityPolicy + * @param pretty If \'true\', then the output is pretty printed. + */ + async readPodSecurityPolicy(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readPodSecurityPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified PodDisruptionBudget + * @param name name of the PodDisruptionBudget + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PodSecurityPolicy + * @param name name of the PodSecurityPolicy + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replacePodSecurityPolicy(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replacePodSecurityPolicy.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replacePodSecurityPolicy.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PodSecurityPolicy") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.PolicyV1beta1Api = PolicyV1beta1Api; +//# sourceMappingURL=policyV1beta1Api.js.map + +/***/ }), + +/***/ 93735: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RbacAuthorizationApi = exports.RbacAuthorizationApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var RbacAuthorizationApiApiKeys; +(function (RbacAuthorizationApiApiKeys) { + RbacAuthorizationApiApiKeys[RbacAuthorizationApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(RbacAuthorizationApiApiKeys = exports.RbacAuthorizationApiApiKeys || (exports.RbacAuthorizationApiApiKeys = {})); +class RbacAuthorizationApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[RbacAuthorizationApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.RbacAuthorizationApi = RbacAuthorizationApi; +//# sourceMappingURL=rbacAuthorizationApi.js.map + +/***/ }), + +/***/ 45450: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RbacAuthorizationV1Api = exports.RbacAuthorizationV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var RbacAuthorizationV1ApiApiKeys; +(function (RbacAuthorizationV1ApiApiKeys) { + RbacAuthorizationV1ApiApiKeys[RbacAuthorizationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(RbacAuthorizationV1ApiApiKeys = exports.RbacAuthorizationV1ApiApiKeys || (exports.RbacAuthorizationV1ApiApiKeys = {})); +class RbacAuthorizationV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[RbacAuthorizationV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a ClusterRole + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ClusterRole") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ClusterRoleBinding + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ClusterRoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Role + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Role") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1RoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ClusterRole + * @param name name of the ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBindingList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RoleList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RoleBindingList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind RoleBinding + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/rolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RoleBindingList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Role + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/roles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RoleList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ClusterRole + * @param name name of the ClusterRole + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchClusterRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ClusterRole + * @param name name of the ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + */ + async readClusterRole(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + */ + async readClusterRoleBinding(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ClusterRole + * @param name name of the ClusterRole + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ClusterRole") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1ClusterRoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1Role") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1RoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.RbacAuthorizationV1Api = RbacAuthorizationV1Api; +//# sourceMappingURL=rbacAuthorizationV1Api.js.map + +/***/ }), + +/***/ 78874: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RbacAuthorizationV1alpha1Api = exports.RbacAuthorizationV1alpha1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var RbacAuthorizationV1alpha1ApiApiKeys; +(function (RbacAuthorizationV1alpha1ApiApiKeys) { + RbacAuthorizationV1alpha1ApiApiKeys[RbacAuthorizationV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(RbacAuthorizationV1alpha1ApiApiKeys = exports.RbacAuthorizationV1alpha1ApiApiKeys || (exports.RbacAuthorizationV1alpha1ApiApiKeys = {})); +class RbacAuthorizationV1alpha1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[RbacAuthorizationV1alpha1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a ClusterRole + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRole") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ClusterRoleBinding + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Role + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1Role") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1RoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ClusterRole + * @param name name of the ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBindingList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind RoleBinding + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Role + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/roles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ClusterRole + * @param name name of the ClusterRole + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchClusterRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ClusterRole + * @param name name of the ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + */ + async readClusterRole(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + */ + async readClusterRoleBinding(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ClusterRole + * @param name name of the ClusterRole + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRole") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1Role") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1RoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.RbacAuthorizationV1alpha1Api = RbacAuthorizationV1alpha1Api; +//# sourceMappingURL=rbacAuthorizationV1alpha1Api.js.map + +/***/ }), + +/***/ 31999: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RbacAuthorizationV1beta1Api = exports.RbacAuthorizationV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var RbacAuthorizationV1beta1ApiApiKeys; +(function (RbacAuthorizationV1beta1ApiApiKeys) { + RbacAuthorizationV1beta1ApiApiKeys[RbacAuthorizationV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(RbacAuthorizationV1beta1ApiApiKeys = exports.RbacAuthorizationV1beta1ApiApiKeys || (exports.RbacAuthorizationV1beta1ApiApiKeys = {})); +class RbacAuthorizationV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[RbacAuthorizationV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a ClusterRole + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1ClusterRole") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a ClusterRoleBinding + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1ClusterRoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a Role + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1Role") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1RoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ClusterRole + * @param name name of the ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRoleList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBindingList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RoleList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RoleBindingList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind RoleBinding + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/rolebindings'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RoleBindingList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind Role + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/roles'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RoleList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ClusterRole + * @param name name of the ClusterRole + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchClusterRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ClusterRole + * @param name name of the ClusterRole + * @param pretty If \'true\', then the output is pretty printed. + */ + async readClusterRole(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param pretty If \'true\', then the output is pretty printed. + */ + async readClusterRoleBinding(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ClusterRole + * @param name name of the ClusterRole + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1ClusterRole") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRole"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified ClusterRoleBinding + * @param name name of the ClusterRoleBinding + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1ClusterRoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified Role + * @param name name of the Role + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1Role") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1Role"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified RoleBinding + * @param name name of the RoleBinding + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1RoleBinding") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1RoleBinding"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.RbacAuthorizationV1beta1Api = RbacAuthorizationV1beta1Api; +//# sourceMappingURL=rbacAuthorizationV1beta1Api.js.map + +/***/ }), + +/***/ 7847: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SchedulingApi = exports.SchedulingApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var SchedulingApiApiKeys; +(function (SchedulingApiApiKeys) { + SchedulingApiApiKeys[SchedulingApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(SchedulingApiApiKeys = exports.SchedulingApiApiKeys || (exports.SchedulingApiApiKeys = {})); +class SchedulingApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[SchedulingApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.SchedulingApi = SchedulingApi; +//# sourceMappingURL=schedulingApi.js.map + +/***/ }), + +/***/ 14806: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SchedulingV1Api = exports.SchedulingV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var SchedulingV1ApiApiKeys; +(function (SchedulingV1ApiApiKeys) { + SchedulingV1ApiApiKeys[SchedulingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(SchedulingV1ApiApiKeys = exports.SchedulingV1ApiApiKeys || (exports.SchedulingV1ApiApiKeys = {})); +class SchedulingV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[SchedulingV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a PriorityClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createPriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PriorityClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PriorityClass + * @param name name of the PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PriorityClass + * @param name name of the PriorityClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PriorityClass + * @param name name of the PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readPriorityClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readPriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PriorityClass + * @param name name of the PriorityClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1PriorityClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.SchedulingV1Api = SchedulingV1Api; +//# sourceMappingURL=schedulingV1Api.js.map + +/***/ }), + +/***/ 33509: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SchedulingV1alpha1Api = exports.SchedulingV1alpha1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var SchedulingV1alpha1ApiApiKeys; +(function (SchedulingV1alpha1ApiApiKeys) { + SchedulingV1alpha1ApiApiKeys[SchedulingV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(SchedulingV1alpha1ApiApiKeys = exports.SchedulingV1alpha1ApiApiKeys || (exports.SchedulingV1alpha1ApiApiKeys = {})); +class SchedulingV1alpha1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[SchedulingV1alpha1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a PriorityClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createPriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1PriorityClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PriorityClass + * @param name name of the PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PriorityClass + * @param name name of the PriorityClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PriorityClass + * @param name name of the PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readPriorityClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readPriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PriorityClass + * @param name name of the PriorityClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1PriorityClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.SchedulingV1alpha1Api = SchedulingV1alpha1Api; +//# sourceMappingURL=schedulingV1alpha1Api.js.map + +/***/ }), + +/***/ 55255: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SchedulingV1beta1Api = exports.SchedulingV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var SchedulingV1beta1ApiApiKeys; +(function (SchedulingV1beta1ApiApiKeys) { + SchedulingV1beta1ApiApiKeys[SchedulingV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(SchedulingV1beta1ApiApiKeys = exports.SchedulingV1beta1ApiApiKeys || (exports.SchedulingV1beta1ApiApiKeys = {})); +class SchedulingV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[SchedulingV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a PriorityClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createPriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a PriorityClass + * @param name name of the PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified PriorityClass + * @param name name of the PriorityClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified PriorityClass + * @param name name of the PriorityClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readPriorityClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readPriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified PriorityClass + * @param name name of the PriorityClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.SchedulingV1beta1Api = SchedulingV1beta1Api; +//# sourceMappingURL=schedulingV1beta1Api.js.map + +/***/ }), + +/***/ 25132: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageApi = exports.StorageApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var StorageApiApiKeys; +(function (StorageApiApiKeys) { + StorageApiApiKeys[StorageApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(StorageApiApiKeys = exports.StorageApiApiKeys || (exports.StorageApiApiKeys = {})); +class StorageApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[StorageApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get information of a group + */ + async getAPIGroup(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.StorageApi = StorageApi; +//# sourceMappingURL=storageApi.js.map + +/***/ }), + +/***/ 28814: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageV1Api = exports.StorageV1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var StorageV1ApiApiKeys; +(function (StorageV1ApiApiKeys) { + StorageV1ApiApiKeys[StorageV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(StorageV1ApiApiKeys = exports.StorageV1ApiApiKeys || (exports.StorageV1ApiApiKeys = {})); +class StorageV1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[StorageV1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a CSIDriver + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createCSIDriver(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CSIDriver") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a CSINode + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createCSINode(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CSINode") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a StorageClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createStorageClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1StorageClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CSIDriver + * @param name name of the CSIDriver + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CSINode + * @param name name of the CSINode + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CSIDriver + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CSINode + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of StorageClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a StorageClass + * @param name name of the StorageClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a VolumeAttachment + * @param name name of the VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CSIDriver + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriverList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CSINode + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSINodeList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind StorageClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StorageClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachmentList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CSIDriver + * @param name name of the CSIDriver + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCSIDriver(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCSIDriver.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CSINode + * @param name name of the CSINode + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCSINode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCSINode.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified StorageClass + * @param name name of the StorageClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchStorageClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchStorageClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update status of the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachmentStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachmentStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CSIDriver + * @param name name of the CSIDriver + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCSIDriver(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CSINode + * @param name name of the CSINode + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCSINode(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified StorageClass + * @param name name of the StorageClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readStorageClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + */ + async readVolumeAttachment(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read status of the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + */ + async readVolumeAttachmentStatus(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readVolumeAttachmentStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CSIDriver + * @param name name of the CSIDriver + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCSIDriver(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCSIDriver.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CSIDriver") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CSINode + * @param name name of the CSINode + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCSINode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCSINode.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1CSINode") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified StorageClass + * @param name name of the StorageClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceStorageClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceStorageClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1StorageClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace status of the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachmentStatus.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachmentStatus.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.StorageV1Api = StorageV1Api; +//# sourceMappingURL=storageV1Api.js.map + +/***/ }), + +/***/ 45265: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageV1alpha1Api = exports.StorageV1alpha1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var StorageV1alpha1ApiApiKeys; +(function (StorageV1alpha1ApiApiKeys) { + StorageV1alpha1ApiApiKeys[StorageV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(StorageV1alpha1ApiApiKeys = exports.StorageV1alpha1ApiApiKeys || (exports.StorageV1alpha1ApiApiKeys = {})); +class StorageV1alpha1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[StorageV1alpha1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1CSIStorageCapacity") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CSIStorageCapacity + * @param name name of the CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a VolumeAttachment + * @param name name of the VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CSIStorageCapacity + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/csistoragecapacities'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacityList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacityList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachmentList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CSIStorageCapacity + * @param name name of the CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CSIStorageCapacity + * @param name name of the CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + */ + async readVolumeAttachment(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CSIStorageCapacity + * @param name name of the CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1CSIStorageCapacity") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.StorageV1alpha1Api = StorageV1alpha1Api; +//# sourceMappingURL=storageV1alpha1Api.js.map + +/***/ }), + +/***/ 40564: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageV1beta1Api = exports.StorageV1beta1ApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var StorageV1beta1ApiApiKeys; +(function (StorageV1beta1ApiApiKeys) { + StorageV1beta1ApiApiKeys[StorageV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(StorageV1beta1ApiApiKeys = exports.StorageV1beta1ApiApiKeys || (exports.StorageV1beta1ApiApiKeys = {})); +class StorageV1beta1Api { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[StorageV1beta1ApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * create a CSIDriver + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createCSIDriver(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csidrivers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIDriver") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a CSINode + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createCSINode(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csinodes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CSINode") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIStorageCapacity") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a StorageClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createStorageClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1StorageClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * create a VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1VolumeAttachment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CSIDriver + * @param name name of the CSIDriver + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csidrivers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CSINode + * @param name name of the CSINode + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csinodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CSIDriver + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csidrivers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CSINode + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csinodes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of StorageClass + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete collection of VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param body + */ + async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a CSIStorageCapacity + * @param name name of the CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1Status"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a StorageClass + * @param name name of the StorageClass + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * delete a VolumeAttachment + * @param name name of the VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. + * @param body + */ + async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); + } + if (orphanDependents !== undefined) { + localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * get available resources + */ + async getAPIResources(options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CSIDriver + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csidrivers'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIDriverList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CSINode + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csinodes'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSINodeList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CSIStorageCapacity + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param pretty If \'true\', then the output is pretty printed. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csistoragecapacities'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacityList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities' + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacityList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind StorageClass + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1StorageClassList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * list or watch objects of kind VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + */ + async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (allowWatchBookmarks !== undefined) { + localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); + } + if (_continue !== undefined) { + localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); + } + if (fieldSelector !== undefined) { + localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); + } + if (labelSelector !== undefined) { + localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); + } + if (limit !== undefined) { + localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); + } + if (resourceVersion !== undefined) { + localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); + } + if (resourceVersionMatch !== undefined) { + localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); + } + if (timeoutSeconds !== undefined) { + localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); + } + if (watch !== undefined) { + localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1VolumeAttachmentList"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CSIDriver + * @param name name of the CSIDriver + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCSIDriver(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csidrivers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCSIDriver.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CSINode + * @param name name of the CSINode + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchCSINode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csinodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchCSINode.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified CSIStorageCapacity + * @param name name of the CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified StorageClass + * @param name name of the StorageClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchStorageClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchStorageClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * partially update the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + */ + async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + if (force !== undefined) { + localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "object") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CSIDriver + * @param name name of the CSIDriver + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCSIDriver(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csidrivers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CSINode + * @param name name of the CSINode + * @param pretty If \'true\', then the output is pretty printed. + */ + async readCSINode(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csinodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified CSIStorageCapacity + * @param name name of the CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param pretty If \'true\', then the output is pretty printed. + */ + async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified StorageClass + * @param name name of the StorageClass + * @param pretty If \'true\', then the output is pretty printed. + */ + async readStorageClass(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * read the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param pretty If \'true\', then the output is pretty printed. + */ + async readVolumeAttachment(name, pretty, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CSIDriver + * @param name name of the CSIDriver + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCSIDriver(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csidrivers/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCSIDriver.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCSIDriver.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIDriver") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIDriver"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CSINode + * @param name name of the CSINode + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceCSINode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csinodes/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceCSINode.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceCSINode.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CSINode") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSINode"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified CSIStorageCapacity + * @param name name of the CSIStorageCapacity + * @param namespace object name and auth scope, such as for teams and projects + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'namespace' is not null or undefined + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIStorageCapacity") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified StorageClass + * @param name name of the StorageClass + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceStorageClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceStorageClass.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceStorageClass.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1StorageClass") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1StorageClass"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * replace the specified VolumeAttachment + * @param name name of the VolumeAttachment + * @param body + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + */ + async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { + const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.'); + } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.'); + } + if (pretty !== undefined) { + localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); + } + if (dryRun !== undefined) { + localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); + } + if (fieldManager !== undefined) { + localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: models_1.ObjectSerializer.serialize(body, "V1beta1VolumeAttachment") + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "V1beta1VolumeAttachment"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.StorageV1beta1Api = StorageV1beta1Api; +//# sourceMappingURL=storageV1beta1Api.js.map + +/***/ }), + +/***/ 34135: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VersionApi = exports.VersionApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var VersionApiApiKeys; +(function (VersionApiApiKeys) { + VersionApiApiKeys[VersionApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(VersionApiApiKeys = exports.VersionApiApiKeys || (exports.VersionApiApiKeys = {})); +class VersionApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[VersionApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get the code version + */ + async getCode(options = { headers: {} }) { + const localVarPath = this.basePath + '/version/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "VersionInfo"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.VersionApi = VersionApi; +//# sourceMappingURL=versionApi.js.map + +/***/ }), + +/***/ 26088: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.WellKnownApi = exports.WellKnownApiApiKeys = void 0; +const localVarRequest = __nccwpck_require__(32956); +/* tslint:disable:no-unused-locals */ +const models_1 = __nccwpck_require__(82963); +const models_2 = __nccwpck_require__(82963); +const apis_1 = __nccwpck_require__(57678); +let defaultBasePath = 'http://localhost'; +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== +var WellKnownApiApiKeys; +(function (WellKnownApiApiKeys) { + WellKnownApiApiKeys[WellKnownApiApiKeys["BearerToken"] = 0] = "BearerToken"; +})(WellKnownApiApiKeys = exports.WellKnownApiApiKeys || (exports.WellKnownApiApiKeys = {})); +class WellKnownApi { + constructor(basePathOrUsername, password, basePath) { + this._basePath = defaultBasePath; + this._defaultHeaders = {}; + this._useQuerystring = false; + this.authentications = { + 'default': new models_1.VoidAuth(), + 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), + }; + this.interceptors = []; + if (password) { + if (basePath) { + this.basePath = basePath; + } + } + else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername; + } + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key, value) { + this.authentications[WellKnownApiApiKeys[key]].apiKey = value; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * get service account issuer OpenID configuration, also known as the \'OIDC discovery doc\' + */ + async getServiceAccountIssuerOpenIDConfiguration(options = { headers: {} }) { + const localVarPath = this.basePath + '/.well-known/openid-configuration/'; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } + else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams = {}; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; + } + else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = models_1.ObjectSerializer.deserialize(body, "string"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } + else { + reject(new apis_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} +exports.WellKnownApi = WellKnownApi; +//# sourceMappingURL=wellKnownApi.js.map + +/***/ }), + +/***/ 25696: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdmissionregistrationV1ServiceReference = void 0; +/** +* ServiceReference holds a reference to Service.legacy.k8s.io +*/ +class AdmissionregistrationV1ServiceReference { + static getAttributeTypeMap() { + return AdmissionregistrationV1ServiceReference.attributeTypeMap; + } +} +exports.AdmissionregistrationV1ServiceReference = AdmissionregistrationV1ServiceReference; +AdmissionregistrationV1ServiceReference.discriminator = undefined; +AdmissionregistrationV1ServiceReference.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + } +]; +//# sourceMappingURL=admissionregistrationV1ServiceReference.js.map + +/***/ }), + +/***/ 12901: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdmissionregistrationV1WebhookClientConfig = void 0; +/** +* WebhookClientConfig contains the information to make a TLS connection with the webhook +*/ +class AdmissionregistrationV1WebhookClientConfig { + static getAttributeTypeMap() { + return AdmissionregistrationV1WebhookClientConfig.attributeTypeMap; + } +} +exports.AdmissionregistrationV1WebhookClientConfig = AdmissionregistrationV1WebhookClientConfig; +AdmissionregistrationV1WebhookClientConfig.discriminator = undefined; +AdmissionregistrationV1WebhookClientConfig.attributeTypeMap = [ + { + "name": "caBundle", + "baseName": "caBundle", + "type": "string" + }, + { + "name": "service", + "baseName": "service", + "type": "AdmissionregistrationV1ServiceReference" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } +]; +//# sourceMappingURL=admissionregistrationV1WebhookClientConfig.js.map + +/***/ }), + +/***/ 41251: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdmissionregistrationV1beta1ServiceReference = void 0; +/** +* ServiceReference holds a reference to Service.legacy.k8s.io +*/ +class AdmissionregistrationV1beta1ServiceReference { + static getAttributeTypeMap() { + return AdmissionregistrationV1beta1ServiceReference.attributeTypeMap; + } +} +exports.AdmissionregistrationV1beta1ServiceReference = AdmissionregistrationV1beta1ServiceReference; +AdmissionregistrationV1beta1ServiceReference.discriminator = undefined; +AdmissionregistrationV1beta1ServiceReference.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + } +]; +//# sourceMappingURL=admissionregistrationV1beta1ServiceReference.js.map + +/***/ }), + +/***/ 12449: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdmissionregistrationV1beta1WebhookClientConfig = void 0; +/** +* WebhookClientConfig contains the information to make a TLS connection with the webhook +*/ +class AdmissionregistrationV1beta1WebhookClientConfig { + static getAttributeTypeMap() { + return AdmissionregistrationV1beta1WebhookClientConfig.attributeTypeMap; + } +} +exports.AdmissionregistrationV1beta1WebhookClientConfig = AdmissionregistrationV1beta1WebhookClientConfig; +AdmissionregistrationV1beta1WebhookClientConfig.discriminator = undefined; +AdmissionregistrationV1beta1WebhookClientConfig.attributeTypeMap = [ + { + "name": "caBundle", + "baseName": "caBundle", + "type": "string" + }, + { + "name": "service", + "baseName": "service", + "type": "AdmissionregistrationV1beta1ServiceReference" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } +]; +//# sourceMappingURL=admissionregistrationV1beta1WebhookClientConfig.js.map + +/***/ }), + +/***/ 98332: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiextensionsV1ServiceReference = void 0; +/** +* ServiceReference holds a reference to Service.legacy.k8s.io +*/ +class ApiextensionsV1ServiceReference { + static getAttributeTypeMap() { + return ApiextensionsV1ServiceReference.attributeTypeMap; + } +} +exports.ApiextensionsV1ServiceReference = ApiextensionsV1ServiceReference; +ApiextensionsV1ServiceReference.discriminator = undefined; +ApiextensionsV1ServiceReference.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + } +]; +//# sourceMappingURL=apiextensionsV1ServiceReference.js.map + +/***/ }), + +/***/ 32221: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiextensionsV1WebhookClientConfig = void 0; +/** +* WebhookClientConfig contains the information to make a TLS connection with the webhook. +*/ +class ApiextensionsV1WebhookClientConfig { + static getAttributeTypeMap() { + return ApiextensionsV1WebhookClientConfig.attributeTypeMap; + } +} +exports.ApiextensionsV1WebhookClientConfig = ApiextensionsV1WebhookClientConfig; +ApiextensionsV1WebhookClientConfig.discriminator = undefined; +ApiextensionsV1WebhookClientConfig.attributeTypeMap = [ + { + "name": "caBundle", + "baseName": "caBundle", + "type": "string" + }, + { + "name": "service", + "baseName": "service", + "type": "ApiextensionsV1ServiceReference" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } +]; +//# sourceMappingURL=apiextensionsV1WebhookClientConfig.js.map + +/***/ }), + +/***/ 26400: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiextensionsV1beta1ServiceReference = void 0; +/** +* ServiceReference holds a reference to Service.legacy.k8s.io +*/ +class ApiextensionsV1beta1ServiceReference { + static getAttributeTypeMap() { + return ApiextensionsV1beta1ServiceReference.attributeTypeMap; + } +} +exports.ApiextensionsV1beta1ServiceReference = ApiextensionsV1beta1ServiceReference; +ApiextensionsV1beta1ServiceReference.discriminator = undefined; +ApiextensionsV1beta1ServiceReference.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + } +]; +//# sourceMappingURL=apiextensionsV1beta1ServiceReference.js.map + +/***/ }), + +/***/ 12648: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiextensionsV1beta1WebhookClientConfig = void 0; +/** +* WebhookClientConfig contains the information to make a TLS connection with the webhook. +*/ +class ApiextensionsV1beta1WebhookClientConfig { + static getAttributeTypeMap() { + return ApiextensionsV1beta1WebhookClientConfig.attributeTypeMap; + } +} +exports.ApiextensionsV1beta1WebhookClientConfig = ApiextensionsV1beta1WebhookClientConfig; +ApiextensionsV1beta1WebhookClientConfig.discriminator = undefined; +ApiextensionsV1beta1WebhookClientConfig.attributeTypeMap = [ + { + "name": "caBundle", + "baseName": "caBundle", + "type": "string" + }, + { + "name": "service", + "baseName": "service", + "type": "ApiextensionsV1beta1ServiceReference" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } +]; +//# sourceMappingURL=apiextensionsV1beta1WebhookClientConfig.js.map + +/***/ }), + +/***/ 39405: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiregistrationV1ServiceReference = void 0; +/** +* ServiceReference holds a reference to Service.legacy.k8s.io +*/ +class ApiregistrationV1ServiceReference { + static getAttributeTypeMap() { + return ApiregistrationV1ServiceReference.attributeTypeMap; + } +} +exports.ApiregistrationV1ServiceReference = ApiregistrationV1ServiceReference; +ApiregistrationV1ServiceReference.discriminator = undefined; +ApiregistrationV1ServiceReference.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + } +]; +//# sourceMappingURL=apiregistrationV1ServiceReference.js.map + +/***/ }), + +/***/ 44971: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ApiregistrationV1beta1ServiceReference = void 0; +/** +* ServiceReference holds a reference to Service.legacy.k8s.io +*/ +class ApiregistrationV1beta1ServiceReference { + static getAttributeTypeMap() { + return ApiregistrationV1beta1ServiceReference.attributeTypeMap; + } +} +exports.ApiregistrationV1beta1ServiceReference = ApiregistrationV1beta1ServiceReference; +ApiregistrationV1beta1ServiceReference.discriminator = undefined; +ApiregistrationV1beta1ServiceReference.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + } +]; +//# sourceMappingURL=apiregistrationV1beta1ServiceReference.js.map + +/***/ }), + +/***/ 70448: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AuthenticationV1TokenRequest = void 0; +/** +* TokenRequest requests a token for a given service account. +*/ +class AuthenticationV1TokenRequest { + static getAttributeTypeMap() { + return AuthenticationV1TokenRequest.attributeTypeMap; + } +} +exports.AuthenticationV1TokenRequest = AuthenticationV1TokenRequest; +AuthenticationV1TokenRequest.discriminator = undefined; +AuthenticationV1TokenRequest.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1TokenRequestSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1TokenRequestStatus" + } +]; +//# sourceMappingURL=authenticationV1TokenRequest.js.map + +/***/ }), + +/***/ 30630: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CoreV1EndpointPort = void 0; +/** +* EndpointPort is a tuple that describes a single port. +*/ +class CoreV1EndpointPort { + static getAttributeTypeMap() { + return CoreV1EndpointPort.attributeTypeMap; + } +} +exports.CoreV1EndpointPort = CoreV1EndpointPort; +CoreV1EndpointPort.discriminator = undefined; +CoreV1EndpointPort.attributeTypeMap = [ + { + "name": "appProtocol", + "baseName": "appProtocol", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + }, + { + "name": "protocol", + "baseName": "protocol", + "type": "string" + } +]; +//# sourceMappingURL=coreV1EndpointPort.js.map + +/***/ }), + +/***/ 81219: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CoreV1Event = void 0; +/** +* Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. +*/ +class CoreV1Event { + static getAttributeTypeMap() { + return CoreV1Event.attributeTypeMap; + } +} +exports.CoreV1Event = CoreV1Event; +CoreV1Event.discriminator = undefined; +CoreV1Event.attributeTypeMap = [ + { + "name": "action", + "baseName": "action", + "type": "string" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "count", + "baseName": "count", + "type": "number" + }, + { + "name": "eventTime", + "baseName": "eventTime", + "type": "Date" + }, + { + "name": "firstTimestamp", + "baseName": "firstTimestamp", + "type": "Date" + }, + { + "name": "involvedObject", + "baseName": "involvedObject", + "type": "V1ObjectReference" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "lastTimestamp", + "baseName": "lastTimestamp", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "related", + "baseName": "related", + "type": "V1ObjectReference" + }, + { + "name": "reportingComponent", + "baseName": "reportingComponent", + "type": "string" + }, + { + "name": "reportingInstance", + "baseName": "reportingInstance", + "type": "string" + }, + { + "name": "series", + "baseName": "series", + "type": "CoreV1EventSeries" + }, + { + "name": "source", + "baseName": "source", + "type": "V1EventSource" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=coreV1Event.js.map + +/***/ }), + +/***/ 74585: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CoreV1EventList = void 0; +/** +* EventList is a list of events. +*/ +class CoreV1EventList { + static getAttributeTypeMap() { + return CoreV1EventList.attributeTypeMap; + } +} +exports.CoreV1EventList = CoreV1EventList; +CoreV1EventList.discriminator = undefined; +CoreV1EventList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=coreV1EventList.js.map + +/***/ }), + +/***/ 76703: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CoreV1EventSeries = void 0; +/** +* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. +*/ +class CoreV1EventSeries { + static getAttributeTypeMap() { + return CoreV1EventSeries.attributeTypeMap; + } +} +exports.CoreV1EventSeries = CoreV1EventSeries; +CoreV1EventSeries.discriminator = undefined; +CoreV1EventSeries.attributeTypeMap = [ + { + "name": "count", + "baseName": "count", + "type": "number" + }, + { + "name": "lastObservedTime", + "baseName": "lastObservedTime", + "type": "Date" + } +]; +//# sourceMappingURL=coreV1EventSeries.js.map + +/***/ }), + +/***/ 92436: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiscoveryV1EndpointPort = void 0; +/** +* EndpointPort represents a Port used by an EndpointSlice +*/ +class DiscoveryV1EndpointPort { + static getAttributeTypeMap() { + return DiscoveryV1EndpointPort.attributeTypeMap; + } +} +exports.DiscoveryV1EndpointPort = DiscoveryV1EndpointPort; +DiscoveryV1EndpointPort.discriminator = undefined; +DiscoveryV1EndpointPort.attributeTypeMap = [ + { + "name": "appProtocol", + "baseName": "appProtocol", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + }, + { + "name": "protocol", + "baseName": "protocol", + "type": "string" + } +]; +//# sourceMappingURL=discoveryV1EndpointPort.js.map + +/***/ }), + +/***/ 29430: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EventsV1Event = void 0; +/** +* Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. +*/ +class EventsV1Event { + static getAttributeTypeMap() { + return EventsV1Event.attributeTypeMap; + } +} +exports.EventsV1Event = EventsV1Event; +EventsV1Event.discriminator = undefined; +EventsV1Event.attributeTypeMap = [ + { + "name": "action", + "baseName": "action", + "type": "string" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "deprecatedCount", + "baseName": "deprecatedCount", + "type": "number" + }, + { + "name": "deprecatedFirstTimestamp", + "baseName": "deprecatedFirstTimestamp", + "type": "Date" + }, + { + "name": "deprecatedLastTimestamp", + "baseName": "deprecatedLastTimestamp", + "type": "Date" + }, + { + "name": "deprecatedSource", + "baseName": "deprecatedSource", + "type": "V1EventSource" + }, + { + "name": "eventTime", + "baseName": "eventTime", + "type": "Date" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "note", + "baseName": "note", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "regarding", + "baseName": "regarding", + "type": "V1ObjectReference" + }, + { + "name": "related", + "baseName": "related", + "type": "V1ObjectReference" + }, + { + "name": "reportingController", + "baseName": "reportingController", + "type": "string" + }, + { + "name": "reportingInstance", + "baseName": "reportingInstance", + "type": "string" + }, + { + "name": "series", + "baseName": "series", + "type": "EventsV1EventSeries" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=eventsV1Event.js.map + +/***/ }), + +/***/ 94265: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EventsV1EventList = void 0; +/** +* EventList is a list of Event objects. +*/ +class EventsV1EventList { + static getAttributeTypeMap() { + return EventsV1EventList.attributeTypeMap; + } +} +exports.EventsV1EventList = EventsV1EventList; +EventsV1EventList.discriminator = undefined; +EventsV1EventList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=eventsV1EventList.js.map + +/***/ }), + +/***/ 95237: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EventsV1EventSeries = void 0; +/** +* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations. +*/ +class EventsV1EventSeries { + static getAttributeTypeMap() { + return EventsV1EventSeries.attributeTypeMap; + } +} +exports.EventsV1EventSeries = EventsV1EventSeries; +EventsV1EventSeries.discriminator = undefined; +EventsV1EventSeries.attributeTypeMap = [ + { + "name": "count", + "baseName": "count", + "type": "number" + }, + { + "name": "lastObservedTime", + "baseName": "lastObservedTime", + "type": "Date" + } +]; +//# sourceMappingURL=eventsV1EventSeries.js.map + +/***/ }), + +/***/ 94729: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1HTTPIngressPath = void 0; +/** +* HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend. +*/ +class ExtensionsV1beta1HTTPIngressPath { + static getAttributeTypeMap() { + return ExtensionsV1beta1HTTPIngressPath.attributeTypeMap; + } +} +exports.ExtensionsV1beta1HTTPIngressPath = ExtensionsV1beta1HTTPIngressPath; +ExtensionsV1beta1HTTPIngressPath.discriminator = undefined; +ExtensionsV1beta1HTTPIngressPath.attributeTypeMap = [ + { + "name": "backend", + "baseName": "backend", + "type": "ExtensionsV1beta1IngressBackend" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "pathType", + "baseName": "pathType", + "type": "string" + } +]; +//# sourceMappingURL=extensionsV1beta1HTTPIngressPath.js.map + +/***/ }), + +/***/ 52591: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1HTTPIngressRuleValue = void 0; +/** +* HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last \'/\' and before the first \'?\' or \'#\'. +*/ +class ExtensionsV1beta1HTTPIngressRuleValue { + static getAttributeTypeMap() { + return ExtensionsV1beta1HTTPIngressRuleValue.attributeTypeMap; + } +} +exports.ExtensionsV1beta1HTTPIngressRuleValue = ExtensionsV1beta1HTTPIngressRuleValue; +ExtensionsV1beta1HTTPIngressRuleValue.discriminator = undefined; +ExtensionsV1beta1HTTPIngressRuleValue.attributeTypeMap = [ + { + "name": "paths", + "baseName": "paths", + "type": "Array" + } +]; +//# sourceMappingURL=extensionsV1beta1HTTPIngressRuleValue.js.map + +/***/ }), + +/***/ 8171: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1Ingress = void 0; +/** +* Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information. +*/ +class ExtensionsV1beta1Ingress { + static getAttributeTypeMap() { + return ExtensionsV1beta1Ingress.attributeTypeMap; + } +} +exports.ExtensionsV1beta1Ingress = ExtensionsV1beta1Ingress; +ExtensionsV1beta1Ingress.discriminator = undefined; +ExtensionsV1beta1Ingress.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "ExtensionsV1beta1IngressSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "ExtensionsV1beta1IngressStatus" + } +]; +//# sourceMappingURL=extensionsV1beta1Ingress.js.map + +/***/ }), + +/***/ 3220: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1IngressBackend = void 0; +/** +* IngressBackend describes all endpoints for a given service and port. +*/ +class ExtensionsV1beta1IngressBackend { + static getAttributeTypeMap() { + return ExtensionsV1beta1IngressBackend.attributeTypeMap; + } +} +exports.ExtensionsV1beta1IngressBackend = ExtensionsV1beta1IngressBackend; +ExtensionsV1beta1IngressBackend.discriminator = undefined; +ExtensionsV1beta1IngressBackend.attributeTypeMap = [ + { + "name": "resource", + "baseName": "resource", + "type": "V1TypedLocalObjectReference" + }, + { + "name": "serviceName", + "baseName": "serviceName", + "type": "string" + }, + { + "name": "servicePort", + "baseName": "servicePort", + "type": "object" + } +]; +//# sourceMappingURL=extensionsV1beta1IngressBackend.js.map + +/***/ }), + +/***/ 81527: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1IngressList = void 0; +/** +* IngressList is a collection of Ingress. +*/ +class ExtensionsV1beta1IngressList { + static getAttributeTypeMap() { + return ExtensionsV1beta1IngressList.attributeTypeMap; + } +} +exports.ExtensionsV1beta1IngressList = ExtensionsV1beta1IngressList; +ExtensionsV1beta1IngressList.discriminator = undefined; +ExtensionsV1beta1IngressList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=extensionsV1beta1IngressList.js.map + +/***/ }), + +/***/ 24357: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1IngressRule = void 0; +/** +* IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue. +*/ +class ExtensionsV1beta1IngressRule { + static getAttributeTypeMap() { + return ExtensionsV1beta1IngressRule.attributeTypeMap; + } +} +exports.ExtensionsV1beta1IngressRule = ExtensionsV1beta1IngressRule; +ExtensionsV1beta1IngressRule.discriminator = undefined; +ExtensionsV1beta1IngressRule.attributeTypeMap = [ + { + "name": "host", + "baseName": "host", + "type": "string" + }, + { + "name": "http", + "baseName": "http", + "type": "ExtensionsV1beta1HTTPIngressRuleValue" + } +]; +//# sourceMappingURL=extensionsV1beta1IngressRule.js.map + +/***/ }), + +/***/ 88712: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1IngressSpec = void 0; +/** +* IngressSpec describes the Ingress the user wishes to exist. +*/ +class ExtensionsV1beta1IngressSpec { + static getAttributeTypeMap() { + return ExtensionsV1beta1IngressSpec.attributeTypeMap; + } +} +exports.ExtensionsV1beta1IngressSpec = ExtensionsV1beta1IngressSpec; +ExtensionsV1beta1IngressSpec.discriminator = undefined; +ExtensionsV1beta1IngressSpec.attributeTypeMap = [ + { + "name": "backend", + "baseName": "backend", + "type": "ExtensionsV1beta1IngressBackend" + }, + { + "name": "ingressClassName", + "baseName": "ingressClassName", + "type": "string" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + }, + { + "name": "tls", + "baseName": "tls", + "type": "Array" + } +]; +//# sourceMappingURL=extensionsV1beta1IngressSpec.js.map + +/***/ }), + +/***/ 81881: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1IngressStatus = void 0; +/** +* IngressStatus describe the current state of the Ingress. +*/ +class ExtensionsV1beta1IngressStatus { + static getAttributeTypeMap() { + return ExtensionsV1beta1IngressStatus.attributeTypeMap; + } +} +exports.ExtensionsV1beta1IngressStatus = ExtensionsV1beta1IngressStatus; +ExtensionsV1beta1IngressStatus.discriminator = undefined; +ExtensionsV1beta1IngressStatus.attributeTypeMap = [ + { + "name": "loadBalancer", + "baseName": "loadBalancer", + "type": "V1LoadBalancerStatus" + } +]; +//# sourceMappingURL=extensionsV1beta1IngressStatus.js.map + +/***/ }), + +/***/ 13984: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtensionsV1beta1IngressTLS = void 0; +/** +* IngressTLS describes the transport layer security associated with an Ingress. +*/ +class ExtensionsV1beta1IngressTLS { + static getAttributeTypeMap() { + return ExtensionsV1beta1IngressTLS.attributeTypeMap; + } +} +exports.ExtensionsV1beta1IngressTLS = ExtensionsV1beta1IngressTLS; +ExtensionsV1beta1IngressTLS.discriminator = undefined; +ExtensionsV1beta1IngressTLS.attributeTypeMap = [ + { + "name": "hosts", + "baseName": "hosts", + "type": "Array" + }, + { + "name": "secretName", + "baseName": "secretName", + "type": "string" + } +]; +//# sourceMappingURL=extensionsV1beta1IngressTLS.js.map + +/***/ }), + +/***/ 92504: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FlowcontrolV1beta1Subject = void 0; +/** +* Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account. +*/ +class FlowcontrolV1beta1Subject { + static getAttributeTypeMap() { + return FlowcontrolV1beta1Subject.attributeTypeMap; + } +} +exports.FlowcontrolV1beta1Subject = FlowcontrolV1beta1Subject; +FlowcontrolV1beta1Subject.discriminator = undefined; +FlowcontrolV1beta1Subject.attributeTypeMap = [ + { + "name": "group", + "baseName": "group", + "type": "V1beta1GroupSubject" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "serviceAccount", + "baseName": "serviceAccount", + "type": "V1beta1ServiceAccountSubject" + }, + { + "name": "user", + "baseName": "user", + "type": "V1beta1UserSubject" + } +]; +//# sourceMappingURL=flowcontrolV1beta1Subject.js.map + +/***/ }), + +/***/ 82963: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VoidAuth = exports.OAuth = exports.ApiKeyAuth = exports.HttpBearerAuth = exports.HttpBasicAuth = exports.ObjectSerializer = void 0; +const tslib_1 = __nccwpck_require__(49109); +tslib_1.__exportStar(__nccwpck_require__(25696), exports); +tslib_1.__exportStar(__nccwpck_require__(12901), exports); +tslib_1.__exportStar(__nccwpck_require__(41251), exports); +tslib_1.__exportStar(__nccwpck_require__(12449), exports); +tslib_1.__exportStar(__nccwpck_require__(98332), exports); +tslib_1.__exportStar(__nccwpck_require__(32221), exports); +tslib_1.__exportStar(__nccwpck_require__(26400), exports); +tslib_1.__exportStar(__nccwpck_require__(12648), exports); +tslib_1.__exportStar(__nccwpck_require__(39405), exports); +tslib_1.__exportStar(__nccwpck_require__(44971), exports); +tslib_1.__exportStar(__nccwpck_require__(70448), exports); +tslib_1.__exportStar(__nccwpck_require__(30630), exports); +tslib_1.__exportStar(__nccwpck_require__(81219), exports); +tslib_1.__exportStar(__nccwpck_require__(74585), exports); +tslib_1.__exportStar(__nccwpck_require__(76703), exports); +tslib_1.__exportStar(__nccwpck_require__(92436), exports); +tslib_1.__exportStar(__nccwpck_require__(29430), exports); +tslib_1.__exportStar(__nccwpck_require__(94265), exports); +tslib_1.__exportStar(__nccwpck_require__(95237), exports); +tslib_1.__exportStar(__nccwpck_require__(94729), exports); +tslib_1.__exportStar(__nccwpck_require__(52591), exports); +tslib_1.__exportStar(__nccwpck_require__(8171), exports); +tslib_1.__exportStar(__nccwpck_require__(3220), exports); +tslib_1.__exportStar(__nccwpck_require__(81527), exports); +tslib_1.__exportStar(__nccwpck_require__(24357), exports); +tslib_1.__exportStar(__nccwpck_require__(88712), exports); +tslib_1.__exportStar(__nccwpck_require__(81881), exports); +tslib_1.__exportStar(__nccwpck_require__(13984), exports); +tslib_1.__exportStar(__nccwpck_require__(92504), exports); +tslib_1.__exportStar(__nccwpck_require__(74612), exports); +tslib_1.__exportStar(__nccwpck_require__(6512), exports); +tslib_1.__exportStar(__nccwpck_require__(50417), exports); +tslib_1.__exportStar(__nccwpck_require__(87921), exports); +tslib_1.__exportStar(__nccwpck_require__(83849), exports); +tslib_1.__exportStar(__nccwpck_require__(51816), exports); +tslib_1.__exportStar(__nccwpck_require__(56512), exports); +tslib_1.__exportStar(__nccwpck_require__(14841), exports); +tslib_1.__exportStar(__nccwpck_require__(58005), exports); +tslib_1.__exportStar(__nccwpck_require__(35680), exports); +tslib_1.__exportStar(__nccwpck_require__(71735), exports); +tslib_1.__exportStar(__nccwpck_require__(60197), exports); +tslib_1.__exportStar(__nccwpck_require__(53598), exports); +tslib_1.__exportStar(__nccwpck_require__(25099), exports); +tslib_1.__exportStar(__nccwpck_require__(35184), exports); +tslib_1.__exportStar(__nccwpck_require__(94872), exports); +tslib_1.__exportStar(__nccwpck_require__(95173), exports); +tslib_1.__exportStar(__nccwpck_require__(69022), exports); +tslib_1.__exportStar(__nccwpck_require__(17272), exports); +tslib_1.__exportStar(__nccwpck_require__(29509), exports); +tslib_1.__exportStar(__nccwpck_require__(417), exports); +tslib_1.__exportStar(__nccwpck_require__(55353), exports); +tslib_1.__exportStar(__nccwpck_require__(81491), exports); +tslib_1.__exportStar(__nccwpck_require__(77816), exports); +tslib_1.__exportStar(__nccwpck_require__(40016), exports); +tslib_1.__exportStar(__nccwpck_require__(42389), exports); +tslib_1.__exportStar(__nccwpck_require__(11524), exports); +tslib_1.__exportStar(__nccwpck_require__(63609), exports); +tslib_1.__exportStar(__nccwpck_require__(46508), exports); +tslib_1.__exportStar(__nccwpck_require__(35417), exports); +tslib_1.__exportStar(__nccwpck_require__(90437), exports); +tslib_1.__exportStar(__nccwpck_require__(34301), exports); +tslib_1.__exportStar(__nccwpck_require__(76400), exports); +tslib_1.__exportStar(__nccwpck_require__(47341), exports); +tslib_1.__exportStar(__nccwpck_require__(47995), exports); +tslib_1.__exportStar(__nccwpck_require__(43677), exports); +tslib_1.__exportStar(__nccwpck_require__(3443), exports); +tslib_1.__exportStar(__nccwpck_require__(32892), exports); +tslib_1.__exportStar(__nccwpck_require__(16840), exports); +tslib_1.__exportStar(__nccwpck_require__(10982), exports); +tslib_1.__exportStar(__nccwpck_require__(67511), exports); +tslib_1.__exportStar(__nccwpck_require__(8539), exports); +tslib_1.__exportStar(__nccwpck_require__(57450), exports); +tslib_1.__exportStar(__nccwpck_require__(56467), exports); +tslib_1.__exportStar(__nccwpck_require__(29362), exports); +tslib_1.__exportStar(__nccwpck_require__(61457), exports); +tslib_1.__exportStar(__nccwpck_require__(14417), exports); +tslib_1.__exportStar(__nccwpck_require__(68248), exports); +tslib_1.__exportStar(__nccwpck_require__(41263), exports); +tslib_1.__exportStar(__nccwpck_require__(6201), exports); +tslib_1.__exportStar(__nccwpck_require__(19537), exports); +tslib_1.__exportStar(__nccwpck_require__(97878), exports); +tslib_1.__exportStar(__nccwpck_require__(24665), exports); +tslib_1.__exportStar(__nccwpck_require__(90771), exports); +tslib_1.__exportStar(__nccwpck_require__(86871), exports); +tslib_1.__exportStar(__nccwpck_require__(30595), exports); +tslib_1.__exportStar(__nccwpck_require__(82764), exports); +tslib_1.__exportStar(__nccwpck_require__(54629), exports); +tslib_1.__exportStar(__nccwpck_require__(99107), exports); +tslib_1.__exportStar(__nccwpck_require__(15931), exports); +tslib_1.__exportStar(__nccwpck_require__(29849), exports); +tslib_1.__exportStar(__nccwpck_require__(76018), exports); +tslib_1.__exportStar(__nccwpck_require__(21303), exports); +tslib_1.__exportStar(__nccwpck_require__(6677), exports); +tslib_1.__exportStar(__nccwpck_require__(36505), exports); +tslib_1.__exportStar(__nccwpck_require__(82444), exports); +tslib_1.__exportStar(__nccwpck_require__(66077), exports); +tslib_1.__exportStar(__nccwpck_require__(25468), exports); +tslib_1.__exportStar(__nccwpck_require__(36618), exports); +tslib_1.__exportStar(__nccwpck_require__(23454), exports); +tslib_1.__exportStar(__nccwpck_require__(75858), exports); +tslib_1.__exportStar(__nccwpck_require__(14074), exports); +tslib_1.__exportStar(__nccwpck_require__(21790), exports); +tslib_1.__exportStar(__nccwpck_require__(3630), exports); +tslib_1.__exportStar(__nccwpck_require__(18510), exports); +tslib_1.__exportStar(__nccwpck_require__(24200), exports); +tslib_1.__exportStar(__nccwpck_require__(60097), exports); +tslib_1.__exportStar(__nccwpck_require__(91461), exports); +tslib_1.__exportStar(__nccwpck_require__(56476), exports); +tslib_1.__exportStar(__nccwpck_require__(82827), exports); +tslib_1.__exportStar(__nccwpck_require__(46715), exports); +tslib_1.__exportStar(__nccwpck_require__(51707), exports); +tslib_1.__exportStar(__nccwpck_require__(81081), exports); +tslib_1.__exportStar(__nccwpck_require__(26067), exports); +tslib_1.__exportStar(__nccwpck_require__(83976), exports); +tslib_1.__exportStar(__nccwpck_require__(9523), exports); +tslib_1.__exportStar(__nccwpck_require__(57276), exports); +tslib_1.__exportStar(__nccwpck_require__(64124), exports); +tslib_1.__exportStar(__nccwpck_require__(67676), exports); +tslib_1.__exportStar(__nccwpck_require__(71098), exports); +tslib_1.__exportStar(__nccwpck_require__(58786), exports); +tslib_1.__exportStar(__nccwpck_require__(12835), exports); +tslib_1.__exportStar(__nccwpck_require__(4281), exports); +tslib_1.__exportStar(__nccwpck_require__(83315), exports); +tslib_1.__exportStar(__nccwpck_require__(57744), exports); +tslib_1.__exportStar(__nccwpck_require__(74976), exports); +tslib_1.__exportStar(__nccwpck_require__(56395), exports); +tslib_1.__exportStar(__nccwpck_require__(40582), exports); +tslib_1.__exportStar(__nccwpck_require__(2497), exports); +tslib_1.__exportStar(__nccwpck_require__(85201), exports); +tslib_1.__exportStar(__nccwpck_require__(20870), exports); +tslib_1.__exportStar(__nccwpck_require__(52085), exports); +tslib_1.__exportStar(__nccwpck_require__(26954), exports); +tslib_1.__exportStar(__nccwpck_require__(21109), exports); +tslib_1.__exportStar(__nccwpck_require__(14869), exports); +tslib_1.__exportStar(__nccwpck_require__(11692), exports); +tslib_1.__exportStar(__nccwpck_require__(65792), exports); +tslib_1.__exportStar(__nccwpck_require__(71598), exports); +tslib_1.__exportStar(__nccwpck_require__(51638), exports); +tslib_1.__exportStar(__nccwpck_require__(6029), exports); +tslib_1.__exportStar(__nccwpck_require__(12367), exports); +tslib_1.__exportStar(__nccwpck_require__(41162), exports); +tslib_1.__exportStar(__nccwpck_require__(12242), exports); +tslib_1.__exportStar(__nccwpck_require__(9685), exports); +tslib_1.__exportStar(__nccwpck_require__(20132), exports); +tslib_1.__exportStar(__nccwpck_require__(17209), exports); +tslib_1.__exportStar(__nccwpck_require__(59152), exports); +tslib_1.__exportStar(__nccwpck_require__(74041), exports); +tslib_1.__exportStar(__nccwpck_require__(99674), exports); +tslib_1.__exportStar(__nccwpck_require__(7479), exports); +tslib_1.__exportStar(__nccwpck_require__(30588), exports); +tslib_1.__exportStar(__nccwpck_require__(46561), exports); +tslib_1.__exportStar(__nccwpck_require__(15566), exports); +tslib_1.__exportStar(__nccwpck_require__(81805), exports); +tslib_1.__exportStar(__nccwpck_require__(97946), exports); +tslib_1.__exportStar(__nccwpck_require__(56835), exports); +tslib_1.__exportStar(__nccwpck_require__(91036), exports); +tslib_1.__exportStar(__nccwpck_require__(9286), exports); +tslib_1.__exportStar(__nccwpck_require__(1948), exports); +tslib_1.__exportStar(__nccwpck_require__(94533), exports); +tslib_1.__exportStar(__nccwpck_require__(13240), exports); +tslib_1.__exportStar(__nccwpck_require__(85187), exports); +tslib_1.__exportStar(__nccwpck_require__(5371), exports); +tslib_1.__exportStar(__nccwpck_require__(37935), exports); +tslib_1.__exportStar(__nccwpck_require__(13258), exports); +tslib_1.__exportStar(__nccwpck_require__(27204), exports); +tslib_1.__exportStar(__nccwpck_require__(29195), exports); +tslib_1.__exportStar(__nccwpck_require__(33402), exports); +tslib_1.__exportStar(__nccwpck_require__(8136), exports); +tslib_1.__exportStar(__nccwpck_require__(74293), exports); +tslib_1.__exportStar(__nccwpck_require__(56997), exports); +tslib_1.__exportStar(__nccwpck_require__(32171), exports); +tslib_1.__exportStar(__nccwpck_require__(36100), exports); +tslib_1.__exportStar(__nccwpck_require__(6627), exports); +tslib_1.__exportStar(__nccwpck_require__(99287), exports); +tslib_1.__exportStar(__nccwpck_require__(27360), exports); +tslib_1.__exportStar(__nccwpck_require__(79632), exports); +tslib_1.__exportStar(__nccwpck_require__(75163), exports); +tslib_1.__exportStar(__nccwpck_require__(80954), exports); +tslib_1.__exportStar(__nccwpck_require__(58489), exports); +tslib_1.__exportStar(__nccwpck_require__(34368), exports); +tslib_1.__exportStar(__nccwpck_require__(63617), exports); +tslib_1.__exportStar(__nccwpck_require__(29713), exports); +tslib_1.__exportStar(__nccwpck_require__(10482), exports); +tslib_1.__exportStar(__nccwpck_require__(60988), exports); +tslib_1.__exportStar(__nccwpck_require__(15413), exports); +tslib_1.__exportStar(__nccwpck_require__(57566), exports); +tslib_1.__exportStar(__nccwpck_require__(6164), exports); +tslib_1.__exportStar(__nccwpck_require__(85661), exports); +tslib_1.__exportStar(__nccwpck_require__(45343), exports); +tslib_1.__exportStar(__nccwpck_require__(62512), exports); +tslib_1.__exportStar(__nccwpck_require__(11689), exports); +tslib_1.__exportStar(__nccwpck_require__(10166), exports); +tslib_1.__exportStar(__nccwpck_require__(45879), exports); +tslib_1.__exportStar(__nccwpck_require__(31273), exports); +tslib_1.__exportStar(__nccwpck_require__(68438), exports); +tslib_1.__exportStar(__nccwpck_require__(3560), exports); +tslib_1.__exportStar(__nccwpck_require__(33526), exports); +tslib_1.__exportStar(__nccwpck_require__(4215), exports); +tslib_1.__exportStar(__nccwpck_require__(47734), exports); +tslib_1.__exportStar(__nccwpck_require__(93145), exports); +tslib_1.__exportStar(__nccwpck_require__(85472), exports); +tslib_1.__exportStar(__nccwpck_require__(50890), exports); +tslib_1.__exportStar(__nccwpck_require__(52777), exports); +tslib_1.__exportStar(__nccwpck_require__(19024), exports); +tslib_1.__exportStar(__nccwpck_require__(14624), exports); +tslib_1.__exportStar(__nccwpck_require__(20788), exports); +tslib_1.__exportStar(__nccwpck_require__(97160), exports); +tslib_1.__exportStar(__nccwpck_require__(7415), exports); +tslib_1.__exportStar(__nccwpck_require__(84434), exports); +tslib_1.__exportStar(__nccwpck_require__(17410), exports); +tslib_1.__exportStar(__nccwpck_require__(95723), exports); +tslib_1.__exportStar(__nccwpck_require__(17931), exports); +tslib_1.__exportStar(__nccwpck_require__(48129), exports); +tslib_1.__exportStar(__nccwpck_require__(30727), exports); +tslib_1.__exportStar(__nccwpck_require__(14378), exports); +tslib_1.__exportStar(__nccwpck_require__(11795), exports); +tslib_1.__exportStar(__nccwpck_require__(35221), exports); +tslib_1.__exportStar(__nccwpck_require__(46389), exports); +tslib_1.__exportStar(__nccwpck_require__(70547), exports); +tslib_1.__exportStar(__nccwpck_require__(19955), exports); +tslib_1.__exportStar(__nccwpck_require__(16773), exports); +tslib_1.__exportStar(__nccwpck_require__(3721), exports); +tslib_1.__exportStar(__nccwpck_require__(80450), exports); +tslib_1.__exportStar(__nccwpck_require__(50793), exports); +tslib_1.__exportStar(__nccwpck_require__(2006), exports); +tslib_1.__exportStar(__nccwpck_require__(42698), exports); +tslib_1.__exportStar(__nccwpck_require__(78986), exports); +tslib_1.__exportStar(__nccwpck_require__(10228), exports); +tslib_1.__exportStar(__nccwpck_require__(62397), exports); +tslib_1.__exportStar(__nccwpck_require__(90583), exports); +tslib_1.__exportStar(__nccwpck_require__(62002), exports); +tslib_1.__exportStar(__nccwpck_require__(87917), exports); +tslib_1.__exportStar(__nccwpck_require__(93437), exports); +tslib_1.__exportStar(__nccwpck_require__(6948), exports); +tslib_1.__exportStar(__nccwpck_require__(85839), exports); +tslib_1.__exportStar(__nccwpck_require__(45709), exports); +tslib_1.__exportStar(__nccwpck_require__(78540), exports); +tslib_1.__exportStar(__nccwpck_require__(66628), exports); +tslib_1.__exportStar(__nccwpck_require__(5282), exports); +tslib_1.__exportStar(__nccwpck_require__(63150), exports); +tslib_1.__exportStar(__nccwpck_require__(72907), exports); +tslib_1.__exportStar(__nccwpck_require__(36339), exports); +tslib_1.__exportStar(__nccwpck_require__(99044), exports); +tslib_1.__exportStar(__nccwpck_require__(77600), exports); +tslib_1.__exportStar(__nccwpck_require__(62333), exports); +tslib_1.__exportStar(__nccwpck_require__(89874), exports); +tslib_1.__exportStar(__nccwpck_require__(9526), exports); +tslib_1.__exportStar(__nccwpck_require__(32724), exports); +tslib_1.__exportStar(__nccwpck_require__(8878), exports); +tslib_1.__exportStar(__nccwpck_require__(44081), exports); +tslib_1.__exportStar(__nccwpck_require__(52150), exports); +tslib_1.__exportStar(__nccwpck_require__(88638), exports); +tslib_1.__exportStar(__nccwpck_require__(93792), exports); +tslib_1.__exportStar(__nccwpck_require__(87514), exports); +tslib_1.__exportStar(__nccwpck_require__(8143), exports); +tslib_1.__exportStar(__nccwpck_require__(34661), exports); +tslib_1.__exportStar(__nccwpck_require__(43856), exports); +tslib_1.__exportStar(__nccwpck_require__(84989), exports); +tslib_1.__exportStar(__nccwpck_require__(51875), exports); +tslib_1.__exportStar(__nccwpck_require__(3364), exports); +tslib_1.__exportStar(__nccwpck_require__(66521), exports); +tslib_1.__exportStar(__nccwpck_require__(94329), exports); +tslib_1.__exportStar(__nccwpck_require__(56849), exports); +tslib_1.__exportStar(__nccwpck_require__(40700), exports); +tslib_1.__exportStar(__nccwpck_require__(13386), exports); +tslib_1.__exportStar(__nccwpck_require__(71028), exports); +tslib_1.__exportStar(__nccwpck_require__(69815), exports); +tslib_1.__exportStar(__nccwpck_require__(91845), exports); +tslib_1.__exportStar(__nccwpck_require__(60108), exports); +tslib_1.__exportStar(__nccwpck_require__(41042), exports); +tslib_1.__exportStar(__nccwpck_require__(50297), exports); +tslib_1.__exportStar(__nccwpck_require__(71064), exports); +tslib_1.__exportStar(__nccwpck_require__(44598), exports); +tslib_1.__exportStar(__nccwpck_require__(96863), exports); +tslib_1.__exportStar(__nccwpck_require__(33836), exports); +tslib_1.__exportStar(__nccwpck_require__(19014), exports); +tslib_1.__exportStar(__nccwpck_require__(216), exports); +tslib_1.__exportStar(__nccwpck_require__(27906), exports); +tslib_1.__exportStar(__nccwpck_require__(58362), exports); +tslib_1.__exportStar(__nccwpck_require__(26971), exports); +tslib_1.__exportStar(__nccwpck_require__(6709), exports); +tslib_1.__exportStar(__nccwpck_require__(99439), exports); +tslib_1.__exportStar(__nccwpck_require__(82780), exports); +tslib_1.__exportStar(__nccwpck_require__(19437), exports); +tslib_1.__exportStar(__nccwpck_require__(96091), exports); +tslib_1.__exportStar(__nccwpck_require__(14020), exports); +tslib_1.__exportStar(__nccwpck_require__(31731), exports); +tslib_1.__exportStar(__nccwpck_require__(29139), exports); +tslib_1.__exportStar(__nccwpck_require__(4652), exports); +tslib_1.__exportStar(__nccwpck_require__(77988), exports); +tslib_1.__exportStar(__nccwpck_require__(11022), exports); +tslib_1.__exportStar(__nccwpck_require__(68852), exports); +tslib_1.__exportStar(__nccwpck_require__(33470), exports); +tslib_1.__exportStar(__nccwpck_require__(50264), exports); +tslib_1.__exportStar(__nccwpck_require__(82432), exports); +tslib_1.__exportStar(__nccwpck_require__(73598), exports); +tslib_1.__exportStar(__nccwpck_require__(94635), exports); +tslib_1.__exportStar(__nccwpck_require__(84895), exports); +tslib_1.__exportStar(__nccwpck_require__(73369), exports); +tslib_1.__exportStar(__nccwpck_require__(73725), exports); +tslib_1.__exportStar(__nccwpck_require__(76186), exports); +tslib_1.__exportStar(__nccwpck_require__(5042), exports); +tslib_1.__exportStar(__nccwpck_require__(12574), exports); +tslib_1.__exportStar(__nccwpck_require__(90145), exports); +tslib_1.__exportStar(__nccwpck_require__(60500), exports); +tslib_1.__exportStar(__nccwpck_require__(27886), exports); +tslib_1.__exportStar(__nccwpck_require__(86844), exports); +tslib_1.__exportStar(__nccwpck_require__(48666), exports); +tslib_1.__exportStar(__nccwpck_require__(67426), exports); +tslib_1.__exportStar(__nccwpck_require__(11995), exports); +tslib_1.__exportStar(__nccwpck_require__(59597), exports); +tslib_1.__exportStar(__nccwpck_require__(51088), exports); +tslib_1.__exportStar(__nccwpck_require__(35162), exports); +tslib_1.__exportStar(__nccwpck_require__(56546), exports); +tslib_1.__exportStar(__nccwpck_require__(46233), exports); +tslib_1.__exportStar(__nccwpck_require__(82525), exports); +tslib_1.__exportStar(__nccwpck_require__(41128), exports); +tslib_1.__exportStar(__nccwpck_require__(46997), exports); +tslib_1.__exportStar(__nccwpck_require__(41575), exports); +tslib_1.__exportStar(__nccwpck_require__(36971), exports); +tslib_1.__exportStar(__nccwpck_require__(66081), exports); +tslib_1.__exportStar(__nccwpck_require__(16454), exports); +tslib_1.__exportStar(__nccwpck_require__(88113), exports); +tslib_1.__exportStar(__nccwpck_require__(19616), exports); +tslib_1.__exportStar(__nccwpck_require__(15899), exports); +tslib_1.__exportStar(__nccwpck_require__(73966), exports); +tslib_1.__exportStar(__nccwpck_require__(84445), exports); +tslib_1.__exportStar(__nccwpck_require__(61491), exports); +tslib_1.__exportStar(__nccwpck_require__(56067), exports); +tslib_1.__exportStar(__nccwpck_require__(65750), exports); +tslib_1.__exportStar(__nccwpck_require__(3065), exports); +tslib_1.__exportStar(__nccwpck_require__(41156), exports); +tslib_1.__exportStar(__nccwpck_require__(55131), exports); +tslib_1.__exportStar(__nccwpck_require__(91879), exports); +tslib_1.__exportStar(__nccwpck_require__(20024), exports); +tslib_1.__exportStar(__nccwpck_require__(54123), exports); +tslib_1.__exportStar(__nccwpck_require__(38307), exports); +tslib_1.__exportStar(__nccwpck_require__(82), exports); +tslib_1.__exportStar(__nccwpck_require__(40626), exports); +tslib_1.__exportStar(__nccwpck_require__(60276), exports); +tslib_1.__exportStar(__nccwpck_require__(27536), exports); +tslib_1.__exportStar(__nccwpck_require__(20056), exports); +tslib_1.__exportStar(__nccwpck_require__(71241), exports); +tslib_1.__exportStar(__nccwpck_require__(22746), exports); +tslib_1.__exportStar(__nccwpck_require__(70716), exports); +tslib_1.__exportStar(__nccwpck_require__(48928), exports); +tslib_1.__exportStar(__nccwpck_require__(97443), exports); +tslib_1.__exportStar(__nccwpck_require__(73469), exports); +tslib_1.__exportStar(__nccwpck_require__(82875), exports); +tslib_1.__exportStar(__nccwpck_require__(29170), exports); +tslib_1.__exportStar(__nccwpck_require__(99317), exports); +tslib_1.__exportStar(__nccwpck_require__(90952), exports); +tslib_1.__exportStar(__nccwpck_require__(92117), exports); +tslib_1.__exportStar(__nccwpck_require__(13228), exports); +tslib_1.__exportStar(__nccwpck_require__(55739), exports); +tslib_1.__exportStar(__nccwpck_require__(8340), exports); +tslib_1.__exportStar(__nccwpck_require__(3025), exports); +tslib_1.__exportStar(__nccwpck_require__(16093), exports); +tslib_1.__exportStar(__nccwpck_require__(56829), exports); +tslib_1.__exportStar(__nccwpck_require__(1160), exports); +tslib_1.__exportStar(__nccwpck_require__(83492), exports); +tslib_1.__exportStar(__nccwpck_require__(56698), exports); +tslib_1.__exportStar(__nccwpck_require__(80302), exports); +tslib_1.__exportStar(__nccwpck_require__(79979), exports); +tslib_1.__exportStar(__nccwpck_require__(85679), exports); +tslib_1.__exportStar(__nccwpck_require__(16910), exports); +tslib_1.__exportStar(__nccwpck_require__(32755), exports); +tslib_1.__exportStar(__nccwpck_require__(32529), exports); +tslib_1.__exportStar(__nccwpck_require__(59204), exports); +tslib_1.__exportStar(__nccwpck_require__(66551), exports); +tslib_1.__exportStar(__nccwpck_require__(38118), exports); +tslib_1.__exportStar(__nccwpck_require__(8996), exports); +tslib_1.__exportStar(__nccwpck_require__(64232), exports); +tslib_1.__exportStar(__nccwpck_require__(83693), exports); +tslib_1.__exportStar(__nccwpck_require__(40489), exports); +tslib_1.__exportStar(__nccwpck_require__(16836), exports); +tslib_1.__exportStar(__nccwpck_require__(8593), exports); +tslib_1.__exportStar(__nccwpck_require__(13679), exports); +tslib_1.__exportStar(__nccwpck_require__(65083), exports); +tslib_1.__exportStar(__nccwpck_require__(74444), exports); +tslib_1.__exportStar(__nccwpck_require__(89082), exports); +tslib_1.__exportStar(__nccwpck_require__(23946), exports); +tslib_1.__exportStar(__nccwpck_require__(21866), exports); +tslib_1.__exportStar(__nccwpck_require__(24995), exports); +tslib_1.__exportStar(__nccwpck_require__(55097), exports); +tslib_1.__exportStar(__nccwpck_require__(46232), exports); +tslib_1.__exportStar(__nccwpck_require__(12917), exports); +tslib_1.__exportStar(__nccwpck_require__(68621), exports); +tslib_1.__exportStar(__nccwpck_require__(20539), exports); +tslib_1.__exportStar(__nccwpck_require__(65455), exports); +tslib_1.__exportStar(__nccwpck_require__(37200), exports); +tslib_1.__exportStar(__nccwpck_require__(23732), exports); +tslib_1.__exportStar(__nccwpck_require__(23607), exports); +tslib_1.__exportStar(__nccwpck_require__(4752), exports); +tslib_1.__exportStar(__nccwpck_require__(11509), exports); +tslib_1.__exportStar(__nccwpck_require__(69599), exports); +tslib_1.__exportStar(__nccwpck_require__(7393), exports); +tslib_1.__exportStar(__nccwpck_require__(80624), exports); +tslib_1.__exportStar(__nccwpck_require__(36604), exports); +tslib_1.__exportStar(__nccwpck_require__(34472), exports); +tslib_1.__exportStar(__nccwpck_require__(15521), exports); +tslib_1.__exportStar(__nccwpck_require__(5306), exports); +tslib_1.__exportStar(__nccwpck_require__(88958), exports); +tslib_1.__exportStar(__nccwpck_require__(42776), exports); +tslib_1.__exportStar(__nccwpck_require__(40497), exports); +tslib_1.__exportStar(__nccwpck_require__(20446), exports); +tslib_1.__exportStar(__nccwpck_require__(2865), exports); +tslib_1.__exportStar(__nccwpck_require__(9155), exports); +tslib_1.__exportStar(__nccwpck_require__(867), exports); +tslib_1.__exportStar(__nccwpck_require__(67972), exports); +tslib_1.__exportStar(__nccwpck_require__(19183), exports); +tslib_1.__exportStar(__nccwpck_require__(29289), exports); +tslib_1.__exportStar(__nccwpck_require__(40789), exports); +tslib_1.__exportStar(__nccwpck_require__(87558), exports); +tslib_1.__exportStar(__nccwpck_require__(76021), exports); +tslib_1.__exportStar(__nccwpck_require__(80242), exports); +tslib_1.__exportStar(__nccwpck_require__(29217), exports); +tslib_1.__exportStar(__nccwpck_require__(37246), exports); +tslib_1.__exportStar(__nccwpck_require__(70270), exports); +tslib_1.__exportStar(__nccwpck_require__(66963), exports); +tslib_1.__exportStar(__nccwpck_require__(66233), exports); +tslib_1.__exportStar(__nccwpck_require__(50140), exports); +tslib_1.__exportStar(__nccwpck_require__(93273), exports); +tslib_1.__exportStar(__nccwpck_require__(45566), exports); +tslib_1.__exportStar(__nccwpck_require__(10592), exports); +tslib_1.__exportStar(__nccwpck_require__(50506), exports); +tslib_1.__exportStar(__nccwpck_require__(5981), exports); +tslib_1.__exportStar(__nccwpck_require__(17478), exports); +tslib_1.__exportStar(__nccwpck_require__(8030), exports); +tslib_1.__exportStar(__nccwpck_require__(27837), exports); +tslib_1.__exportStar(__nccwpck_require__(86708), exports); +tslib_1.__exportStar(__nccwpck_require__(44061), exports); +tslib_1.__exportStar(__nccwpck_require__(95862), exports); +tslib_1.__exportStar(__nccwpck_require__(69438), exports); +tslib_1.__exportStar(__nccwpck_require__(21599), exports); +tslib_1.__exportStar(__nccwpck_require__(1565), exports); +tslib_1.__exportStar(__nccwpck_require__(60786), exports); +tslib_1.__exportStar(__nccwpck_require__(5589), exports); +tslib_1.__exportStar(__nccwpck_require__(11459), exports); +tslib_1.__exportStar(__nccwpck_require__(98725), exports); +tslib_1.__exportStar(__nccwpck_require__(65396), exports); +tslib_1.__exportStar(__nccwpck_require__(9575), exports); +tslib_1.__exportStar(__nccwpck_require__(63761), exports); +tslib_1.__exportStar(__nccwpck_require__(85487), exports); +tslib_1.__exportStar(__nccwpck_require__(69725), exports); +tslib_1.__exportStar(__nccwpck_require__(43299), exports); +tslib_1.__exportStar(__nccwpck_require__(39417), exports); +tslib_1.__exportStar(__nccwpck_require__(18308), exports); +tslib_1.__exportStar(__nccwpck_require__(79606), exports); +tslib_1.__exportStar(__nccwpck_require__(80723), exports); +tslib_1.__exportStar(__nccwpck_require__(92202), exports); +tslib_1.__exportStar(__nccwpck_require__(54187), exports); +tslib_1.__exportStar(__nccwpck_require__(59116), exports); +tslib_1.__exportStar(__nccwpck_require__(45746), exports); +tslib_1.__exportStar(__nccwpck_require__(9571), exports); +tslib_1.__exportStar(__nccwpck_require__(63279), exports); +tslib_1.__exportStar(__nccwpck_require__(74978), exports); +tslib_1.__exportStar(__nccwpck_require__(83387), exports); +tslib_1.__exportStar(__nccwpck_require__(21043), exports); +tslib_1.__exportStar(__nccwpck_require__(91886), exports); +tslib_1.__exportStar(__nccwpck_require__(44389), exports); +tslib_1.__exportStar(__nccwpck_require__(49500), exports); +tslib_1.__exportStar(__nccwpck_require__(48111), exports); +tslib_1.__exportStar(__nccwpck_require__(17395), exports); +tslib_1.__exportStar(__nccwpck_require__(66655), exports); +tslib_1.__exportStar(__nccwpck_require__(26172), exports); +tslib_1.__exportStar(__nccwpck_require__(48763), exports); +tslib_1.__exportStar(__nccwpck_require__(44621), exports); +tslib_1.__exportStar(__nccwpck_require__(93022), exports); +tslib_1.__exportStar(__nccwpck_require__(58181), exports); +tslib_1.__exportStar(__nccwpck_require__(22644), exports); +tslib_1.__exportStar(__nccwpck_require__(46066), exports); +tslib_1.__exportStar(__nccwpck_require__(42702), exports); +tslib_1.__exportStar(__nccwpck_require__(20752), exports); +tslib_1.__exportStar(__nccwpck_require__(47584), exports); +tslib_1.__exportStar(__nccwpck_require__(11172), exports); +tslib_1.__exportStar(__nccwpck_require__(301), exports); +tslib_1.__exportStar(__nccwpck_require__(33037), exports); +tslib_1.__exportStar(__nccwpck_require__(68993), exports); +tslib_1.__exportStar(__nccwpck_require__(96530), exports); +tslib_1.__exportStar(__nccwpck_require__(30273), exports); +tslib_1.__exportStar(__nccwpck_require__(80906), exports); +tslib_1.__exportStar(__nccwpck_require__(20882), exports); +tslib_1.__exportStar(__nccwpck_require__(19163), exports); +tslib_1.__exportStar(__nccwpck_require__(89645), exports); +tslib_1.__exportStar(__nccwpck_require__(43381), exports); +tslib_1.__exportStar(__nccwpck_require__(5156), exports); +tslib_1.__exportStar(__nccwpck_require__(67132), exports); +tslib_1.__exportStar(__nccwpck_require__(80649), exports); +tslib_1.__exportStar(__nccwpck_require__(22221), exports); +tslib_1.__exportStar(__nccwpck_require__(78313), exports); +tslib_1.__exportStar(__nccwpck_require__(38750), exports); +tslib_1.__exportStar(__nccwpck_require__(24976), exports); +tslib_1.__exportStar(__nccwpck_require__(35869), exports); +tslib_1.__exportStar(__nccwpck_require__(86653), exports); +tslib_1.__exportStar(__nccwpck_require__(97745), exports); +tslib_1.__exportStar(__nccwpck_require__(67482), exports); +tslib_1.__exportStar(__nccwpck_require__(83673), exports); +tslib_1.__exportStar(__nccwpck_require__(35101), exports); +tslib_1.__exportStar(__nccwpck_require__(75172), exports); +tslib_1.__exportStar(__nccwpck_require__(89867), exports); +tslib_1.__exportStar(__nccwpck_require__(84879), exports); +tslib_1.__exportStar(__nccwpck_require__(64464), exports); +tslib_1.__exportStar(__nccwpck_require__(5667), exports); +tslib_1.__exportStar(__nccwpck_require__(60619), exports); +tslib_1.__exportStar(__nccwpck_require__(55092), exports); +tslib_1.__exportStar(__nccwpck_require__(53311), exports); +tslib_1.__exportStar(__nccwpck_require__(9724), exports); +tslib_1.__exportStar(__nccwpck_require__(72441), exports); +tslib_1.__exportStar(__nccwpck_require__(72216), exports); +tslib_1.__exportStar(__nccwpck_require__(23422), exports); +tslib_1.__exportStar(__nccwpck_require__(46799), exports); +tslib_1.__exportStar(__nccwpck_require__(36341), exports); +tslib_1.__exportStar(__nccwpck_require__(10700), exports); +tslib_1.__exportStar(__nccwpck_require__(14016), exports); +tslib_1.__exportStar(__nccwpck_require__(6910), exports); +tslib_1.__exportStar(__nccwpck_require__(4887), exports); +tslib_1.__exportStar(__nccwpck_require__(45684), exports); +tslib_1.__exportStar(__nccwpck_require__(13807), exports); +tslib_1.__exportStar(__nccwpck_require__(8549), exports); +tslib_1.__exportStar(__nccwpck_require__(14647), exports); +tslib_1.__exportStar(__nccwpck_require__(69966), exports); +tslib_1.__exportStar(__nccwpck_require__(90124), exports); +tslib_1.__exportStar(__nccwpck_require__(68173), exports); +tslib_1.__exportStar(__nccwpck_require__(71239), exports); +tslib_1.__exportStar(__nccwpck_require__(62878), exports); +tslib_1.__exportStar(__nccwpck_require__(14671), exports); +tslib_1.__exportStar(__nccwpck_require__(41172), exports); +tslib_1.__exportStar(__nccwpck_require__(21826), exports); +tslib_1.__exportStar(__nccwpck_require__(29355), exports); +tslib_1.__exportStar(__nccwpck_require__(3582), exports); +tslib_1.__exportStar(__nccwpck_require__(55143), exports); +tslib_1.__exportStar(__nccwpck_require__(72221), exports); +tslib_1.__exportStar(__nccwpck_require__(43774), exports); +tslib_1.__exportStar(__nccwpck_require__(18556), exports); +tslib_1.__exportStar(__nccwpck_require__(49941), exports); +tslib_1.__exportStar(__nccwpck_require__(83966), exports); +tslib_1.__exportStar(__nccwpck_require__(6213), exports); +tslib_1.__exportStar(__nccwpck_require__(75628), exports); +tslib_1.__exportStar(__nccwpck_require__(2448), exports); +tslib_1.__exportStar(__nccwpck_require__(44787), exports); +tslib_1.__exportStar(__nccwpck_require__(12833), exports); +tslib_1.__exportStar(__nccwpck_require__(57721), exports); +tslib_1.__exportStar(__nccwpck_require__(32224), exports); +tslib_1.__exportStar(__nccwpck_require__(90058), exports); +tslib_1.__exportStar(__nccwpck_require__(4641), exports); +tslib_1.__exportStar(__nccwpck_require__(18090), exports); +tslib_1.__exportStar(__nccwpck_require__(78678), exports); +tslib_1.__exportStar(__nccwpck_require__(58511), exports); +tslib_1.__exportStar(__nccwpck_require__(21028), exports); +tslib_1.__exportStar(__nccwpck_require__(92494), exports); +tslib_1.__exportStar(__nccwpck_require__(19582), exports); +tslib_1.__exportStar(__nccwpck_require__(68085), exports); +tslib_1.__exportStar(__nccwpck_require__(97239), exports); +tslib_1.__exportStar(__nccwpck_require__(34021), exports); +tslib_1.__exportStar(__nccwpck_require__(67315), exports); +tslib_1.__exportStar(__nccwpck_require__(74178), exports); +tslib_1.__exportStar(__nccwpck_require__(77258), exports); +tslib_1.__exportStar(__nccwpck_require__(65466), exports); +tslib_1.__exportStar(__nccwpck_require__(89177), exports); +tslib_1.__exportStar(__nccwpck_require__(96835), exports); +tslib_1.__exportStar(__nccwpck_require__(87047), exports); +tslib_1.__exportStar(__nccwpck_require__(32498), exports); +tslib_1.__exportStar(__nccwpck_require__(95373), exports); +tslib_1.__exportStar(__nccwpck_require__(13872), exports); +tslib_1.__exportStar(__nccwpck_require__(95993), exports); +tslib_1.__exportStar(__nccwpck_require__(94811), exports); +tslib_1.__exportStar(__nccwpck_require__(9806), exports); +tslib_1.__exportStar(__nccwpck_require__(59527), exports); +tslib_1.__exportStar(__nccwpck_require__(53104), exports); +tslib_1.__exportStar(__nccwpck_require__(42158), exports); +tslib_1.__exportStar(__nccwpck_require__(99226), exports); +tslib_1.__exportStar(__nccwpck_require__(38415), exports); +tslib_1.__exportStar(__nccwpck_require__(23675), exports); +tslib_1.__exportStar(__nccwpck_require__(42686), exports); +tslib_1.__exportStar(__nccwpck_require__(94406), exports); +tslib_1.__exportStar(__nccwpck_require__(63997), exports); +tslib_1.__exportStar(__nccwpck_require__(54015), exports); +tslib_1.__exportStar(__nccwpck_require__(51195), exports); +tslib_1.__exportStar(__nccwpck_require__(98901), exports); +tslib_1.__exportStar(__nccwpck_require__(57664), exports); +tslib_1.__exportStar(__nccwpck_require__(91590), exports); +tslib_1.__exportStar(__nccwpck_require__(87363), exports); +tslib_1.__exportStar(__nccwpck_require__(47530), exports); +tslib_1.__exportStar(__nccwpck_require__(71450), exports); +tslib_1.__exportStar(__nccwpck_require__(56970), exports); +tslib_1.__exportStar(__nccwpck_require__(15211), exports); +tslib_1.__exportStar(__nccwpck_require__(98579), exports); +tslib_1.__exportStar(__nccwpck_require__(80522), exports); +tslib_1.__exportStar(__nccwpck_require__(1706), exports); +tslib_1.__exportStar(__nccwpck_require__(14240), exports); +tslib_1.__exportStar(__nccwpck_require__(66922), exports); +tslib_1.__exportStar(__nccwpck_require__(5608), exports); +tslib_1.__exportStar(__nccwpck_require__(89681), exports); +tslib_1.__exportStar(__nccwpck_require__(33128), exports); +tslib_1.__exportStar(__nccwpck_require__(85775), exports); +tslib_1.__exportStar(__nccwpck_require__(1023), exports); +tslib_1.__exportStar(__nccwpck_require__(84034), exports); +tslib_1.__exportStar(__nccwpck_require__(57894), exports); +tslib_1.__exportStar(__nccwpck_require__(3023), exports); +tslib_1.__exportStar(__nccwpck_require__(90870), exports); +tslib_1.__exportStar(__nccwpck_require__(54389), exports); +tslib_1.__exportStar(__nccwpck_require__(79631), exports); +tslib_1.__exportStar(__nccwpck_require__(30995), exports); +tslib_1.__exportStar(__nccwpck_require__(93407), exports); +tslib_1.__exportStar(__nccwpck_require__(41159), exports); +tslib_1.__exportStar(__nccwpck_require__(65988), exports); +tslib_1.__exportStar(__nccwpck_require__(5762), exports); +tslib_1.__exportStar(__nccwpck_require__(7428), exports); +tslib_1.__exportStar(__nccwpck_require__(36047), exports); +tslib_1.__exportStar(__nccwpck_require__(19201), exports); +tslib_1.__exportStar(__nccwpck_require__(10397), exports); +tslib_1.__exportStar(__nccwpck_require__(56058), exports); +tslib_1.__exportStar(__nccwpck_require__(25422), exports); +tslib_1.__exportStar(__nccwpck_require__(87223), exports); +tslib_1.__exportStar(__nccwpck_require__(36770), exports); +tslib_1.__exportStar(__nccwpck_require__(76584), exports); +tslib_1.__exportStar(__nccwpck_require__(22053), exports); +tslib_1.__exportStar(__nccwpck_require__(5668), exports); +tslib_1.__exportStar(__nccwpck_require__(22138), exports); +tslib_1.__exportStar(__nccwpck_require__(78022), exports); +tslib_1.__exportStar(__nccwpck_require__(43646), exports); +tslib_1.__exportStar(__nccwpck_require__(97447), exports); +tslib_1.__exportStar(__nccwpck_require__(71223), exports); +tslib_1.__exportStar(__nccwpck_require__(19643), exports); +tslib_1.__exportStar(__nccwpck_require__(19640), exports); +tslib_1.__exportStar(__nccwpck_require__(75903), exports); +tslib_1.__exportStar(__nccwpck_require__(33688), exports); +tslib_1.__exportStar(__nccwpck_require__(29610), exports); +tslib_1.__exportStar(__nccwpck_require__(10783), exports); +tslib_1.__exportStar(__nccwpck_require__(39981), exports); +tslib_1.__exportStar(__nccwpck_require__(78341), exports); +tslib_1.__exportStar(__nccwpck_require__(77136), exports); +tslib_1.__exportStar(__nccwpck_require__(13793), exports); +const admissionregistrationV1ServiceReference_1 = __nccwpck_require__(25696); +const admissionregistrationV1WebhookClientConfig_1 = __nccwpck_require__(12901); +const admissionregistrationV1beta1ServiceReference_1 = __nccwpck_require__(41251); +const admissionregistrationV1beta1WebhookClientConfig_1 = __nccwpck_require__(12449); +const apiextensionsV1ServiceReference_1 = __nccwpck_require__(98332); +const apiextensionsV1WebhookClientConfig_1 = __nccwpck_require__(32221); +const apiextensionsV1beta1ServiceReference_1 = __nccwpck_require__(26400); +const apiextensionsV1beta1WebhookClientConfig_1 = __nccwpck_require__(12648); +const apiregistrationV1ServiceReference_1 = __nccwpck_require__(39405); +const apiregistrationV1beta1ServiceReference_1 = __nccwpck_require__(44971); +const authenticationV1TokenRequest_1 = __nccwpck_require__(70448); +const coreV1EndpointPort_1 = __nccwpck_require__(30630); +const coreV1Event_1 = __nccwpck_require__(81219); +const coreV1EventList_1 = __nccwpck_require__(74585); +const coreV1EventSeries_1 = __nccwpck_require__(76703); +const discoveryV1EndpointPort_1 = __nccwpck_require__(92436); +const eventsV1Event_1 = __nccwpck_require__(29430); +const eventsV1EventList_1 = __nccwpck_require__(94265); +const eventsV1EventSeries_1 = __nccwpck_require__(95237); +const extensionsV1beta1HTTPIngressPath_1 = __nccwpck_require__(94729); +const extensionsV1beta1HTTPIngressRuleValue_1 = __nccwpck_require__(52591); +const extensionsV1beta1Ingress_1 = __nccwpck_require__(8171); +const extensionsV1beta1IngressBackend_1 = __nccwpck_require__(3220); +const extensionsV1beta1IngressList_1 = __nccwpck_require__(81527); +const extensionsV1beta1IngressRule_1 = __nccwpck_require__(24357); +const extensionsV1beta1IngressSpec_1 = __nccwpck_require__(88712); +const extensionsV1beta1IngressStatus_1 = __nccwpck_require__(81881); +const extensionsV1beta1IngressTLS_1 = __nccwpck_require__(13984); +const flowcontrolV1beta1Subject_1 = __nccwpck_require__(92504); +const networkingV1beta1HTTPIngressPath_1 = __nccwpck_require__(74612); +const networkingV1beta1HTTPIngressRuleValue_1 = __nccwpck_require__(6512); +const networkingV1beta1Ingress_1 = __nccwpck_require__(50417); +const networkingV1beta1IngressBackend_1 = __nccwpck_require__(87921); +const networkingV1beta1IngressList_1 = __nccwpck_require__(83849); +const networkingV1beta1IngressRule_1 = __nccwpck_require__(51816); +const networkingV1beta1IngressSpec_1 = __nccwpck_require__(56512); +const networkingV1beta1IngressStatus_1 = __nccwpck_require__(14841); +const networkingV1beta1IngressTLS_1 = __nccwpck_require__(58005); +const rbacV1beta1Subject_1 = __nccwpck_require__(35680); +const storageV1TokenRequest_1 = __nccwpck_require__(71735); +const v1APIGroup_1 = __nccwpck_require__(60197); +const v1APIGroupList_1 = __nccwpck_require__(53598); +const v1APIResource_1 = __nccwpck_require__(25099); +const v1APIResourceList_1 = __nccwpck_require__(35184); +const v1APIService_1 = __nccwpck_require__(94872); +const v1APIServiceCondition_1 = __nccwpck_require__(95173); +const v1APIServiceList_1 = __nccwpck_require__(69022); +const v1APIServiceSpec_1 = __nccwpck_require__(17272); +const v1APIServiceStatus_1 = __nccwpck_require__(29509); +const v1APIVersions_1 = __nccwpck_require__(417); +const v1AWSElasticBlockStoreVolumeSource_1 = __nccwpck_require__(55353); +const v1Affinity_1 = __nccwpck_require__(81491); +const v1AggregationRule_1 = __nccwpck_require__(77816); +const v1AttachedVolume_1 = __nccwpck_require__(40016); +const v1AzureDiskVolumeSource_1 = __nccwpck_require__(42389); +const v1AzureFilePersistentVolumeSource_1 = __nccwpck_require__(11524); +const v1AzureFileVolumeSource_1 = __nccwpck_require__(63609); +const v1Binding_1 = __nccwpck_require__(46508); +const v1BoundObjectReference_1 = __nccwpck_require__(35417); +const v1CSIDriver_1 = __nccwpck_require__(90437); +const v1CSIDriverList_1 = __nccwpck_require__(34301); +const v1CSIDriverSpec_1 = __nccwpck_require__(76400); +const v1CSINode_1 = __nccwpck_require__(47341); +const v1CSINodeDriver_1 = __nccwpck_require__(47995); +const v1CSINodeList_1 = __nccwpck_require__(43677); +const v1CSINodeSpec_1 = __nccwpck_require__(3443); +const v1CSIPersistentVolumeSource_1 = __nccwpck_require__(32892); +const v1CSIVolumeSource_1 = __nccwpck_require__(16840); +const v1Capabilities_1 = __nccwpck_require__(10982); +const v1CephFSPersistentVolumeSource_1 = __nccwpck_require__(67511); +const v1CephFSVolumeSource_1 = __nccwpck_require__(8539); +const v1CertificateSigningRequest_1 = __nccwpck_require__(57450); +const v1CertificateSigningRequestCondition_1 = __nccwpck_require__(56467); +const v1CertificateSigningRequestList_1 = __nccwpck_require__(29362); +const v1CertificateSigningRequestSpec_1 = __nccwpck_require__(61457); +const v1CertificateSigningRequestStatus_1 = __nccwpck_require__(14417); +const v1CinderPersistentVolumeSource_1 = __nccwpck_require__(68248); +const v1CinderVolumeSource_1 = __nccwpck_require__(41263); +const v1ClientIPConfig_1 = __nccwpck_require__(6201); +const v1ClusterRole_1 = __nccwpck_require__(19537); +const v1ClusterRoleBinding_1 = __nccwpck_require__(97878); +const v1ClusterRoleBindingList_1 = __nccwpck_require__(24665); +const v1ClusterRoleList_1 = __nccwpck_require__(90771); +const v1ComponentCondition_1 = __nccwpck_require__(86871); +const v1ComponentStatus_1 = __nccwpck_require__(30595); +const v1ComponentStatusList_1 = __nccwpck_require__(82764); +const v1Condition_1 = __nccwpck_require__(54629); +const v1ConfigMap_1 = __nccwpck_require__(99107); +const v1ConfigMapEnvSource_1 = __nccwpck_require__(15931); +const v1ConfigMapKeySelector_1 = __nccwpck_require__(29849); +const v1ConfigMapList_1 = __nccwpck_require__(76018); +const v1ConfigMapNodeConfigSource_1 = __nccwpck_require__(21303); +const v1ConfigMapProjection_1 = __nccwpck_require__(6677); +const v1ConfigMapVolumeSource_1 = __nccwpck_require__(36505); +const v1Container_1 = __nccwpck_require__(82444); +const v1ContainerImage_1 = __nccwpck_require__(66077); +const v1ContainerPort_1 = __nccwpck_require__(25468); +const v1ContainerState_1 = __nccwpck_require__(36618); +const v1ContainerStateRunning_1 = __nccwpck_require__(23454); +const v1ContainerStateTerminated_1 = __nccwpck_require__(75858); +const v1ContainerStateWaiting_1 = __nccwpck_require__(14074); +const v1ContainerStatus_1 = __nccwpck_require__(21790); +const v1ControllerRevision_1 = __nccwpck_require__(3630); +const v1ControllerRevisionList_1 = __nccwpck_require__(18510); +const v1CronJob_1 = __nccwpck_require__(24200); +const v1CronJobList_1 = __nccwpck_require__(60097); +const v1CronJobSpec_1 = __nccwpck_require__(91461); +const v1CronJobStatus_1 = __nccwpck_require__(56476); +const v1CrossVersionObjectReference_1 = __nccwpck_require__(82827); +const v1CustomResourceColumnDefinition_1 = __nccwpck_require__(46715); +const v1CustomResourceConversion_1 = __nccwpck_require__(51707); +const v1CustomResourceDefinition_1 = __nccwpck_require__(81081); +const v1CustomResourceDefinitionCondition_1 = __nccwpck_require__(26067); +const v1CustomResourceDefinitionList_1 = __nccwpck_require__(83976); +const v1CustomResourceDefinitionNames_1 = __nccwpck_require__(9523); +const v1CustomResourceDefinitionSpec_1 = __nccwpck_require__(57276); +const v1CustomResourceDefinitionStatus_1 = __nccwpck_require__(64124); +const v1CustomResourceDefinitionVersion_1 = __nccwpck_require__(67676); +const v1CustomResourceSubresourceScale_1 = __nccwpck_require__(71098); +const v1CustomResourceSubresources_1 = __nccwpck_require__(58786); +const v1CustomResourceValidation_1 = __nccwpck_require__(12835); +const v1DaemonEndpoint_1 = __nccwpck_require__(4281); +const v1DaemonSet_1 = __nccwpck_require__(83315); +const v1DaemonSetCondition_1 = __nccwpck_require__(57744); +const v1DaemonSetList_1 = __nccwpck_require__(74976); +const v1DaemonSetSpec_1 = __nccwpck_require__(56395); +const v1DaemonSetStatus_1 = __nccwpck_require__(40582); +const v1DaemonSetUpdateStrategy_1 = __nccwpck_require__(2497); +const v1DeleteOptions_1 = __nccwpck_require__(85201); +const v1Deployment_1 = __nccwpck_require__(20870); +const v1DeploymentCondition_1 = __nccwpck_require__(52085); +const v1DeploymentList_1 = __nccwpck_require__(26954); +const v1DeploymentSpec_1 = __nccwpck_require__(21109); +const v1DeploymentStatus_1 = __nccwpck_require__(14869); +const v1DeploymentStrategy_1 = __nccwpck_require__(11692); +const v1DownwardAPIProjection_1 = __nccwpck_require__(65792); +const v1DownwardAPIVolumeFile_1 = __nccwpck_require__(71598); +const v1DownwardAPIVolumeSource_1 = __nccwpck_require__(51638); +const v1EmptyDirVolumeSource_1 = __nccwpck_require__(6029); +const v1Endpoint_1 = __nccwpck_require__(12367); +const v1EndpointAddress_1 = __nccwpck_require__(41162); +const v1EndpointConditions_1 = __nccwpck_require__(12242); +const v1EndpointHints_1 = __nccwpck_require__(9685); +const v1EndpointSlice_1 = __nccwpck_require__(20132); +const v1EndpointSliceList_1 = __nccwpck_require__(17209); +const v1EndpointSubset_1 = __nccwpck_require__(59152); +const v1Endpoints_1 = __nccwpck_require__(74041); +const v1EndpointsList_1 = __nccwpck_require__(99674); +const v1EnvFromSource_1 = __nccwpck_require__(7479); +const v1EnvVar_1 = __nccwpck_require__(30588); +const v1EnvVarSource_1 = __nccwpck_require__(46561); +const v1EphemeralContainer_1 = __nccwpck_require__(15566); +const v1EphemeralContainers_1 = __nccwpck_require__(81805); +const v1EphemeralVolumeSource_1 = __nccwpck_require__(97946); +const v1EventSource_1 = __nccwpck_require__(56835); +const v1ExecAction_1 = __nccwpck_require__(91036); +const v1ExternalDocumentation_1 = __nccwpck_require__(9286); +const v1FCVolumeSource_1 = __nccwpck_require__(1948); +const v1FlexPersistentVolumeSource_1 = __nccwpck_require__(94533); +const v1FlexVolumeSource_1 = __nccwpck_require__(13240); +const v1FlockerVolumeSource_1 = __nccwpck_require__(85187); +const v1ForZone_1 = __nccwpck_require__(5371); +const v1GCEPersistentDiskVolumeSource_1 = __nccwpck_require__(37935); +const v1GitRepoVolumeSource_1 = __nccwpck_require__(13258); +const v1GlusterfsPersistentVolumeSource_1 = __nccwpck_require__(27204); +const v1GlusterfsVolumeSource_1 = __nccwpck_require__(29195); +const v1GroupVersionForDiscovery_1 = __nccwpck_require__(33402); +const v1HTTPGetAction_1 = __nccwpck_require__(8136); +const v1HTTPHeader_1 = __nccwpck_require__(74293); +const v1HTTPIngressPath_1 = __nccwpck_require__(56997); +const v1HTTPIngressRuleValue_1 = __nccwpck_require__(32171); +const v1Handler_1 = __nccwpck_require__(36100); +const v1HorizontalPodAutoscaler_1 = __nccwpck_require__(6627); +const v1HorizontalPodAutoscalerList_1 = __nccwpck_require__(99287); +const v1HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(27360); +const v1HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(79632); +const v1HostAlias_1 = __nccwpck_require__(75163); +const v1HostPathVolumeSource_1 = __nccwpck_require__(80954); +const v1IPBlock_1 = __nccwpck_require__(58489); +const v1ISCSIPersistentVolumeSource_1 = __nccwpck_require__(34368); +const v1ISCSIVolumeSource_1 = __nccwpck_require__(63617); +const v1Ingress_1 = __nccwpck_require__(29713); +const v1IngressBackend_1 = __nccwpck_require__(10482); +const v1IngressClass_1 = __nccwpck_require__(60988); +const v1IngressClassList_1 = __nccwpck_require__(15413); +const v1IngressClassParametersReference_1 = __nccwpck_require__(57566); +const v1IngressClassSpec_1 = __nccwpck_require__(6164); +const v1IngressList_1 = __nccwpck_require__(85661); +const v1IngressRule_1 = __nccwpck_require__(45343); +const v1IngressServiceBackend_1 = __nccwpck_require__(62512); +const v1IngressSpec_1 = __nccwpck_require__(11689); +const v1IngressStatus_1 = __nccwpck_require__(10166); +const v1IngressTLS_1 = __nccwpck_require__(45879); +const v1JSONSchemaProps_1 = __nccwpck_require__(31273); +const v1Job_1 = __nccwpck_require__(68438); +const v1JobCondition_1 = __nccwpck_require__(3560); +const v1JobList_1 = __nccwpck_require__(33526); +const v1JobSpec_1 = __nccwpck_require__(4215); +const v1JobStatus_1 = __nccwpck_require__(47734); +const v1JobTemplateSpec_1 = __nccwpck_require__(93145); +const v1KeyToPath_1 = __nccwpck_require__(85472); +const v1LabelSelector_1 = __nccwpck_require__(50890); +const v1LabelSelectorRequirement_1 = __nccwpck_require__(52777); +const v1Lease_1 = __nccwpck_require__(19024); +const v1LeaseList_1 = __nccwpck_require__(14624); +const v1LeaseSpec_1 = __nccwpck_require__(20788); +const v1Lifecycle_1 = __nccwpck_require__(97160); +const v1LimitRange_1 = __nccwpck_require__(7415); +const v1LimitRangeItem_1 = __nccwpck_require__(84434); +const v1LimitRangeList_1 = __nccwpck_require__(17410); +const v1LimitRangeSpec_1 = __nccwpck_require__(95723); +const v1ListMeta_1 = __nccwpck_require__(17931); +const v1LoadBalancerIngress_1 = __nccwpck_require__(48129); +const v1LoadBalancerStatus_1 = __nccwpck_require__(30727); +const v1LocalObjectReference_1 = __nccwpck_require__(14378); +const v1LocalSubjectAccessReview_1 = __nccwpck_require__(11795); +const v1LocalVolumeSource_1 = __nccwpck_require__(35221); +const v1ManagedFieldsEntry_1 = __nccwpck_require__(46389); +const v1MutatingWebhook_1 = __nccwpck_require__(70547); +const v1MutatingWebhookConfiguration_1 = __nccwpck_require__(19955); +const v1MutatingWebhookConfigurationList_1 = __nccwpck_require__(16773); +const v1NFSVolumeSource_1 = __nccwpck_require__(3721); +const v1Namespace_1 = __nccwpck_require__(80450); +const v1NamespaceCondition_1 = __nccwpck_require__(50793); +const v1NamespaceList_1 = __nccwpck_require__(2006); +const v1NamespaceSpec_1 = __nccwpck_require__(42698); +const v1NamespaceStatus_1 = __nccwpck_require__(78986); +const v1NetworkPolicy_1 = __nccwpck_require__(10228); +const v1NetworkPolicyEgressRule_1 = __nccwpck_require__(62397); +const v1NetworkPolicyIngressRule_1 = __nccwpck_require__(90583); +const v1NetworkPolicyList_1 = __nccwpck_require__(62002); +const v1NetworkPolicyPeer_1 = __nccwpck_require__(87917); +const v1NetworkPolicyPort_1 = __nccwpck_require__(93437); +const v1NetworkPolicySpec_1 = __nccwpck_require__(6948); +const v1Node_1 = __nccwpck_require__(85839); +const v1NodeAddress_1 = __nccwpck_require__(45709); +const v1NodeAffinity_1 = __nccwpck_require__(78540); +const v1NodeCondition_1 = __nccwpck_require__(66628); +const v1NodeConfigSource_1 = __nccwpck_require__(5282); +const v1NodeConfigStatus_1 = __nccwpck_require__(63150); +const v1NodeDaemonEndpoints_1 = __nccwpck_require__(72907); +const v1NodeList_1 = __nccwpck_require__(36339); +const v1NodeSelector_1 = __nccwpck_require__(99044); +const v1NodeSelectorRequirement_1 = __nccwpck_require__(77600); +const v1NodeSelectorTerm_1 = __nccwpck_require__(62333); +const v1NodeSpec_1 = __nccwpck_require__(89874); +const v1NodeStatus_1 = __nccwpck_require__(9526); +const v1NodeSystemInfo_1 = __nccwpck_require__(32724); +const v1NonResourceAttributes_1 = __nccwpck_require__(8878); +const v1NonResourceRule_1 = __nccwpck_require__(44081); +const v1ObjectFieldSelector_1 = __nccwpck_require__(52150); +const v1ObjectMeta_1 = __nccwpck_require__(88638); +const v1ObjectReference_1 = __nccwpck_require__(93792); +const v1Overhead_1 = __nccwpck_require__(87514); +const v1OwnerReference_1 = __nccwpck_require__(8143); +const v1PersistentVolume_1 = __nccwpck_require__(34661); +const v1PersistentVolumeClaim_1 = __nccwpck_require__(43856); +const v1PersistentVolumeClaimCondition_1 = __nccwpck_require__(84989); +const v1PersistentVolumeClaimList_1 = __nccwpck_require__(51875); +const v1PersistentVolumeClaimSpec_1 = __nccwpck_require__(3364); +const v1PersistentVolumeClaimStatus_1 = __nccwpck_require__(66521); +const v1PersistentVolumeClaimTemplate_1 = __nccwpck_require__(94329); +const v1PersistentVolumeClaimVolumeSource_1 = __nccwpck_require__(56849); +const v1PersistentVolumeList_1 = __nccwpck_require__(40700); +const v1PersistentVolumeSpec_1 = __nccwpck_require__(13386); +const v1PersistentVolumeStatus_1 = __nccwpck_require__(71028); +const v1PhotonPersistentDiskVolumeSource_1 = __nccwpck_require__(69815); +const v1Pod_1 = __nccwpck_require__(91845); +const v1PodAffinity_1 = __nccwpck_require__(60108); +const v1PodAffinityTerm_1 = __nccwpck_require__(41042); +const v1PodAntiAffinity_1 = __nccwpck_require__(50297); +const v1PodCondition_1 = __nccwpck_require__(71064); +const v1PodDNSConfig_1 = __nccwpck_require__(44598); +const v1PodDNSConfigOption_1 = __nccwpck_require__(96863); +const v1PodDisruptionBudget_1 = __nccwpck_require__(33836); +const v1PodDisruptionBudgetList_1 = __nccwpck_require__(19014); +const v1PodDisruptionBudgetSpec_1 = __nccwpck_require__(216); +const v1PodDisruptionBudgetStatus_1 = __nccwpck_require__(27906); +const v1PodIP_1 = __nccwpck_require__(58362); +const v1PodList_1 = __nccwpck_require__(26971); +const v1PodReadinessGate_1 = __nccwpck_require__(6709); +const v1PodSecurityContext_1 = __nccwpck_require__(99439); +const v1PodSpec_1 = __nccwpck_require__(82780); +const v1PodStatus_1 = __nccwpck_require__(19437); +const v1PodTemplate_1 = __nccwpck_require__(96091); +const v1PodTemplateList_1 = __nccwpck_require__(14020); +const v1PodTemplateSpec_1 = __nccwpck_require__(31731); +const v1PolicyRule_1 = __nccwpck_require__(29139); +const v1PortStatus_1 = __nccwpck_require__(4652); +const v1PortworxVolumeSource_1 = __nccwpck_require__(77988); +const v1Preconditions_1 = __nccwpck_require__(11022); +const v1PreferredSchedulingTerm_1 = __nccwpck_require__(68852); +const v1PriorityClass_1 = __nccwpck_require__(33470); +const v1PriorityClassList_1 = __nccwpck_require__(50264); +const v1Probe_1 = __nccwpck_require__(82432); +const v1ProjectedVolumeSource_1 = __nccwpck_require__(73598); +const v1QuobyteVolumeSource_1 = __nccwpck_require__(94635); +const v1RBDPersistentVolumeSource_1 = __nccwpck_require__(84895); +const v1RBDVolumeSource_1 = __nccwpck_require__(73369); +const v1ReplicaSet_1 = __nccwpck_require__(73725); +const v1ReplicaSetCondition_1 = __nccwpck_require__(76186); +const v1ReplicaSetList_1 = __nccwpck_require__(5042); +const v1ReplicaSetSpec_1 = __nccwpck_require__(12574); +const v1ReplicaSetStatus_1 = __nccwpck_require__(90145); +const v1ReplicationController_1 = __nccwpck_require__(60500); +const v1ReplicationControllerCondition_1 = __nccwpck_require__(27886); +const v1ReplicationControllerList_1 = __nccwpck_require__(86844); +const v1ReplicationControllerSpec_1 = __nccwpck_require__(48666); +const v1ReplicationControllerStatus_1 = __nccwpck_require__(67426); +const v1ResourceAttributes_1 = __nccwpck_require__(11995); +const v1ResourceFieldSelector_1 = __nccwpck_require__(59597); +const v1ResourceQuota_1 = __nccwpck_require__(51088); +const v1ResourceQuotaList_1 = __nccwpck_require__(35162); +const v1ResourceQuotaSpec_1 = __nccwpck_require__(56546); +const v1ResourceQuotaStatus_1 = __nccwpck_require__(46233); +const v1ResourceRequirements_1 = __nccwpck_require__(82525); +const v1ResourceRule_1 = __nccwpck_require__(41128); +const v1Role_1 = __nccwpck_require__(46997); +const v1RoleBinding_1 = __nccwpck_require__(41575); +const v1RoleBindingList_1 = __nccwpck_require__(36971); +const v1RoleList_1 = __nccwpck_require__(66081); +const v1RoleRef_1 = __nccwpck_require__(16454); +const v1RollingUpdateDaemonSet_1 = __nccwpck_require__(88113); +const v1RollingUpdateDeployment_1 = __nccwpck_require__(19616); +const v1RollingUpdateStatefulSetStrategy_1 = __nccwpck_require__(15899); +const v1RuleWithOperations_1 = __nccwpck_require__(73966); +const v1RuntimeClass_1 = __nccwpck_require__(84445); +const v1RuntimeClassList_1 = __nccwpck_require__(61491); +const v1SELinuxOptions_1 = __nccwpck_require__(56067); +const v1Scale_1 = __nccwpck_require__(65750); +const v1ScaleIOPersistentVolumeSource_1 = __nccwpck_require__(3065); +const v1ScaleIOVolumeSource_1 = __nccwpck_require__(41156); +const v1ScaleSpec_1 = __nccwpck_require__(55131); +const v1ScaleStatus_1 = __nccwpck_require__(91879); +const v1Scheduling_1 = __nccwpck_require__(20024); +const v1ScopeSelector_1 = __nccwpck_require__(54123); +const v1ScopedResourceSelectorRequirement_1 = __nccwpck_require__(38307); +const v1SeccompProfile_1 = __nccwpck_require__(82); +const v1Secret_1 = __nccwpck_require__(40626); +const v1SecretEnvSource_1 = __nccwpck_require__(60276); +const v1SecretKeySelector_1 = __nccwpck_require__(27536); +const v1SecretList_1 = __nccwpck_require__(20056); +const v1SecretProjection_1 = __nccwpck_require__(71241); +const v1SecretReference_1 = __nccwpck_require__(22746); +const v1SecretVolumeSource_1 = __nccwpck_require__(70716); +const v1SecurityContext_1 = __nccwpck_require__(48928); +const v1SelfSubjectAccessReview_1 = __nccwpck_require__(97443); +const v1SelfSubjectAccessReviewSpec_1 = __nccwpck_require__(73469); +const v1SelfSubjectRulesReview_1 = __nccwpck_require__(82875); +const v1SelfSubjectRulesReviewSpec_1 = __nccwpck_require__(29170); +const v1ServerAddressByClientCIDR_1 = __nccwpck_require__(99317); +const v1Service_1 = __nccwpck_require__(90952); +const v1ServiceAccount_1 = __nccwpck_require__(92117); +const v1ServiceAccountList_1 = __nccwpck_require__(13228); +const v1ServiceAccountTokenProjection_1 = __nccwpck_require__(55739); +const v1ServiceBackendPort_1 = __nccwpck_require__(8340); +const v1ServiceList_1 = __nccwpck_require__(3025); +const v1ServicePort_1 = __nccwpck_require__(16093); +const v1ServiceSpec_1 = __nccwpck_require__(56829); +const v1ServiceStatus_1 = __nccwpck_require__(1160); +const v1SessionAffinityConfig_1 = __nccwpck_require__(83492); +const v1StatefulSet_1 = __nccwpck_require__(56698); +const v1StatefulSetCondition_1 = __nccwpck_require__(80302); +const v1StatefulSetList_1 = __nccwpck_require__(79979); +const v1StatefulSetSpec_1 = __nccwpck_require__(85679); +const v1StatefulSetStatus_1 = __nccwpck_require__(16910); +const v1StatefulSetUpdateStrategy_1 = __nccwpck_require__(32755); +const v1Status_1 = __nccwpck_require__(32529); +const v1StatusCause_1 = __nccwpck_require__(59204); +const v1StatusDetails_1 = __nccwpck_require__(66551); +const v1StorageClass_1 = __nccwpck_require__(38118); +const v1StorageClassList_1 = __nccwpck_require__(8996); +const v1StorageOSPersistentVolumeSource_1 = __nccwpck_require__(64232); +const v1StorageOSVolumeSource_1 = __nccwpck_require__(83693); +const v1Subject_1 = __nccwpck_require__(40489); +const v1SubjectAccessReview_1 = __nccwpck_require__(16836); +const v1SubjectAccessReviewSpec_1 = __nccwpck_require__(8593); +const v1SubjectAccessReviewStatus_1 = __nccwpck_require__(13679); +const v1SubjectRulesReviewStatus_1 = __nccwpck_require__(65083); +const v1Sysctl_1 = __nccwpck_require__(74444); +const v1TCPSocketAction_1 = __nccwpck_require__(89082); +const v1Taint_1 = __nccwpck_require__(23946); +const v1TokenRequestSpec_1 = __nccwpck_require__(21866); +const v1TokenRequestStatus_1 = __nccwpck_require__(24995); +const v1TokenReview_1 = __nccwpck_require__(55097); +const v1TokenReviewSpec_1 = __nccwpck_require__(46232); +const v1TokenReviewStatus_1 = __nccwpck_require__(12917); +const v1Toleration_1 = __nccwpck_require__(68621); +const v1TopologySelectorLabelRequirement_1 = __nccwpck_require__(20539); +const v1TopologySelectorTerm_1 = __nccwpck_require__(65455); +const v1TopologySpreadConstraint_1 = __nccwpck_require__(37200); +const v1TypedLocalObjectReference_1 = __nccwpck_require__(23732); +const v1UserInfo_1 = __nccwpck_require__(23607); +const v1ValidatingWebhook_1 = __nccwpck_require__(4752); +const v1ValidatingWebhookConfiguration_1 = __nccwpck_require__(11509); +const v1ValidatingWebhookConfigurationList_1 = __nccwpck_require__(69599); +const v1Volume_1 = __nccwpck_require__(7393); +const v1VolumeAttachment_1 = __nccwpck_require__(80624); +const v1VolumeAttachmentList_1 = __nccwpck_require__(36604); +const v1VolumeAttachmentSource_1 = __nccwpck_require__(34472); +const v1VolumeAttachmentSpec_1 = __nccwpck_require__(15521); +const v1VolumeAttachmentStatus_1 = __nccwpck_require__(5306); +const v1VolumeDevice_1 = __nccwpck_require__(88958); +const v1VolumeError_1 = __nccwpck_require__(42776); +const v1VolumeMount_1 = __nccwpck_require__(40497); +const v1VolumeNodeAffinity_1 = __nccwpck_require__(20446); +const v1VolumeNodeResources_1 = __nccwpck_require__(2865); +const v1VolumeProjection_1 = __nccwpck_require__(9155); +const v1VsphereVirtualDiskVolumeSource_1 = __nccwpck_require__(867); +const v1WatchEvent_1 = __nccwpck_require__(67972); +const v1WebhookConversion_1 = __nccwpck_require__(19183); +const v1WeightedPodAffinityTerm_1 = __nccwpck_require__(29289); +const v1WindowsSecurityContextOptions_1 = __nccwpck_require__(40789); +const v1alpha1AggregationRule_1 = __nccwpck_require__(87558); +const v1alpha1CSIStorageCapacity_1 = __nccwpck_require__(76021); +const v1alpha1CSIStorageCapacityList_1 = __nccwpck_require__(80242); +const v1alpha1ClusterRole_1 = __nccwpck_require__(29217); +const v1alpha1ClusterRoleBinding_1 = __nccwpck_require__(37246); +const v1alpha1ClusterRoleBindingList_1 = __nccwpck_require__(70270); +const v1alpha1ClusterRoleList_1 = __nccwpck_require__(66963); +const v1alpha1Overhead_1 = __nccwpck_require__(66233); +const v1alpha1PolicyRule_1 = __nccwpck_require__(50140); +const v1alpha1PriorityClass_1 = __nccwpck_require__(93273); +const v1alpha1PriorityClassList_1 = __nccwpck_require__(45566); +const v1alpha1Role_1 = __nccwpck_require__(10592); +const v1alpha1RoleBinding_1 = __nccwpck_require__(50506); +const v1alpha1RoleBindingList_1 = __nccwpck_require__(5981); +const v1alpha1RoleList_1 = __nccwpck_require__(17478); +const v1alpha1RoleRef_1 = __nccwpck_require__(8030); +const v1alpha1RuntimeClass_1 = __nccwpck_require__(27837); +const v1alpha1RuntimeClassList_1 = __nccwpck_require__(86708); +const v1alpha1RuntimeClassSpec_1 = __nccwpck_require__(44061); +const v1alpha1Scheduling_1 = __nccwpck_require__(95862); +const v1alpha1ServerStorageVersion_1 = __nccwpck_require__(69438); +const v1alpha1StorageVersion_1 = __nccwpck_require__(21599); +const v1alpha1StorageVersionCondition_1 = __nccwpck_require__(1565); +const v1alpha1StorageVersionList_1 = __nccwpck_require__(60786); +const v1alpha1StorageVersionStatus_1 = __nccwpck_require__(5589); +const v1alpha1Subject_1 = __nccwpck_require__(11459); +const v1alpha1VolumeAttachment_1 = __nccwpck_require__(98725); +const v1alpha1VolumeAttachmentList_1 = __nccwpck_require__(65396); +const v1alpha1VolumeAttachmentSource_1 = __nccwpck_require__(9575); +const v1alpha1VolumeAttachmentSpec_1 = __nccwpck_require__(63761); +const v1alpha1VolumeAttachmentStatus_1 = __nccwpck_require__(85487); +const v1alpha1VolumeError_1 = __nccwpck_require__(69725); +const v1beta1APIService_1 = __nccwpck_require__(43299); +const v1beta1APIServiceCondition_1 = __nccwpck_require__(39417); +const v1beta1APIServiceList_1 = __nccwpck_require__(18308); +const v1beta1APIServiceSpec_1 = __nccwpck_require__(79606); +const v1beta1APIServiceStatus_1 = __nccwpck_require__(80723); +const v1beta1AggregationRule_1 = __nccwpck_require__(92202); +const v1beta1AllowedCSIDriver_1 = __nccwpck_require__(54187); +const v1beta1AllowedFlexVolume_1 = __nccwpck_require__(59116); +const v1beta1AllowedHostPath_1 = __nccwpck_require__(45746); +const v1beta1CSIDriver_1 = __nccwpck_require__(9571); +const v1beta1CSIDriverList_1 = __nccwpck_require__(63279); +const v1beta1CSIDriverSpec_1 = __nccwpck_require__(74978); +const v1beta1CSINode_1 = __nccwpck_require__(83387); +const v1beta1CSINodeDriver_1 = __nccwpck_require__(21043); +const v1beta1CSINodeList_1 = __nccwpck_require__(91886); +const v1beta1CSINodeSpec_1 = __nccwpck_require__(44389); +const v1beta1CSIStorageCapacity_1 = __nccwpck_require__(49500); +const v1beta1CSIStorageCapacityList_1 = __nccwpck_require__(48111); +const v1beta1CertificateSigningRequest_1 = __nccwpck_require__(17395); +const v1beta1CertificateSigningRequestCondition_1 = __nccwpck_require__(66655); +const v1beta1CertificateSigningRequestList_1 = __nccwpck_require__(26172); +const v1beta1CertificateSigningRequestSpec_1 = __nccwpck_require__(48763); +const v1beta1CertificateSigningRequestStatus_1 = __nccwpck_require__(44621); +const v1beta1ClusterRole_1 = __nccwpck_require__(93022); +const v1beta1ClusterRoleBinding_1 = __nccwpck_require__(58181); +const v1beta1ClusterRoleBindingList_1 = __nccwpck_require__(22644); +const v1beta1ClusterRoleList_1 = __nccwpck_require__(46066); +const v1beta1CronJob_1 = __nccwpck_require__(42702); +const v1beta1CronJobList_1 = __nccwpck_require__(20752); +const v1beta1CronJobSpec_1 = __nccwpck_require__(47584); +const v1beta1CronJobStatus_1 = __nccwpck_require__(11172); +const v1beta1CustomResourceColumnDefinition_1 = __nccwpck_require__(301); +const v1beta1CustomResourceConversion_1 = __nccwpck_require__(33037); +const v1beta1CustomResourceDefinition_1 = __nccwpck_require__(68993); +const v1beta1CustomResourceDefinitionCondition_1 = __nccwpck_require__(96530); +const v1beta1CustomResourceDefinitionList_1 = __nccwpck_require__(30273); +const v1beta1CustomResourceDefinitionNames_1 = __nccwpck_require__(80906); +const v1beta1CustomResourceDefinitionSpec_1 = __nccwpck_require__(20882); +const v1beta1CustomResourceDefinitionStatus_1 = __nccwpck_require__(19163); +const v1beta1CustomResourceDefinitionVersion_1 = __nccwpck_require__(89645); +const v1beta1CustomResourceSubresourceScale_1 = __nccwpck_require__(43381); +const v1beta1CustomResourceSubresources_1 = __nccwpck_require__(5156); +const v1beta1CustomResourceValidation_1 = __nccwpck_require__(67132); +const v1beta1Endpoint_1 = __nccwpck_require__(80649); +const v1beta1EndpointConditions_1 = __nccwpck_require__(22221); +const v1beta1EndpointHints_1 = __nccwpck_require__(78313); +const v1beta1EndpointPort_1 = __nccwpck_require__(38750); +const v1beta1EndpointSlice_1 = __nccwpck_require__(24976); +const v1beta1EndpointSliceList_1 = __nccwpck_require__(35869); +const v1beta1Event_1 = __nccwpck_require__(86653); +const v1beta1EventList_1 = __nccwpck_require__(97745); +const v1beta1EventSeries_1 = __nccwpck_require__(67482); +const v1beta1Eviction_1 = __nccwpck_require__(83673); +const v1beta1ExternalDocumentation_1 = __nccwpck_require__(35101); +const v1beta1FSGroupStrategyOptions_1 = __nccwpck_require__(75172); +const v1beta1FlowDistinguisherMethod_1 = __nccwpck_require__(89867); +const v1beta1FlowSchema_1 = __nccwpck_require__(84879); +const v1beta1FlowSchemaCondition_1 = __nccwpck_require__(64464); +const v1beta1FlowSchemaList_1 = __nccwpck_require__(5667); +const v1beta1FlowSchemaSpec_1 = __nccwpck_require__(60619); +const v1beta1FlowSchemaStatus_1 = __nccwpck_require__(55092); +const v1beta1ForZone_1 = __nccwpck_require__(53311); +const v1beta1GroupSubject_1 = __nccwpck_require__(9724); +const v1beta1HostPortRange_1 = __nccwpck_require__(72441); +const v1beta1IDRange_1 = __nccwpck_require__(72216); +const v1beta1IngressClass_1 = __nccwpck_require__(23422); +const v1beta1IngressClassList_1 = __nccwpck_require__(46799); +const v1beta1IngressClassParametersReference_1 = __nccwpck_require__(36341); +const v1beta1IngressClassSpec_1 = __nccwpck_require__(10700); +const v1beta1JSONSchemaProps_1 = __nccwpck_require__(14016); +const v1beta1JobTemplateSpec_1 = __nccwpck_require__(6910); +const v1beta1Lease_1 = __nccwpck_require__(4887); +const v1beta1LeaseList_1 = __nccwpck_require__(45684); +const v1beta1LeaseSpec_1 = __nccwpck_require__(13807); +const v1beta1LimitResponse_1 = __nccwpck_require__(8549); +const v1beta1LimitedPriorityLevelConfiguration_1 = __nccwpck_require__(14647); +const v1beta1LocalSubjectAccessReview_1 = __nccwpck_require__(69966); +const v1beta1MutatingWebhook_1 = __nccwpck_require__(90124); +const v1beta1MutatingWebhookConfiguration_1 = __nccwpck_require__(68173); +const v1beta1MutatingWebhookConfigurationList_1 = __nccwpck_require__(71239); +const v1beta1NonResourceAttributes_1 = __nccwpck_require__(62878); +const v1beta1NonResourcePolicyRule_1 = __nccwpck_require__(14671); +const v1beta1NonResourceRule_1 = __nccwpck_require__(41172); +const v1beta1Overhead_1 = __nccwpck_require__(21826); +const v1beta1PodDisruptionBudget_1 = __nccwpck_require__(29355); +const v1beta1PodDisruptionBudgetList_1 = __nccwpck_require__(3582); +const v1beta1PodDisruptionBudgetSpec_1 = __nccwpck_require__(55143); +const v1beta1PodDisruptionBudgetStatus_1 = __nccwpck_require__(72221); +const v1beta1PodSecurityPolicy_1 = __nccwpck_require__(43774); +const v1beta1PodSecurityPolicyList_1 = __nccwpck_require__(18556); +const v1beta1PodSecurityPolicySpec_1 = __nccwpck_require__(49941); +const v1beta1PolicyRule_1 = __nccwpck_require__(83966); +const v1beta1PolicyRulesWithSubjects_1 = __nccwpck_require__(6213); +const v1beta1PriorityClass_1 = __nccwpck_require__(75628); +const v1beta1PriorityClassList_1 = __nccwpck_require__(2448); +const v1beta1PriorityLevelConfiguration_1 = __nccwpck_require__(44787); +const v1beta1PriorityLevelConfigurationCondition_1 = __nccwpck_require__(12833); +const v1beta1PriorityLevelConfigurationList_1 = __nccwpck_require__(57721); +const v1beta1PriorityLevelConfigurationReference_1 = __nccwpck_require__(32224); +const v1beta1PriorityLevelConfigurationSpec_1 = __nccwpck_require__(90058); +const v1beta1PriorityLevelConfigurationStatus_1 = __nccwpck_require__(4641); +const v1beta1QueuingConfiguration_1 = __nccwpck_require__(18090); +const v1beta1ResourceAttributes_1 = __nccwpck_require__(78678); +const v1beta1ResourcePolicyRule_1 = __nccwpck_require__(58511); +const v1beta1ResourceRule_1 = __nccwpck_require__(21028); +const v1beta1Role_1 = __nccwpck_require__(92494); +const v1beta1RoleBinding_1 = __nccwpck_require__(19582); +const v1beta1RoleBindingList_1 = __nccwpck_require__(68085); +const v1beta1RoleList_1 = __nccwpck_require__(97239); +const v1beta1RoleRef_1 = __nccwpck_require__(34021); +const v1beta1RuleWithOperations_1 = __nccwpck_require__(67315); +const v1beta1RunAsGroupStrategyOptions_1 = __nccwpck_require__(74178); +const v1beta1RunAsUserStrategyOptions_1 = __nccwpck_require__(77258); +const v1beta1RuntimeClass_1 = __nccwpck_require__(65466); +const v1beta1RuntimeClassList_1 = __nccwpck_require__(89177); +const v1beta1RuntimeClassStrategyOptions_1 = __nccwpck_require__(96835); +const v1beta1SELinuxStrategyOptions_1 = __nccwpck_require__(87047); +const v1beta1Scheduling_1 = __nccwpck_require__(32498); +const v1beta1SelfSubjectAccessReview_1 = __nccwpck_require__(95373); +const v1beta1SelfSubjectAccessReviewSpec_1 = __nccwpck_require__(13872); +const v1beta1SelfSubjectRulesReview_1 = __nccwpck_require__(95993); +const v1beta1SelfSubjectRulesReviewSpec_1 = __nccwpck_require__(94811); +const v1beta1ServiceAccountSubject_1 = __nccwpck_require__(9806); +const v1beta1StorageClass_1 = __nccwpck_require__(59527); +const v1beta1StorageClassList_1 = __nccwpck_require__(53104); +const v1beta1SubjectAccessReview_1 = __nccwpck_require__(42158); +const v1beta1SubjectAccessReviewSpec_1 = __nccwpck_require__(99226); +const v1beta1SubjectAccessReviewStatus_1 = __nccwpck_require__(38415); +const v1beta1SubjectRulesReviewStatus_1 = __nccwpck_require__(23675); +const v1beta1SupplementalGroupsStrategyOptions_1 = __nccwpck_require__(42686); +const v1beta1TokenRequest_1 = __nccwpck_require__(94406); +const v1beta1TokenReview_1 = __nccwpck_require__(63997); +const v1beta1TokenReviewSpec_1 = __nccwpck_require__(54015); +const v1beta1TokenReviewStatus_1 = __nccwpck_require__(51195); +const v1beta1UserInfo_1 = __nccwpck_require__(98901); +const v1beta1UserSubject_1 = __nccwpck_require__(57664); +const v1beta1ValidatingWebhook_1 = __nccwpck_require__(91590); +const v1beta1ValidatingWebhookConfiguration_1 = __nccwpck_require__(87363); +const v1beta1ValidatingWebhookConfigurationList_1 = __nccwpck_require__(47530); +const v1beta1VolumeAttachment_1 = __nccwpck_require__(71450); +const v1beta1VolumeAttachmentList_1 = __nccwpck_require__(56970); +const v1beta1VolumeAttachmentSource_1 = __nccwpck_require__(15211); +const v1beta1VolumeAttachmentSpec_1 = __nccwpck_require__(98579); +const v1beta1VolumeAttachmentStatus_1 = __nccwpck_require__(80522); +const v1beta1VolumeError_1 = __nccwpck_require__(1706); +const v1beta1VolumeNodeResources_1 = __nccwpck_require__(14240); +const v2beta1ContainerResourceMetricSource_1 = __nccwpck_require__(66922); +const v2beta1ContainerResourceMetricStatus_1 = __nccwpck_require__(5608); +const v2beta1CrossVersionObjectReference_1 = __nccwpck_require__(89681); +const v2beta1ExternalMetricSource_1 = __nccwpck_require__(33128); +const v2beta1ExternalMetricStatus_1 = __nccwpck_require__(85775); +const v2beta1HorizontalPodAutoscaler_1 = __nccwpck_require__(1023); +const v2beta1HorizontalPodAutoscalerCondition_1 = __nccwpck_require__(84034); +const v2beta1HorizontalPodAutoscalerList_1 = __nccwpck_require__(57894); +const v2beta1HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(3023); +const v2beta1HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(90870); +const v2beta1MetricSpec_1 = __nccwpck_require__(54389); +const v2beta1MetricStatus_1 = __nccwpck_require__(79631); +const v2beta1ObjectMetricSource_1 = __nccwpck_require__(30995); +const v2beta1ObjectMetricStatus_1 = __nccwpck_require__(93407); +const v2beta1PodsMetricSource_1 = __nccwpck_require__(41159); +const v2beta1PodsMetricStatus_1 = __nccwpck_require__(65988); +const v2beta1ResourceMetricSource_1 = __nccwpck_require__(5762); +const v2beta1ResourceMetricStatus_1 = __nccwpck_require__(7428); +const v2beta2ContainerResourceMetricSource_1 = __nccwpck_require__(36047); +const v2beta2ContainerResourceMetricStatus_1 = __nccwpck_require__(19201); +const v2beta2CrossVersionObjectReference_1 = __nccwpck_require__(10397); +const v2beta2ExternalMetricSource_1 = __nccwpck_require__(56058); +const v2beta2ExternalMetricStatus_1 = __nccwpck_require__(25422); +const v2beta2HPAScalingPolicy_1 = __nccwpck_require__(87223); +const v2beta2HPAScalingRules_1 = __nccwpck_require__(36770); +const v2beta2HorizontalPodAutoscaler_1 = __nccwpck_require__(76584); +const v2beta2HorizontalPodAutoscalerBehavior_1 = __nccwpck_require__(22053); +const v2beta2HorizontalPodAutoscalerCondition_1 = __nccwpck_require__(5668); +const v2beta2HorizontalPodAutoscalerList_1 = __nccwpck_require__(22138); +const v2beta2HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(78022); +const v2beta2HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(43646); +const v2beta2MetricIdentifier_1 = __nccwpck_require__(97447); +const v2beta2MetricSpec_1 = __nccwpck_require__(71223); +const v2beta2MetricStatus_1 = __nccwpck_require__(19643); +const v2beta2MetricTarget_1 = __nccwpck_require__(19640); +const v2beta2MetricValueStatus_1 = __nccwpck_require__(75903); +const v2beta2ObjectMetricSource_1 = __nccwpck_require__(33688); +const v2beta2ObjectMetricStatus_1 = __nccwpck_require__(29610); +const v2beta2PodsMetricSource_1 = __nccwpck_require__(10783); +const v2beta2PodsMetricStatus_1 = __nccwpck_require__(39981); +const v2beta2ResourceMetricSource_1 = __nccwpck_require__(78341); +const v2beta2ResourceMetricStatus_1 = __nccwpck_require__(77136); +const versionInfo_1 = __nccwpck_require__(13793); +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" +]; +let enumsMap = {}; +let typeMap = { + "AdmissionregistrationV1ServiceReference": admissionregistrationV1ServiceReference_1.AdmissionregistrationV1ServiceReference, + "AdmissionregistrationV1WebhookClientConfig": admissionregistrationV1WebhookClientConfig_1.AdmissionregistrationV1WebhookClientConfig, + "AdmissionregistrationV1beta1ServiceReference": admissionregistrationV1beta1ServiceReference_1.AdmissionregistrationV1beta1ServiceReference, + "AdmissionregistrationV1beta1WebhookClientConfig": admissionregistrationV1beta1WebhookClientConfig_1.AdmissionregistrationV1beta1WebhookClientConfig, + "ApiextensionsV1ServiceReference": apiextensionsV1ServiceReference_1.ApiextensionsV1ServiceReference, + "ApiextensionsV1WebhookClientConfig": apiextensionsV1WebhookClientConfig_1.ApiextensionsV1WebhookClientConfig, + "ApiextensionsV1beta1ServiceReference": apiextensionsV1beta1ServiceReference_1.ApiextensionsV1beta1ServiceReference, + "ApiextensionsV1beta1WebhookClientConfig": apiextensionsV1beta1WebhookClientConfig_1.ApiextensionsV1beta1WebhookClientConfig, + "ApiregistrationV1ServiceReference": apiregistrationV1ServiceReference_1.ApiregistrationV1ServiceReference, + "ApiregistrationV1beta1ServiceReference": apiregistrationV1beta1ServiceReference_1.ApiregistrationV1beta1ServiceReference, + "AuthenticationV1TokenRequest": authenticationV1TokenRequest_1.AuthenticationV1TokenRequest, + "CoreV1EndpointPort": coreV1EndpointPort_1.CoreV1EndpointPort, + "CoreV1Event": coreV1Event_1.CoreV1Event, + "CoreV1EventList": coreV1EventList_1.CoreV1EventList, + "CoreV1EventSeries": coreV1EventSeries_1.CoreV1EventSeries, + "DiscoveryV1EndpointPort": discoveryV1EndpointPort_1.DiscoveryV1EndpointPort, + "EventsV1Event": eventsV1Event_1.EventsV1Event, + "EventsV1EventList": eventsV1EventList_1.EventsV1EventList, + "EventsV1EventSeries": eventsV1EventSeries_1.EventsV1EventSeries, + "ExtensionsV1beta1HTTPIngressPath": extensionsV1beta1HTTPIngressPath_1.ExtensionsV1beta1HTTPIngressPath, + "ExtensionsV1beta1HTTPIngressRuleValue": extensionsV1beta1HTTPIngressRuleValue_1.ExtensionsV1beta1HTTPIngressRuleValue, + "ExtensionsV1beta1Ingress": extensionsV1beta1Ingress_1.ExtensionsV1beta1Ingress, + "ExtensionsV1beta1IngressBackend": extensionsV1beta1IngressBackend_1.ExtensionsV1beta1IngressBackend, + "ExtensionsV1beta1IngressList": extensionsV1beta1IngressList_1.ExtensionsV1beta1IngressList, + "ExtensionsV1beta1IngressRule": extensionsV1beta1IngressRule_1.ExtensionsV1beta1IngressRule, + "ExtensionsV1beta1IngressSpec": extensionsV1beta1IngressSpec_1.ExtensionsV1beta1IngressSpec, + "ExtensionsV1beta1IngressStatus": extensionsV1beta1IngressStatus_1.ExtensionsV1beta1IngressStatus, + "ExtensionsV1beta1IngressTLS": extensionsV1beta1IngressTLS_1.ExtensionsV1beta1IngressTLS, + "FlowcontrolV1beta1Subject": flowcontrolV1beta1Subject_1.FlowcontrolV1beta1Subject, + "NetworkingV1beta1HTTPIngressPath": networkingV1beta1HTTPIngressPath_1.NetworkingV1beta1HTTPIngressPath, + "NetworkingV1beta1HTTPIngressRuleValue": networkingV1beta1HTTPIngressRuleValue_1.NetworkingV1beta1HTTPIngressRuleValue, + "NetworkingV1beta1Ingress": networkingV1beta1Ingress_1.NetworkingV1beta1Ingress, + "NetworkingV1beta1IngressBackend": networkingV1beta1IngressBackend_1.NetworkingV1beta1IngressBackend, + "NetworkingV1beta1IngressList": networkingV1beta1IngressList_1.NetworkingV1beta1IngressList, + "NetworkingV1beta1IngressRule": networkingV1beta1IngressRule_1.NetworkingV1beta1IngressRule, + "NetworkingV1beta1IngressSpec": networkingV1beta1IngressSpec_1.NetworkingV1beta1IngressSpec, + "NetworkingV1beta1IngressStatus": networkingV1beta1IngressStatus_1.NetworkingV1beta1IngressStatus, + "NetworkingV1beta1IngressTLS": networkingV1beta1IngressTLS_1.NetworkingV1beta1IngressTLS, + "RbacV1beta1Subject": rbacV1beta1Subject_1.RbacV1beta1Subject, + "StorageV1TokenRequest": storageV1TokenRequest_1.StorageV1TokenRequest, + "V1APIGroup": v1APIGroup_1.V1APIGroup, + "V1APIGroupList": v1APIGroupList_1.V1APIGroupList, + "V1APIResource": v1APIResource_1.V1APIResource, + "V1APIResourceList": v1APIResourceList_1.V1APIResourceList, + "V1APIService": v1APIService_1.V1APIService, + "V1APIServiceCondition": v1APIServiceCondition_1.V1APIServiceCondition, + "V1APIServiceList": v1APIServiceList_1.V1APIServiceList, + "V1APIServiceSpec": v1APIServiceSpec_1.V1APIServiceSpec, + "V1APIServiceStatus": v1APIServiceStatus_1.V1APIServiceStatus, + "V1APIVersions": v1APIVersions_1.V1APIVersions, + "V1AWSElasticBlockStoreVolumeSource": v1AWSElasticBlockStoreVolumeSource_1.V1AWSElasticBlockStoreVolumeSource, + "V1Affinity": v1Affinity_1.V1Affinity, + "V1AggregationRule": v1AggregationRule_1.V1AggregationRule, + "V1AttachedVolume": v1AttachedVolume_1.V1AttachedVolume, + "V1AzureDiskVolumeSource": v1AzureDiskVolumeSource_1.V1AzureDiskVolumeSource, + "V1AzureFilePersistentVolumeSource": v1AzureFilePersistentVolumeSource_1.V1AzureFilePersistentVolumeSource, + "V1AzureFileVolumeSource": v1AzureFileVolumeSource_1.V1AzureFileVolumeSource, + "V1Binding": v1Binding_1.V1Binding, + "V1BoundObjectReference": v1BoundObjectReference_1.V1BoundObjectReference, + "V1CSIDriver": v1CSIDriver_1.V1CSIDriver, + "V1CSIDriverList": v1CSIDriverList_1.V1CSIDriverList, + "V1CSIDriverSpec": v1CSIDriverSpec_1.V1CSIDriverSpec, + "V1CSINode": v1CSINode_1.V1CSINode, + "V1CSINodeDriver": v1CSINodeDriver_1.V1CSINodeDriver, + "V1CSINodeList": v1CSINodeList_1.V1CSINodeList, + "V1CSINodeSpec": v1CSINodeSpec_1.V1CSINodeSpec, + "V1CSIPersistentVolumeSource": v1CSIPersistentVolumeSource_1.V1CSIPersistentVolumeSource, + "V1CSIVolumeSource": v1CSIVolumeSource_1.V1CSIVolumeSource, + "V1Capabilities": v1Capabilities_1.V1Capabilities, + "V1CephFSPersistentVolumeSource": v1CephFSPersistentVolumeSource_1.V1CephFSPersistentVolumeSource, + "V1CephFSVolumeSource": v1CephFSVolumeSource_1.V1CephFSVolumeSource, + "V1CertificateSigningRequest": v1CertificateSigningRequest_1.V1CertificateSigningRequest, + "V1CertificateSigningRequestCondition": v1CertificateSigningRequestCondition_1.V1CertificateSigningRequestCondition, + "V1CertificateSigningRequestList": v1CertificateSigningRequestList_1.V1CertificateSigningRequestList, + "V1CertificateSigningRequestSpec": v1CertificateSigningRequestSpec_1.V1CertificateSigningRequestSpec, + "V1CertificateSigningRequestStatus": v1CertificateSigningRequestStatus_1.V1CertificateSigningRequestStatus, + "V1CinderPersistentVolumeSource": v1CinderPersistentVolumeSource_1.V1CinderPersistentVolumeSource, + "V1CinderVolumeSource": v1CinderVolumeSource_1.V1CinderVolumeSource, + "V1ClientIPConfig": v1ClientIPConfig_1.V1ClientIPConfig, + "V1ClusterRole": v1ClusterRole_1.V1ClusterRole, + "V1ClusterRoleBinding": v1ClusterRoleBinding_1.V1ClusterRoleBinding, + "V1ClusterRoleBindingList": v1ClusterRoleBindingList_1.V1ClusterRoleBindingList, + "V1ClusterRoleList": v1ClusterRoleList_1.V1ClusterRoleList, + "V1ComponentCondition": v1ComponentCondition_1.V1ComponentCondition, + "V1ComponentStatus": v1ComponentStatus_1.V1ComponentStatus, + "V1ComponentStatusList": v1ComponentStatusList_1.V1ComponentStatusList, + "V1Condition": v1Condition_1.V1Condition, + "V1ConfigMap": v1ConfigMap_1.V1ConfigMap, + "V1ConfigMapEnvSource": v1ConfigMapEnvSource_1.V1ConfigMapEnvSource, + "V1ConfigMapKeySelector": v1ConfigMapKeySelector_1.V1ConfigMapKeySelector, + "V1ConfigMapList": v1ConfigMapList_1.V1ConfigMapList, + "V1ConfigMapNodeConfigSource": v1ConfigMapNodeConfigSource_1.V1ConfigMapNodeConfigSource, + "V1ConfigMapProjection": v1ConfigMapProjection_1.V1ConfigMapProjection, + "V1ConfigMapVolumeSource": v1ConfigMapVolumeSource_1.V1ConfigMapVolumeSource, + "V1Container": v1Container_1.V1Container, + "V1ContainerImage": v1ContainerImage_1.V1ContainerImage, + "V1ContainerPort": v1ContainerPort_1.V1ContainerPort, + "V1ContainerState": v1ContainerState_1.V1ContainerState, + "V1ContainerStateRunning": v1ContainerStateRunning_1.V1ContainerStateRunning, + "V1ContainerStateTerminated": v1ContainerStateTerminated_1.V1ContainerStateTerminated, + "V1ContainerStateWaiting": v1ContainerStateWaiting_1.V1ContainerStateWaiting, + "V1ContainerStatus": v1ContainerStatus_1.V1ContainerStatus, + "V1ControllerRevision": v1ControllerRevision_1.V1ControllerRevision, + "V1ControllerRevisionList": v1ControllerRevisionList_1.V1ControllerRevisionList, + "V1CronJob": v1CronJob_1.V1CronJob, + "V1CronJobList": v1CronJobList_1.V1CronJobList, + "V1CronJobSpec": v1CronJobSpec_1.V1CronJobSpec, + "V1CronJobStatus": v1CronJobStatus_1.V1CronJobStatus, + "V1CrossVersionObjectReference": v1CrossVersionObjectReference_1.V1CrossVersionObjectReference, + "V1CustomResourceColumnDefinition": v1CustomResourceColumnDefinition_1.V1CustomResourceColumnDefinition, + "V1CustomResourceConversion": v1CustomResourceConversion_1.V1CustomResourceConversion, + "V1CustomResourceDefinition": v1CustomResourceDefinition_1.V1CustomResourceDefinition, + "V1CustomResourceDefinitionCondition": v1CustomResourceDefinitionCondition_1.V1CustomResourceDefinitionCondition, + "V1CustomResourceDefinitionList": v1CustomResourceDefinitionList_1.V1CustomResourceDefinitionList, + "V1CustomResourceDefinitionNames": v1CustomResourceDefinitionNames_1.V1CustomResourceDefinitionNames, + "V1CustomResourceDefinitionSpec": v1CustomResourceDefinitionSpec_1.V1CustomResourceDefinitionSpec, + "V1CustomResourceDefinitionStatus": v1CustomResourceDefinitionStatus_1.V1CustomResourceDefinitionStatus, + "V1CustomResourceDefinitionVersion": v1CustomResourceDefinitionVersion_1.V1CustomResourceDefinitionVersion, + "V1CustomResourceSubresourceScale": v1CustomResourceSubresourceScale_1.V1CustomResourceSubresourceScale, + "V1CustomResourceSubresources": v1CustomResourceSubresources_1.V1CustomResourceSubresources, + "V1CustomResourceValidation": v1CustomResourceValidation_1.V1CustomResourceValidation, + "V1DaemonEndpoint": v1DaemonEndpoint_1.V1DaemonEndpoint, + "V1DaemonSet": v1DaemonSet_1.V1DaemonSet, + "V1DaemonSetCondition": v1DaemonSetCondition_1.V1DaemonSetCondition, + "V1DaemonSetList": v1DaemonSetList_1.V1DaemonSetList, + "V1DaemonSetSpec": v1DaemonSetSpec_1.V1DaemonSetSpec, + "V1DaemonSetStatus": v1DaemonSetStatus_1.V1DaemonSetStatus, + "V1DaemonSetUpdateStrategy": v1DaemonSetUpdateStrategy_1.V1DaemonSetUpdateStrategy, + "V1DeleteOptions": v1DeleteOptions_1.V1DeleteOptions, + "V1Deployment": v1Deployment_1.V1Deployment, + "V1DeploymentCondition": v1DeploymentCondition_1.V1DeploymentCondition, + "V1DeploymentList": v1DeploymentList_1.V1DeploymentList, + "V1DeploymentSpec": v1DeploymentSpec_1.V1DeploymentSpec, + "V1DeploymentStatus": v1DeploymentStatus_1.V1DeploymentStatus, + "V1DeploymentStrategy": v1DeploymentStrategy_1.V1DeploymentStrategy, + "V1DownwardAPIProjection": v1DownwardAPIProjection_1.V1DownwardAPIProjection, + "V1DownwardAPIVolumeFile": v1DownwardAPIVolumeFile_1.V1DownwardAPIVolumeFile, + "V1DownwardAPIVolumeSource": v1DownwardAPIVolumeSource_1.V1DownwardAPIVolumeSource, + "V1EmptyDirVolumeSource": v1EmptyDirVolumeSource_1.V1EmptyDirVolumeSource, + "V1Endpoint": v1Endpoint_1.V1Endpoint, + "V1EndpointAddress": v1EndpointAddress_1.V1EndpointAddress, + "V1EndpointConditions": v1EndpointConditions_1.V1EndpointConditions, + "V1EndpointHints": v1EndpointHints_1.V1EndpointHints, + "V1EndpointSlice": v1EndpointSlice_1.V1EndpointSlice, + "V1EndpointSliceList": v1EndpointSliceList_1.V1EndpointSliceList, + "V1EndpointSubset": v1EndpointSubset_1.V1EndpointSubset, + "V1Endpoints": v1Endpoints_1.V1Endpoints, + "V1EndpointsList": v1EndpointsList_1.V1EndpointsList, + "V1EnvFromSource": v1EnvFromSource_1.V1EnvFromSource, + "V1EnvVar": v1EnvVar_1.V1EnvVar, + "V1EnvVarSource": v1EnvVarSource_1.V1EnvVarSource, + "V1EphemeralContainer": v1EphemeralContainer_1.V1EphemeralContainer, + "V1EphemeralContainers": v1EphemeralContainers_1.V1EphemeralContainers, + "V1EphemeralVolumeSource": v1EphemeralVolumeSource_1.V1EphemeralVolumeSource, + "V1EventSource": v1EventSource_1.V1EventSource, + "V1ExecAction": v1ExecAction_1.V1ExecAction, + "V1ExternalDocumentation": v1ExternalDocumentation_1.V1ExternalDocumentation, + "V1FCVolumeSource": v1FCVolumeSource_1.V1FCVolumeSource, + "V1FlexPersistentVolumeSource": v1FlexPersistentVolumeSource_1.V1FlexPersistentVolumeSource, + "V1FlexVolumeSource": v1FlexVolumeSource_1.V1FlexVolumeSource, + "V1FlockerVolumeSource": v1FlockerVolumeSource_1.V1FlockerVolumeSource, + "V1ForZone": v1ForZone_1.V1ForZone, + "V1GCEPersistentDiskVolumeSource": v1GCEPersistentDiskVolumeSource_1.V1GCEPersistentDiskVolumeSource, + "V1GitRepoVolumeSource": v1GitRepoVolumeSource_1.V1GitRepoVolumeSource, + "V1GlusterfsPersistentVolumeSource": v1GlusterfsPersistentVolumeSource_1.V1GlusterfsPersistentVolumeSource, + "V1GlusterfsVolumeSource": v1GlusterfsVolumeSource_1.V1GlusterfsVolumeSource, + "V1GroupVersionForDiscovery": v1GroupVersionForDiscovery_1.V1GroupVersionForDiscovery, + "V1HTTPGetAction": v1HTTPGetAction_1.V1HTTPGetAction, + "V1HTTPHeader": v1HTTPHeader_1.V1HTTPHeader, + "V1HTTPIngressPath": v1HTTPIngressPath_1.V1HTTPIngressPath, + "V1HTTPIngressRuleValue": v1HTTPIngressRuleValue_1.V1HTTPIngressRuleValue, + "V1Handler": v1Handler_1.V1Handler, + "V1HorizontalPodAutoscaler": v1HorizontalPodAutoscaler_1.V1HorizontalPodAutoscaler, + "V1HorizontalPodAutoscalerList": v1HorizontalPodAutoscalerList_1.V1HorizontalPodAutoscalerList, + "V1HorizontalPodAutoscalerSpec": v1HorizontalPodAutoscalerSpec_1.V1HorizontalPodAutoscalerSpec, + "V1HorizontalPodAutoscalerStatus": v1HorizontalPodAutoscalerStatus_1.V1HorizontalPodAutoscalerStatus, + "V1HostAlias": v1HostAlias_1.V1HostAlias, + "V1HostPathVolumeSource": v1HostPathVolumeSource_1.V1HostPathVolumeSource, + "V1IPBlock": v1IPBlock_1.V1IPBlock, + "V1ISCSIPersistentVolumeSource": v1ISCSIPersistentVolumeSource_1.V1ISCSIPersistentVolumeSource, + "V1ISCSIVolumeSource": v1ISCSIVolumeSource_1.V1ISCSIVolumeSource, + "V1Ingress": v1Ingress_1.V1Ingress, + "V1IngressBackend": v1IngressBackend_1.V1IngressBackend, + "V1IngressClass": v1IngressClass_1.V1IngressClass, + "V1IngressClassList": v1IngressClassList_1.V1IngressClassList, + "V1IngressClassParametersReference": v1IngressClassParametersReference_1.V1IngressClassParametersReference, + "V1IngressClassSpec": v1IngressClassSpec_1.V1IngressClassSpec, + "V1IngressList": v1IngressList_1.V1IngressList, + "V1IngressRule": v1IngressRule_1.V1IngressRule, + "V1IngressServiceBackend": v1IngressServiceBackend_1.V1IngressServiceBackend, + "V1IngressSpec": v1IngressSpec_1.V1IngressSpec, + "V1IngressStatus": v1IngressStatus_1.V1IngressStatus, + "V1IngressTLS": v1IngressTLS_1.V1IngressTLS, + "V1JSONSchemaProps": v1JSONSchemaProps_1.V1JSONSchemaProps, + "V1Job": v1Job_1.V1Job, + "V1JobCondition": v1JobCondition_1.V1JobCondition, + "V1JobList": v1JobList_1.V1JobList, + "V1JobSpec": v1JobSpec_1.V1JobSpec, + "V1JobStatus": v1JobStatus_1.V1JobStatus, + "V1JobTemplateSpec": v1JobTemplateSpec_1.V1JobTemplateSpec, + "V1KeyToPath": v1KeyToPath_1.V1KeyToPath, + "V1LabelSelector": v1LabelSelector_1.V1LabelSelector, + "V1LabelSelectorRequirement": v1LabelSelectorRequirement_1.V1LabelSelectorRequirement, + "V1Lease": v1Lease_1.V1Lease, + "V1LeaseList": v1LeaseList_1.V1LeaseList, + "V1LeaseSpec": v1LeaseSpec_1.V1LeaseSpec, + "V1Lifecycle": v1Lifecycle_1.V1Lifecycle, + "V1LimitRange": v1LimitRange_1.V1LimitRange, + "V1LimitRangeItem": v1LimitRangeItem_1.V1LimitRangeItem, + "V1LimitRangeList": v1LimitRangeList_1.V1LimitRangeList, + "V1LimitRangeSpec": v1LimitRangeSpec_1.V1LimitRangeSpec, + "V1ListMeta": v1ListMeta_1.V1ListMeta, + "V1LoadBalancerIngress": v1LoadBalancerIngress_1.V1LoadBalancerIngress, + "V1LoadBalancerStatus": v1LoadBalancerStatus_1.V1LoadBalancerStatus, + "V1LocalObjectReference": v1LocalObjectReference_1.V1LocalObjectReference, + "V1LocalSubjectAccessReview": v1LocalSubjectAccessReview_1.V1LocalSubjectAccessReview, + "V1LocalVolumeSource": v1LocalVolumeSource_1.V1LocalVolumeSource, + "V1ManagedFieldsEntry": v1ManagedFieldsEntry_1.V1ManagedFieldsEntry, + "V1MutatingWebhook": v1MutatingWebhook_1.V1MutatingWebhook, + "V1MutatingWebhookConfiguration": v1MutatingWebhookConfiguration_1.V1MutatingWebhookConfiguration, + "V1MutatingWebhookConfigurationList": v1MutatingWebhookConfigurationList_1.V1MutatingWebhookConfigurationList, + "V1NFSVolumeSource": v1NFSVolumeSource_1.V1NFSVolumeSource, + "V1Namespace": v1Namespace_1.V1Namespace, + "V1NamespaceCondition": v1NamespaceCondition_1.V1NamespaceCondition, + "V1NamespaceList": v1NamespaceList_1.V1NamespaceList, + "V1NamespaceSpec": v1NamespaceSpec_1.V1NamespaceSpec, + "V1NamespaceStatus": v1NamespaceStatus_1.V1NamespaceStatus, + "V1NetworkPolicy": v1NetworkPolicy_1.V1NetworkPolicy, + "V1NetworkPolicyEgressRule": v1NetworkPolicyEgressRule_1.V1NetworkPolicyEgressRule, + "V1NetworkPolicyIngressRule": v1NetworkPolicyIngressRule_1.V1NetworkPolicyIngressRule, + "V1NetworkPolicyList": v1NetworkPolicyList_1.V1NetworkPolicyList, + "V1NetworkPolicyPeer": v1NetworkPolicyPeer_1.V1NetworkPolicyPeer, + "V1NetworkPolicyPort": v1NetworkPolicyPort_1.V1NetworkPolicyPort, + "V1NetworkPolicySpec": v1NetworkPolicySpec_1.V1NetworkPolicySpec, + "V1Node": v1Node_1.V1Node, + "V1NodeAddress": v1NodeAddress_1.V1NodeAddress, + "V1NodeAffinity": v1NodeAffinity_1.V1NodeAffinity, + "V1NodeCondition": v1NodeCondition_1.V1NodeCondition, + "V1NodeConfigSource": v1NodeConfigSource_1.V1NodeConfigSource, + "V1NodeConfigStatus": v1NodeConfigStatus_1.V1NodeConfigStatus, + "V1NodeDaemonEndpoints": v1NodeDaemonEndpoints_1.V1NodeDaemonEndpoints, + "V1NodeList": v1NodeList_1.V1NodeList, + "V1NodeSelector": v1NodeSelector_1.V1NodeSelector, + "V1NodeSelectorRequirement": v1NodeSelectorRequirement_1.V1NodeSelectorRequirement, + "V1NodeSelectorTerm": v1NodeSelectorTerm_1.V1NodeSelectorTerm, + "V1NodeSpec": v1NodeSpec_1.V1NodeSpec, + "V1NodeStatus": v1NodeStatus_1.V1NodeStatus, + "V1NodeSystemInfo": v1NodeSystemInfo_1.V1NodeSystemInfo, + "V1NonResourceAttributes": v1NonResourceAttributes_1.V1NonResourceAttributes, + "V1NonResourceRule": v1NonResourceRule_1.V1NonResourceRule, + "V1ObjectFieldSelector": v1ObjectFieldSelector_1.V1ObjectFieldSelector, + "V1ObjectMeta": v1ObjectMeta_1.V1ObjectMeta, + "V1ObjectReference": v1ObjectReference_1.V1ObjectReference, + "V1Overhead": v1Overhead_1.V1Overhead, + "V1OwnerReference": v1OwnerReference_1.V1OwnerReference, + "V1PersistentVolume": v1PersistentVolume_1.V1PersistentVolume, + "V1PersistentVolumeClaim": v1PersistentVolumeClaim_1.V1PersistentVolumeClaim, + "V1PersistentVolumeClaimCondition": v1PersistentVolumeClaimCondition_1.V1PersistentVolumeClaimCondition, + "V1PersistentVolumeClaimList": v1PersistentVolumeClaimList_1.V1PersistentVolumeClaimList, + "V1PersistentVolumeClaimSpec": v1PersistentVolumeClaimSpec_1.V1PersistentVolumeClaimSpec, + "V1PersistentVolumeClaimStatus": v1PersistentVolumeClaimStatus_1.V1PersistentVolumeClaimStatus, + "V1PersistentVolumeClaimTemplate": v1PersistentVolumeClaimTemplate_1.V1PersistentVolumeClaimTemplate, + "V1PersistentVolumeClaimVolumeSource": v1PersistentVolumeClaimVolumeSource_1.V1PersistentVolumeClaimVolumeSource, + "V1PersistentVolumeList": v1PersistentVolumeList_1.V1PersistentVolumeList, + "V1PersistentVolumeSpec": v1PersistentVolumeSpec_1.V1PersistentVolumeSpec, + "V1PersistentVolumeStatus": v1PersistentVolumeStatus_1.V1PersistentVolumeStatus, + "V1PhotonPersistentDiskVolumeSource": v1PhotonPersistentDiskVolumeSource_1.V1PhotonPersistentDiskVolumeSource, + "V1Pod": v1Pod_1.V1Pod, + "V1PodAffinity": v1PodAffinity_1.V1PodAffinity, + "V1PodAffinityTerm": v1PodAffinityTerm_1.V1PodAffinityTerm, + "V1PodAntiAffinity": v1PodAntiAffinity_1.V1PodAntiAffinity, + "V1PodCondition": v1PodCondition_1.V1PodCondition, + "V1PodDNSConfig": v1PodDNSConfig_1.V1PodDNSConfig, + "V1PodDNSConfigOption": v1PodDNSConfigOption_1.V1PodDNSConfigOption, + "V1PodDisruptionBudget": v1PodDisruptionBudget_1.V1PodDisruptionBudget, + "V1PodDisruptionBudgetList": v1PodDisruptionBudgetList_1.V1PodDisruptionBudgetList, + "V1PodDisruptionBudgetSpec": v1PodDisruptionBudgetSpec_1.V1PodDisruptionBudgetSpec, + "V1PodDisruptionBudgetStatus": v1PodDisruptionBudgetStatus_1.V1PodDisruptionBudgetStatus, + "V1PodIP": v1PodIP_1.V1PodIP, + "V1PodList": v1PodList_1.V1PodList, + "V1PodReadinessGate": v1PodReadinessGate_1.V1PodReadinessGate, + "V1PodSecurityContext": v1PodSecurityContext_1.V1PodSecurityContext, + "V1PodSpec": v1PodSpec_1.V1PodSpec, + "V1PodStatus": v1PodStatus_1.V1PodStatus, + "V1PodTemplate": v1PodTemplate_1.V1PodTemplate, + "V1PodTemplateList": v1PodTemplateList_1.V1PodTemplateList, + "V1PodTemplateSpec": v1PodTemplateSpec_1.V1PodTemplateSpec, + "V1PolicyRule": v1PolicyRule_1.V1PolicyRule, + "V1PortStatus": v1PortStatus_1.V1PortStatus, + "V1PortworxVolumeSource": v1PortworxVolumeSource_1.V1PortworxVolumeSource, + "V1Preconditions": v1Preconditions_1.V1Preconditions, + "V1PreferredSchedulingTerm": v1PreferredSchedulingTerm_1.V1PreferredSchedulingTerm, + "V1PriorityClass": v1PriorityClass_1.V1PriorityClass, + "V1PriorityClassList": v1PriorityClassList_1.V1PriorityClassList, + "V1Probe": v1Probe_1.V1Probe, + "V1ProjectedVolumeSource": v1ProjectedVolumeSource_1.V1ProjectedVolumeSource, + "V1QuobyteVolumeSource": v1QuobyteVolumeSource_1.V1QuobyteVolumeSource, + "V1RBDPersistentVolumeSource": v1RBDPersistentVolumeSource_1.V1RBDPersistentVolumeSource, + "V1RBDVolumeSource": v1RBDVolumeSource_1.V1RBDVolumeSource, + "V1ReplicaSet": v1ReplicaSet_1.V1ReplicaSet, + "V1ReplicaSetCondition": v1ReplicaSetCondition_1.V1ReplicaSetCondition, + "V1ReplicaSetList": v1ReplicaSetList_1.V1ReplicaSetList, + "V1ReplicaSetSpec": v1ReplicaSetSpec_1.V1ReplicaSetSpec, + "V1ReplicaSetStatus": v1ReplicaSetStatus_1.V1ReplicaSetStatus, + "V1ReplicationController": v1ReplicationController_1.V1ReplicationController, + "V1ReplicationControllerCondition": v1ReplicationControllerCondition_1.V1ReplicationControllerCondition, + "V1ReplicationControllerList": v1ReplicationControllerList_1.V1ReplicationControllerList, + "V1ReplicationControllerSpec": v1ReplicationControllerSpec_1.V1ReplicationControllerSpec, + "V1ReplicationControllerStatus": v1ReplicationControllerStatus_1.V1ReplicationControllerStatus, + "V1ResourceAttributes": v1ResourceAttributes_1.V1ResourceAttributes, + "V1ResourceFieldSelector": v1ResourceFieldSelector_1.V1ResourceFieldSelector, + "V1ResourceQuota": v1ResourceQuota_1.V1ResourceQuota, + "V1ResourceQuotaList": v1ResourceQuotaList_1.V1ResourceQuotaList, + "V1ResourceQuotaSpec": v1ResourceQuotaSpec_1.V1ResourceQuotaSpec, + "V1ResourceQuotaStatus": v1ResourceQuotaStatus_1.V1ResourceQuotaStatus, + "V1ResourceRequirements": v1ResourceRequirements_1.V1ResourceRequirements, + "V1ResourceRule": v1ResourceRule_1.V1ResourceRule, + "V1Role": v1Role_1.V1Role, + "V1RoleBinding": v1RoleBinding_1.V1RoleBinding, + "V1RoleBindingList": v1RoleBindingList_1.V1RoleBindingList, + "V1RoleList": v1RoleList_1.V1RoleList, + "V1RoleRef": v1RoleRef_1.V1RoleRef, + "V1RollingUpdateDaemonSet": v1RollingUpdateDaemonSet_1.V1RollingUpdateDaemonSet, + "V1RollingUpdateDeployment": v1RollingUpdateDeployment_1.V1RollingUpdateDeployment, + "V1RollingUpdateStatefulSetStrategy": v1RollingUpdateStatefulSetStrategy_1.V1RollingUpdateStatefulSetStrategy, + "V1RuleWithOperations": v1RuleWithOperations_1.V1RuleWithOperations, + "V1RuntimeClass": v1RuntimeClass_1.V1RuntimeClass, + "V1RuntimeClassList": v1RuntimeClassList_1.V1RuntimeClassList, + "V1SELinuxOptions": v1SELinuxOptions_1.V1SELinuxOptions, + "V1Scale": v1Scale_1.V1Scale, + "V1ScaleIOPersistentVolumeSource": v1ScaleIOPersistentVolumeSource_1.V1ScaleIOPersistentVolumeSource, + "V1ScaleIOVolumeSource": v1ScaleIOVolumeSource_1.V1ScaleIOVolumeSource, + "V1ScaleSpec": v1ScaleSpec_1.V1ScaleSpec, + "V1ScaleStatus": v1ScaleStatus_1.V1ScaleStatus, + "V1Scheduling": v1Scheduling_1.V1Scheduling, + "V1ScopeSelector": v1ScopeSelector_1.V1ScopeSelector, + "V1ScopedResourceSelectorRequirement": v1ScopedResourceSelectorRequirement_1.V1ScopedResourceSelectorRequirement, + "V1SeccompProfile": v1SeccompProfile_1.V1SeccompProfile, + "V1Secret": v1Secret_1.V1Secret, + "V1SecretEnvSource": v1SecretEnvSource_1.V1SecretEnvSource, + "V1SecretKeySelector": v1SecretKeySelector_1.V1SecretKeySelector, + "V1SecretList": v1SecretList_1.V1SecretList, + "V1SecretProjection": v1SecretProjection_1.V1SecretProjection, + "V1SecretReference": v1SecretReference_1.V1SecretReference, + "V1SecretVolumeSource": v1SecretVolumeSource_1.V1SecretVolumeSource, + "V1SecurityContext": v1SecurityContext_1.V1SecurityContext, + "V1SelfSubjectAccessReview": v1SelfSubjectAccessReview_1.V1SelfSubjectAccessReview, + "V1SelfSubjectAccessReviewSpec": v1SelfSubjectAccessReviewSpec_1.V1SelfSubjectAccessReviewSpec, + "V1SelfSubjectRulesReview": v1SelfSubjectRulesReview_1.V1SelfSubjectRulesReview, + "V1SelfSubjectRulesReviewSpec": v1SelfSubjectRulesReviewSpec_1.V1SelfSubjectRulesReviewSpec, + "V1ServerAddressByClientCIDR": v1ServerAddressByClientCIDR_1.V1ServerAddressByClientCIDR, + "V1Service": v1Service_1.V1Service, + "V1ServiceAccount": v1ServiceAccount_1.V1ServiceAccount, + "V1ServiceAccountList": v1ServiceAccountList_1.V1ServiceAccountList, + "V1ServiceAccountTokenProjection": v1ServiceAccountTokenProjection_1.V1ServiceAccountTokenProjection, + "V1ServiceBackendPort": v1ServiceBackendPort_1.V1ServiceBackendPort, + "V1ServiceList": v1ServiceList_1.V1ServiceList, + "V1ServicePort": v1ServicePort_1.V1ServicePort, + "V1ServiceSpec": v1ServiceSpec_1.V1ServiceSpec, + "V1ServiceStatus": v1ServiceStatus_1.V1ServiceStatus, + "V1SessionAffinityConfig": v1SessionAffinityConfig_1.V1SessionAffinityConfig, + "V1StatefulSet": v1StatefulSet_1.V1StatefulSet, + "V1StatefulSetCondition": v1StatefulSetCondition_1.V1StatefulSetCondition, + "V1StatefulSetList": v1StatefulSetList_1.V1StatefulSetList, + "V1StatefulSetSpec": v1StatefulSetSpec_1.V1StatefulSetSpec, + "V1StatefulSetStatus": v1StatefulSetStatus_1.V1StatefulSetStatus, + "V1StatefulSetUpdateStrategy": v1StatefulSetUpdateStrategy_1.V1StatefulSetUpdateStrategy, + "V1Status": v1Status_1.V1Status, + "V1StatusCause": v1StatusCause_1.V1StatusCause, + "V1StatusDetails": v1StatusDetails_1.V1StatusDetails, + "V1StorageClass": v1StorageClass_1.V1StorageClass, + "V1StorageClassList": v1StorageClassList_1.V1StorageClassList, + "V1StorageOSPersistentVolumeSource": v1StorageOSPersistentVolumeSource_1.V1StorageOSPersistentVolumeSource, + "V1StorageOSVolumeSource": v1StorageOSVolumeSource_1.V1StorageOSVolumeSource, + "V1Subject": v1Subject_1.V1Subject, + "V1SubjectAccessReview": v1SubjectAccessReview_1.V1SubjectAccessReview, + "V1SubjectAccessReviewSpec": v1SubjectAccessReviewSpec_1.V1SubjectAccessReviewSpec, + "V1SubjectAccessReviewStatus": v1SubjectAccessReviewStatus_1.V1SubjectAccessReviewStatus, + "V1SubjectRulesReviewStatus": v1SubjectRulesReviewStatus_1.V1SubjectRulesReviewStatus, + "V1Sysctl": v1Sysctl_1.V1Sysctl, + "V1TCPSocketAction": v1TCPSocketAction_1.V1TCPSocketAction, + "V1Taint": v1Taint_1.V1Taint, + "V1TokenRequestSpec": v1TokenRequestSpec_1.V1TokenRequestSpec, + "V1TokenRequestStatus": v1TokenRequestStatus_1.V1TokenRequestStatus, + "V1TokenReview": v1TokenReview_1.V1TokenReview, + "V1TokenReviewSpec": v1TokenReviewSpec_1.V1TokenReviewSpec, + "V1TokenReviewStatus": v1TokenReviewStatus_1.V1TokenReviewStatus, + "V1Toleration": v1Toleration_1.V1Toleration, + "V1TopologySelectorLabelRequirement": v1TopologySelectorLabelRequirement_1.V1TopologySelectorLabelRequirement, + "V1TopologySelectorTerm": v1TopologySelectorTerm_1.V1TopologySelectorTerm, + "V1TopologySpreadConstraint": v1TopologySpreadConstraint_1.V1TopologySpreadConstraint, + "V1TypedLocalObjectReference": v1TypedLocalObjectReference_1.V1TypedLocalObjectReference, + "V1UserInfo": v1UserInfo_1.V1UserInfo, + "V1ValidatingWebhook": v1ValidatingWebhook_1.V1ValidatingWebhook, + "V1ValidatingWebhookConfiguration": v1ValidatingWebhookConfiguration_1.V1ValidatingWebhookConfiguration, + "V1ValidatingWebhookConfigurationList": v1ValidatingWebhookConfigurationList_1.V1ValidatingWebhookConfigurationList, + "V1Volume": v1Volume_1.V1Volume, + "V1VolumeAttachment": v1VolumeAttachment_1.V1VolumeAttachment, + "V1VolumeAttachmentList": v1VolumeAttachmentList_1.V1VolumeAttachmentList, + "V1VolumeAttachmentSource": v1VolumeAttachmentSource_1.V1VolumeAttachmentSource, + "V1VolumeAttachmentSpec": v1VolumeAttachmentSpec_1.V1VolumeAttachmentSpec, + "V1VolumeAttachmentStatus": v1VolumeAttachmentStatus_1.V1VolumeAttachmentStatus, + "V1VolumeDevice": v1VolumeDevice_1.V1VolumeDevice, + "V1VolumeError": v1VolumeError_1.V1VolumeError, + "V1VolumeMount": v1VolumeMount_1.V1VolumeMount, + "V1VolumeNodeAffinity": v1VolumeNodeAffinity_1.V1VolumeNodeAffinity, + "V1VolumeNodeResources": v1VolumeNodeResources_1.V1VolumeNodeResources, + "V1VolumeProjection": v1VolumeProjection_1.V1VolumeProjection, + "V1VsphereVirtualDiskVolumeSource": v1VsphereVirtualDiskVolumeSource_1.V1VsphereVirtualDiskVolumeSource, + "V1WatchEvent": v1WatchEvent_1.V1WatchEvent, + "V1WebhookConversion": v1WebhookConversion_1.V1WebhookConversion, + "V1WeightedPodAffinityTerm": v1WeightedPodAffinityTerm_1.V1WeightedPodAffinityTerm, + "V1WindowsSecurityContextOptions": v1WindowsSecurityContextOptions_1.V1WindowsSecurityContextOptions, + "V1alpha1AggregationRule": v1alpha1AggregationRule_1.V1alpha1AggregationRule, + "V1alpha1CSIStorageCapacity": v1alpha1CSIStorageCapacity_1.V1alpha1CSIStorageCapacity, + "V1alpha1CSIStorageCapacityList": v1alpha1CSIStorageCapacityList_1.V1alpha1CSIStorageCapacityList, + "V1alpha1ClusterRole": v1alpha1ClusterRole_1.V1alpha1ClusterRole, + "V1alpha1ClusterRoleBinding": v1alpha1ClusterRoleBinding_1.V1alpha1ClusterRoleBinding, + "V1alpha1ClusterRoleBindingList": v1alpha1ClusterRoleBindingList_1.V1alpha1ClusterRoleBindingList, + "V1alpha1ClusterRoleList": v1alpha1ClusterRoleList_1.V1alpha1ClusterRoleList, + "V1alpha1Overhead": v1alpha1Overhead_1.V1alpha1Overhead, + "V1alpha1PolicyRule": v1alpha1PolicyRule_1.V1alpha1PolicyRule, + "V1alpha1PriorityClass": v1alpha1PriorityClass_1.V1alpha1PriorityClass, + "V1alpha1PriorityClassList": v1alpha1PriorityClassList_1.V1alpha1PriorityClassList, + "V1alpha1Role": v1alpha1Role_1.V1alpha1Role, + "V1alpha1RoleBinding": v1alpha1RoleBinding_1.V1alpha1RoleBinding, + "V1alpha1RoleBindingList": v1alpha1RoleBindingList_1.V1alpha1RoleBindingList, + "V1alpha1RoleList": v1alpha1RoleList_1.V1alpha1RoleList, + "V1alpha1RoleRef": v1alpha1RoleRef_1.V1alpha1RoleRef, + "V1alpha1RuntimeClass": v1alpha1RuntimeClass_1.V1alpha1RuntimeClass, + "V1alpha1RuntimeClassList": v1alpha1RuntimeClassList_1.V1alpha1RuntimeClassList, + "V1alpha1RuntimeClassSpec": v1alpha1RuntimeClassSpec_1.V1alpha1RuntimeClassSpec, + "V1alpha1Scheduling": v1alpha1Scheduling_1.V1alpha1Scheduling, + "V1alpha1ServerStorageVersion": v1alpha1ServerStorageVersion_1.V1alpha1ServerStorageVersion, + "V1alpha1StorageVersion": v1alpha1StorageVersion_1.V1alpha1StorageVersion, + "V1alpha1StorageVersionCondition": v1alpha1StorageVersionCondition_1.V1alpha1StorageVersionCondition, + "V1alpha1StorageVersionList": v1alpha1StorageVersionList_1.V1alpha1StorageVersionList, + "V1alpha1StorageVersionStatus": v1alpha1StorageVersionStatus_1.V1alpha1StorageVersionStatus, + "V1alpha1Subject": v1alpha1Subject_1.V1alpha1Subject, + "V1alpha1VolumeAttachment": v1alpha1VolumeAttachment_1.V1alpha1VolumeAttachment, + "V1alpha1VolumeAttachmentList": v1alpha1VolumeAttachmentList_1.V1alpha1VolumeAttachmentList, + "V1alpha1VolumeAttachmentSource": v1alpha1VolumeAttachmentSource_1.V1alpha1VolumeAttachmentSource, + "V1alpha1VolumeAttachmentSpec": v1alpha1VolumeAttachmentSpec_1.V1alpha1VolumeAttachmentSpec, + "V1alpha1VolumeAttachmentStatus": v1alpha1VolumeAttachmentStatus_1.V1alpha1VolumeAttachmentStatus, + "V1alpha1VolumeError": v1alpha1VolumeError_1.V1alpha1VolumeError, + "V1beta1APIService": v1beta1APIService_1.V1beta1APIService, + "V1beta1APIServiceCondition": v1beta1APIServiceCondition_1.V1beta1APIServiceCondition, + "V1beta1APIServiceList": v1beta1APIServiceList_1.V1beta1APIServiceList, + "V1beta1APIServiceSpec": v1beta1APIServiceSpec_1.V1beta1APIServiceSpec, + "V1beta1APIServiceStatus": v1beta1APIServiceStatus_1.V1beta1APIServiceStatus, + "V1beta1AggregationRule": v1beta1AggregationRule_1.V1beta1AggregationRule, + "V1beta1AllowedCSIDriver": v1beta1AllowedCSIDriver_1.V1beta1AllowedCSIDriver, + "V1beta1AllowedFlexVolume": v1beta1AllowedFlexVolume_1.V1beta1AllowedFlexVolume, + "V1beta1AllowedHostPath": v1beta1AllowedHostPath_1.V1beta1AllowedHostPath, + "V1beta1CSIDriver": v1beta1CSIDriver_1.V1beta1CSIDriver, + "V1beta1CSIDriverList": v1beta1CSIDriverList_1.V1beta1CSIDriverList, + "V1beta1CSIDriverSpec": v1beta1CSIDriverSpec_1.V1beta1CSIDriverSpec, + "V1beta1CSINode": v1beta1CSINode_1.V1beta1CSINode, + "V1beta1CSINodeDriver": v1beta1CSINodeDriver_1.V1beta1CSINodeDriver, + "V1beta1CSINodeList": v1beta1CSINodeList_1.V1beta1CSINodeList, + "V1beta1CSINodeSpec": v1beta1CSINodeSpec_1.V1beta1CSINodeSpec, + "V1beta1CSIStorageCapacity": v1beta1CSIStorageCapacity_1.V1beta1CSIStorageCapacity, + "V1beta1CSIStorageCapacityList": v1beta1CSIStorageCapacityList_1.V1beta1CSIStorageCapacityList, + "V1beta1CertificateSigningRequest": v1beta1CertificateSigningRequest_1.V1beta1CertificateSigningRequest, + "V1beta1CertificateSigningRequestCondition": v1beta1CertificateSigningRequestCondition_1.V1beta1CertificateSigningRequestCondition, + "V1beta1CertificateSigningRequestList": v1beta1CertificateSigningRequestList_1.V1beta1CertificateSigningRequestList, + "V1beta1CertificateSigningRequestSpec": v1beta1CertificateSigningRequestSpec_1.V1beta1CertificateSigningRequestSpec, + "V1beta1CertificateSigningRequestStatus": v1beta1CertificateSigningRequestStatus_1.V1beta1CertificateSigningRequestStatus, + "V1beta1ClusterRole": v1beta1ClusterRole_1.V1beta1ClusterRole, + "V1beta1ClusterRoleBinding": v1beta1ClusterRoleBinding_1.V1beta1ClusterRoleBinding, + "V1beta1ClusterRoleBindingList": v1beta1ClusterRoleBindingList_1.V1beta1ClusterRoleBindingList, + "V1beta1ClusterRoleList": v1beta1ClusterRoleList_1.V1beta1ClusterRoleList, + "V1beta1CronJob": v1beta1CronJob_1.V1beta1CronJob, + "V1beta1CronJobList": v1beta1CronJobList_1.V1beta1CronJobList, + "V1beta1CronJobSpec": v1beta1CronJobSpec_1.V1beta1CronJobSpec, + "V1beta1CronJobStatus": v1beta1CronJobStatus_1.V1beta1CronJobStatus, + "V1beta1CustomResourceColumnDefinition": v1beta1CustomResourceColumnDefinition_1.V1beta1CustomResourceColumnDefinition, + "V1beta1CustomResourceConversion": v1beta1CustomResourceConversion_1.V1beta1CustomResourceConversion, + "V1beta1CustomResourceDefinition": v1beta1CustomResourceDefinition_1.V1beta1CustomResourceDefinition, + "V1beta1CustomResourceDefinitionCondition": v1beta1CustomResourceDefinitionCondition_1.V1beta1CustomResourceDefinitionCondition, + "V1beta1CustomResourceDefinitionList": v1beta1CustomResourceDefinitionList_1.V1beta1CustomResourceDefinitionList, + "V1beta1CustomResourceDefinitionNames": v1beta1CustomResourceDefinitionNames_1.V1beta1CustomResourceDefinitionNames, + "V1beta1CustomResourceDefinitionSpec": v1beta1CustomResourceDefinitionSpec_1.V1beta1CustomResourceDefinitionSpec, + "V1beta1CustomResourceDefinitionStatus": v1beta1CustomResourceDefinitionStatus_1.V1beta1CustomResourceDefinitionStatus, + "V1beta1CustomResourceDefinitionVersion": v1beta1CustomResourceDefinitionVersion_1.V1beta1CustomResourceDefinitionVersion, + "V1beta1CustomResourceSubresourceScale": v1beta1CustomResourceSubresourceScale_1.V1beta1CustomResourceSubresourceScale, + "V1beta1CustomResourceSubresources": v1beta1CustomResourceSubresources_1.V1beta1CustomResourceSubresources, + "V1beta1CustomResourceValidation": v1beta1CustomResourceValidation_1.V1beta1CustomResourceValidation, + "V1beta1Endpoint": v1beta1Endpoint_1.V1beta1Endpoint, + "V1beta1EndpointConditions": v1beta1EndpointConditions_1.V1beta1EndpointConditions, + "V1beta1EndpointHints": v1beta1EndpointHints_1.V1beta1EndpointHints, + "V1beta1EndpointPort": v1beta1EndpointPort_1.V1beta1EndpointPort, + "V1beta1EndpointSlice": v1beta1EndpointSlice_1.V1beta1EndpointSlice, + "V1beta1EndpointSliceList": v1beta1EndpointSliceList_1.V1beta1EndpointSliceList, + "V1beta1Event": v1beta1Event_1.V1beta1Event, + "V1beta1EventList": v1beta1EventList_1.V1beta1EventList, + "V1beta1EventSeries": v1beta1EventSeries_1.V1beta1EventSeries, + "V1beta1Eviction": v1beta1Eviction_1.V1beta1Eviction, + "V1beta1ExternalDocumentation": v1beta1ExternalDocumentation_1.V1beta1ExternalDocumentation, + "V1beta1FSGroupStrategyOptions": v1beta1FSGroupStrategyOptions_1.V1beta1FSGroupStrategyOptions, + "V1beta1FlowDistinguisherMethod": v1beta1FlowDistinguisherMethod_1.V1beta1FlowDistinguisherMethod, + "V1beta1FlowSchema": v1beta1FlowSchema_1.V1beta1FlowSchema, + "V1beta1FlowSchemaCondition": v1beta1FlowSchemaCondition_1.V1beta1FlowSchemaCondition, + "V1beta1FlowSchemaList": v1beta1FlowSchemaList_1.V1beta1FlowSchemaList, + "V1beta1FlowSchemaSpec": v1beta1FlowSchemaSpec_1.V1beta1FlowSchemaSpec, + "V1beta1FlowSchemaStatus": v1beta1FlowSchemaStatus_1.V1beta1FlowSchemaStatus, + "V1beta1ForZone": v1beta1ForZone_1.V1beta1ForZone, + "V1beta1GroupSubject": v1beta1GroupSubject_1.V1beta1GroupSubject, + "V1beta1HostPortRange": v1beta1HostPortRange_1.V1beta1HostPortRange, + "V1beta1IDRange": v1beta1IDRange_1.V1beta1IDRange, + "V1beta1IngressClass": v1beta1IngressClass_1.V1beta1IngressClass, + "V1beta1IngressClassList": v1beta1IngressClassList_1.V1beta1IngressClassList, + "V1beta1IngressClassParametersReference": v1beta1IngressClassParametersReference_1.V1beta1IngressClassParametersReference, + "V1beta1IngressClassSpec": v1beta1IngressClassSpec_1.V1beta1IngressClassSpec, + "V1beta1JSONSchemaProps": v1beta1JSONSchemaProps_1.V1beta1JSONSchemaProps, + "V1beta1JobTemplateSpec": v1beta1JobTemplateSpec_1.V1beta1JobTemplateSpec, + "V1beta1Lease": v1beta1Lease_1.V1beta1Lease, + "V1beta1LeaseList": v1beta1LeaseList_1.V1beta1LeaseList, + "V1beta1LeaseSpec": v1beta1LeaseSpec_1.V1beta1LeaseSpec, + "V1beta1LimitResponse": v1beta1LimitResponse_1.V1beta1LimitResponse, + "V1beta1LimitedPriorityLevelConfiguration": v1beta1LimitedPriorityLevelConfiguration_1.V1beta1LimitedPriorityLevelConfiguration, + "V1beta1LocalSubjectAccessReview": v1beta1LocalSubjectAccessReview_1.V1beta1LocalSubjectAccessReview, + "V1beta1MutatingWebhook": v1beta1MutatingWebhook_1.V1beta1MutatingWebhook, + "V1beta1MutatingWebhookConfiguration": v1beta1MutatingWebhookConfiguration_1.V1beta1MutatingWebhookConfiguration, + "V1beta1MutatingWebhookConfigurationList": v1beta1MutatingWebhookConfigurationList_1.V1beta1MutatingWebhookConfigurationList, + "V1beta1NonResourceAttributes": v1beta1NonResourceAttributes_1.V1beta1NonResourceAttributes, + "V1beta1NonResourcePolicyRule": v1beta1NonResourcePolicyRule_1.V1beta1NonResourcePolicyRule, + "V1beta1NonResourceRule": v1beta1NonResourceRule_1.V1beta1NonResourceRule, + "V1beta1Overhead": v1beta1Overhead_1.V1beta1Overhead, + "V1beta1PodDisruptionBudget": v1beta1PodDisruptionBudget_1.V1beta1PodDisruptionBudget, + "V1beta1PodDisruptionBudgetList": v1beta1PodDisruptionBudgetList_1.V1beta1PodDisruptionBudgetList, + "V1beta1PodDisruptionBudgetSpec": v1beta1PodDisruptionBudgetSpec_1.V1beta1PodDisruptionBudgetSpec, + "V1beta1PodDisruptionBudgetStatus": v1beta1PodDisruptionBudgetStatus_1.V1beta1PodDisruptionBudgetStatus, + "V1beta1PodSecurityPolicy": v1beta1PodSecurityPolicy_1.V1beta1PodSecurityPolicy, + "V1beta1PodSecurityPolicyList": v1beta1PodSecurityPolicyList_1.V1beta1PodSecurityPolicyList, + "V1beta1PodSecurityPolicySpec": v1beta1PodSecurityPolicySpec_1.V1beta1PodSecurityPolicySpec, + "V1beta1PolicyRule": v1beta1PolicyRule_1.V1beta1PolicyRule, + "V1beta1PolicyRulesWithSubjects": v1beta1PolicyRulesWithSubjects_1.V1beta1PolicyRulesWithSubjects, + "V1beta1PriorityClass": v1beta1PriorityClass_1.V1beta1PriorityClass, + "V1beta1PriorityClassList": v1beta1PriorityClassList_1.V1beta1PriorityClassList, + "V1beta1PriorityLevelConfiguration": v1beta1PriorityLevelConfiguration_1.V1beta1PriorityLevelConfiguration, + "V1beta1PriorityLevelConfigurationCondition": v1beta1PriorityLevelConfigurationCondition_1.V1beta1PriorityLevelConfigurationCondition, + "V1beta1PriorityLevelConfigurationList": v1beta1PriorityLevelConfigurationList_1.V1beta1PriorityLevelConfigurationList, + "V1beta1PriorityLevelConfigurationReference": v1beta1PriorityLevelConfigurationReference_1.V1beta1PriorityLevelConfigurationReference, + "V1beta1PriorityLevelConfigurationSpec": v1beta1PriorityLevelConfigurationSpec_1.V1beta1PriorityLevelConfigurationSpec, + "V1beta1PriorityLevelConfigurationStatus": v1beta1PriorityLevelConfigurationStatus_1.V1beta1PriorityLevelConfigurationStatus, + "V1beta1QueuingConfiguration": v1beta1QueuingConfiguration_1.V1beta1QueuingConfiguration, + "V1beta1ResourceAttributes": v1beta1ResourceAttributes_1.V1beta1ResourceAttributes, + "V1beta1ResourcePolicyRule": v1beta1ResourcePolicyRule_1.V1beta1ResourcePolicyRule, + "V1beta1ResourceRule": v1beta1ResourceRule_1.V1beta1ResourceRule, + "V1beta1Role": v1beta1Role_1.V1beta1Role, + "V1beta1RoleBinding": v1beta1RoleBinding_1.V1beta1RoleBinding, + "V1beta1RoleBindingList": v1beta1RoleBindingList_1.V1beta1RoleBindingList, + "V1beta1RoleList": v1beta1RoleList_1.V1beta1RoleList, + "V1beta1RoleRef": v1beta1RoleRef_1.V1beta1RoleRef, + "V1beta1RuleWithOperations": v1beta1RuleWithOperations_1.V1beta1RuleWithOperations, + "V1beta1RunAsGroupStrategyOptions": v1beta1RunAsGroupStrategyOptions_1.V1beta1RunAsGroupStrategyOptions, + "V1beta1RunAsUserStrategyOptions": v1beta1RunAsUserStrategyOptions_1.V1beta1RunAsUserStrategyOptions, + "V1beta1RuntimeClass": v1beta1RuntimeClass_1.V1beta1RuntimeClass, + "V1beta1RuntimeClassList": v1beta1RuntimeClassList_1.V1beta1RuntimeClassList, + "V1beta1RuntimeClassStrategyOptions": v1beta1RuntimeClassStrategyOptions_1.V1beta1RuntimeClassStrategyOptions, + "V1beta1SELinuxStrategyOptions": v1beta1SELinuxStrategyOptions_1.V1beta1SELinuxStrategyOptions, + "V1beta1Scheduling": v1beta1Scheduling_1.V1beta1Scheduling, + "V1beta1SelfSubjectAccessReview": v1beta1SelfSubjectAccessReview_1.V1beta1SelfSubjectAccessReview, + "V1beta1SelfSubjectAccessReviewSpec": v1beta1SelfSubjectAccessReviewSpec_1.V1beta1SelfSubjectAccessReviewSpec, + "V1beta1SelfSubjectRulesReview": v1beta1SelfSubjectRulesReview_1.V1beta1SelfSubjectRulesReview, + "V1beta1SelfSubjectRulesReviewSpec": v1beta1SelfSubjectRulesReviewSpec_1.V1beta1SelfSubjectRulesReviewSpec, + "V1beta1ServiceAccountSubject": v1beta1ServiceAccountSubject_1.V1beta1ServiceAccountSubject, + "V1beta1StorageClass": v1beta1StorageClass_1.V1beta1StorageClass, + "V1beta1StorageClassList": v1beta1StorageClassList_1.V1beta1StorageClassList, + "V1beta1SubjectAccessReview": v1beta1SubjectAccessReview_1.V1beta1SubjectAccessReview, + "V1beta1SubjectAccessReviewSpec": v1beta1SubjectAccessReviewSpec_1.V1beta1SubjectAccessReviewSpec, + "V1beta1SubjectAccessReviewStatus": v1beta1SubjectAccessReviewStatus_1.V1beta1SubjectAccessReviewStatus, + "V1beta1SubjectRulesReviewStatus": v1beta1SubjectRulesReviewStatus_1.V1beta1SubjectRulesReviewStatus, + "V1beta1SupplementalGroupsStrategyOptions": v1beta1SupplementalGroupsStrategyOptions_1.V1beta1SupplementalGroupsStrategyOptions, + "V1beta1TokenRequest": v1beta1TokenRequest_1.V1beta1TokenRequest, + "V1beta1TokenReview": v1beta1TokenReview_1.V1beta1TokenReview, + "V1beta1TokenReviewSpec": v1beta1TokenReviewSpec_1.V1beta1TokenReviewSpec, + "V1beta1TokenReviewStatus": v1beta1TokenReviewStatus_1.V1beta1TokenReviewStatus, + "V1beta1UserInfo": v1beta1UserInfo_1.V1beta1UserInfo, + "V1beta1UserSubject": v1beta1UserSubject_1.V1beta1UserSubject, + "V1beta1ValidatingWebhook": v1beta1ValidatingWebhook_1.V1beta1ValidatingWebhook, + "V1beta1ValidatingWebhookConfiguration": v1beta1ValidatingWebhookConfiguration_1.V1beta1ValidatingWebhookConfiguration, + "V1beta1ValidatingWebhookConfigurationList": v1beta1ValidatingWebhookConfigurationList_1.V1beta1ValidatingWebhookConfigurationList, + "V1beta1VolumeAttachment": v1beta1VolumeAttachment_1.V1beta1VolumeAttachment, + "V1beta1VolumeAttachmentList": v1beta1VolumeAttachmentList_1.V1beta1VolumeAttachmentList, + "V1beta1VolumeAttachmentSource": v1beta1VolumeAttachmentSource_1.V1beta1VolumeAttachmentSource, + "V1beta1VolumeAttachmentSpec": v1beta1VolumeAttachmentSpec_1.V1beta1VolumeAttachmentSpec, + "V1beta1VolumeAttachmentStatus": v1beta1VolumeAttachmentStatus_1.V1beta1VolumeAttachmentStatus, + "V1beta1VolumeError": v1beta1VolumeError_1.V1beta1VolumeError, + "V1beta1VolumeNodeResources": v1beta1VolumeNodeResources_1.V1beta1VolumeNodeResources, + "V2beta1ContainerResourceMetricSource": v2beta1ContainerResourceMetricSource_1.V2beta1ContainerResourceMetricSource, + "V2beta1ContainerResourceMetricStatus": v2beta1ContainerResourceMetricStatus_1.V2beta1ContainerResourceMetricStatus, + "V2beta1CrossVersionObjectReference": v2beta1CrossVersionObjectReference_1.V2beta1CrossVersionObjectReference, + "V2beta1ExternalMetricSource": v2beta1ExternalMetricSource_1.V2beta1ExternalMetricSource, + "V2beta1ExternalMetricStatus": v2beta1ExternalMetricStatus_1.V2beta1ExternalMetricStatus, + "V2beta1HorizontalPodAutoscaler": v2beta1HorizontalPodAutoscaler_1.V2beta1HorizontalPodAutoscaler, + "V2beta1HorizontalPodAutoscalerCondition": v2beta1HorizontalPodAutoscalerCondition_1.V2beta1HorizontalPodAutoscalerCondition, + "V2beta1HorizontalPodAutoscalerList": v2beta1HorizontalPodAutoscalerList_1.V2beta1HorizontalPodAutoscalerList, + "V2beta1HorizontalPodAutoscalerSpec": v2beta1HorizontalPodAutoscalerSpec_1.V2beta1HorizontalPodAutoscalerSpec, + "V2beta1HorizontalPodAutoscalerStatus": v2beta1HorizontalPodAutoscalerStatus_1.V2beta1HorizontalPodAutoscalerStatus, + "V2beta1MetricSpec": v2beta1MetricSpec_1.V2beta1MetricSpec, + "V2beta1MetricStatus": v2beta1MetricStatus_1.V2beta1MetricStatus, + "V2beta1ObjectMetricSource": v2beta1ObjectMetricSource_1.V2beta1ObjectMetricSource, + "V2beta1ObjectMetricStatus": v2beta1ObjectMetricStatus_1.V2beta1ObjectMetricStatus, + "V2beta1PodsMetricSource": v2beta1PodsMetricSource_1.V2beta1PodsMetricSource, + "V2beta1PodsMetricStatus": v2beta1PodsMetricStatus_1.V2beta1PodsMetricStatus, + "V2beta1ResourceMetricSource": v2beta1ResourceMetricSource_1.V2beta1ResourceMetricSource, + "V2beta1ResourceMetricStatus": v2beta1ResourceMetricStatus_1.V2beta1ResourceMetricStatus, + "V2beta2ContainerResourceMetricSource": v2beta2ContainerResourceMetricSource_1.V2beta2ContainerResourceMetricSource, + "V2beta2ContainerResourceMetricStatus": v2beta2ContainerResourceMetricStatus_1.V2beta2ContainerResourceMetricStatus, + "V2beta2CrossVersionObjectReference": v2beta2CrossVersionObjectReference_1.V2beta2CrossVersionObjectReference, + "V2beta2ExternalMetricSource": v2beta2ExternalMetricSource_1.V2beta2ExternalMetricSource, + "V2beta2ExternalMetricStatus": v2beta2ExternalMetricStatus_1.V2beta2ExternalMetricStatus, + "V2beta2HPAScalingPolicy": v2beta2HPAScalingPolicy_1.V2beta2HPAScalingPolicy, + "V2beta2HPAScalingRules": v2beta2HPAScalingRules_1.V2beta2HPAScalingRules, + "V2beta2HorizontalPodAutoscaler": v2beta2HorizontalPodAutoscaler_1.V2beta2HorizontalPodAutoscaler, + "V2beta2HorizontalPodAutoscalerBehavior": v2beta2HorizontalPodAutoscalerBehavior_1.V2beta2HorizontalPodAutoscalerBehavior, + "V2beta2HorizontalPodAutoscalerCondition": v2beta2HorizontalPodAutoscalerCondition_1.V2beta2HorizontalPodAutoscalerCondition, + "V2beta2HorizontalPodAutoscalerList": v2beta2HorizontalPodAutoscalerList_1.V2beta2HorizontalPodAutoscalerList, + "V2beta2HorizontalPodAutoscalerSpec": v2beta2HorizontalPodAutoscalerSpec_1.V2beta2HorizontalPodAutoscalerSpec, + "V2beta2HorizontalPodAutoscalerStatus": v2beta2HorizontalPodAutoscalerStatus_1.V2beta2HorizontalPodAutoscalerStatus, + "V2beta2MetricIdentifier": v2beta2MetricIdentifier_1.V2beta2MetricIdentifier, + "V2beta2MetricSpec": v2beta2MetricSpec_1.V2beta2MetricSpec, + "V2beta2MetricStatus": v2beta2MetricStatus_1.V2beta2MetricStatus, + "V2beta2MetricTarget": v2beta2MetricTarget_1.V2beta2MetricTarget, + "V2beta2MetricValueStatus": v2beta2MetricValueStatus_1.V2beta2MetricValueStatus, + "V2beta2ObjectMetricSource": v2beta2ObjectMetricSource_1.V2beta2ObjectMetricSource, + "V2beta2ObjectMetricStatus": v2beta2ObjectMetricStatus_1.V2beta2ObjectMetricStatus, + "V2beta2PodsMetricSource": v2beta2PodsMetricSource_1.V2beta2PodsMetricSource, + "V2beta2PodsMetricStatus": v2beta2PodsMetricStatus_1.V2beta2PodsMetricStatus, + "V2beta2ResourceMetricSource": v2beta2ResourceMetricSource_1.V2beta2ResourceMetricSource, + "V2beta2ResourceMetricStatus": v2beta2ResourceMetricStatus_1.V2beta2ResourceMetricStatus, + "VersionInfo": versionInfo_1.VersionInfo, +}; +class ObjectSerializer { + static findCorrectType(data, expectedType) { + if (data == undefined) { + return expectedType; + } + else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } + else if (expectedType === "Date") { + return expectedType; + } + else { + if (enumsMap[expectedType]) { + return expectedType; + } + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } + else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if (typeMap[discriminatorType]) { + return discriminatorType; // use the type given in the discriminator + } + else { + return expectedType; // discriminator did not map to a type + } + } + else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + static serialize(data, type) { + if (data == undefined) { + return data; + } + else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } + else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData = []; + for (let index in data) { + let date = data[index]; + transformedData.push(ObjectSerializer.serialize(date, subType)); + } + return transformedData; + } + else if (type === "Date") { + return data.toISOString(); + } + else { + if (enumsMap[type]) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + // Get the actual type of this object + type = this.findCorrectType(data, type); + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance = {}; + for (let index in attributeTypes) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); + } + return instance; + } + } + static deserialize(data, type) { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } + else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } + else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData = []; + for (let index in data) { + let date = data[index]; + transformedData.push(ObjectSerializer.deserialize(date, subType)); + } + return transformedData; + } + else if (type === "Date") { + return new Date(data); + } + else { + if (enumsMap[type]) { // is Enum + return data; + } + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index in attributeTypes) { + let attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); + } + return instance; + } + } +} +exports.ObjectSerializer = ObjectSerializer; +class HttpBasicAuth { + constructor() { + this.username = ''; + this.password = ''; + } + applyToRequest(requestOptions) { + requestOptions.auth = { + username: this.username, password: this.password + }; + } +} +exports.HttpBasicAuth = HttpBasicAuth; +class HttpBearerAuth { + constructor() { + this.accessToken = ''; + } + applyToRequest(requestOptions) { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} +exports.HttpBearerAuth = HttpBearerAuth; +class ApiKeyAuth { + constructor(location, paramName) { + this.location = location; + this.paramName = paramName; + this.apiKey = ''; + } + applyToRequest(requestOptions) { + if (this.location == "query") { + requestOptions.qs[this.paramName] = this.apiKey; + } + else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } + else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} +exports.ApiKeyAuth = ApiKeyAuth; +class OAuth { + constructor() { + this.accessToken = ''; + } + applyToRequest(requestOptions) { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} +exports.OAuth = OAuth; +class VoidAuth { + constructor() { + this.username = ''; + this.password = ''; + } + applyToRequest(_) { + // Do nothing + } +} +exports.VoidAuth = VoidAuth; +//# sourceMappingURL=models.js.map + +/***/ }), + +/***/ 74612: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1HTTPIngressPath = void 0; +/** +* HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend. +*/ +class NetworkingV1beta1HTTPIngressPath { + static getAttributeTypeMap() { + return NetworkingV1beta1HTTPIngressPath.attributeTypeMap; + } +} +exports.NetworkingV1beta1HTTPIngressPath = NetworkingV1beta1HTTPIngressPath; +NetworkingV1beta1HTTPIngressPath.discriminator = undefined; +NetworkingV1beta1HTTPIngressPath.attributeTypeMap = [ + { + "name": "backend", + "baseName": "backend", + "type": "NetworkingV1beta1IngressBackend" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "pathType", + "baseName": "pathType", + "type": "string" + } +]; +//# sourceMappingURL=networkingV1beta1HTTPIngressPath.js.map + +/***/ }), + +/***/ 6512: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1HTTPIngressRuleValue = void 0; +/** +* HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last \'/\' and before the first \'?\' or \'#\'. +*/ +class NetworkingV1beta1HTTPIngressRuleValue { + static getAttributeTypeMap() { + return NetworkingV1beta1HTTPIngressRuleValue.attributeTypeMap; + } +} +exports.NetworkingV1beta1HTTPIngressRuleValue = NetworkingV1beta1HTTPIngressRuleValue; +NetworkingV1beta1HTTPIngressRuleValue.discriminator = undefined; +NetworkingV1beta1HTTPIngressRuleValue.attributeTypeMap = [ + { + "name": "paths", + "baseName": "paths", + "type": "Array" + } +]; +//# sourceMappingURL=networkingV1beta1HTTPIngressRuleValue.js.map + +/***/ }), + +/***/ 50417: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1Ingress = void 0; +/** +* Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. +*/ +class NetworkingV1beta1Ingress { + static getAttributeTypeMap() { + return NetworkingV1beta1Ingress.attributeTypeMap; + } +} +exports.NetworkingV1beta1Ingress = NetworkingV1beta1Ingress; +NetworkingV1beta1Ingress.discriminator = undefined; +NetworkingV1beta1Ingress.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "NetworkingV1beta1IngressSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "NetworkingV1beta1IngressStatus" + } +]; +//# sourceMappingURL=networkingV1beta1Ingress.js.map + +/***/ }), + +/***/ 87921: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1IngressBackend = void 0; +/** +* IngressBackend describes all endpoints for a given service and port. +*/ +class NetworkingV1beta1IngressBackend { + static getAttributeTypeMap() { + return NetworkingV1beta1IngressBackend.attributeTypeMap; + } +} +exports.NetworkingV1beta1IngressBackend = NetworkingV1beta1IngressBackend; +NetworkingV1beta1IngressBackend.discriminator = undefined; +NetworkingV1beta1IngressBackend.attributeTypeMap = [ + { + "name": "resource", + "baseName": "resource", + "type": "V1TypedLocalObjectReference" + }, + { + "name": "serviceName", + "baseName": "serviceName", + "type": "string" + }, + { + "name": "servicePort", + "baseName": "servicePort", + "type": "object" + } +]; +//# sourceMappingURL=networkingV1beta1IngressBackend.js.map + +/***/ }), + +/***/ 83849: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1IngressList = void 0; +/** +* IngressList is a collection of Ingress. +*/ +class NetworkingV1beta1IngressList { + static getAttributeTypeMap() { + return NetworkingV1beta1IngressList.attributeTypeMap; + } +} +exports.NetworkingV1beta1IngressList = NetworkingV1beta1IngressList; +NetworkingV1beta1IngressList.discriminator = undefined; +NetworkingV1beta1IngressList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=networkingV1beta1IngressList.js.map + +/***/ }), + +/***/ 51816: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1IngressRule = void 0; +/** +* IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue. +*/ +class NetworkingV1beta1IngressRule { + static getAttributeTypeMap() { + return NetworkingV1beta1IngressRule.attributeTypeMap; + } +} +exports.NetworkingV1beta1IngressRule = NetworkingV1beta1IngressRule; +NetworkingV1beta1IngressRule.discriminator = undefined; +NetworkingV1beta1IngressRule.attributeTypeMap = [ + { + "name": "host", + "baseName": "host", + "type": "string" + }, + { + "name": "http", + "baseName": "http", + "type": "NetworkingV1beta1HTTPIngressRuleValue" + } +]; +//# sourceMappingURL=networkingV1beta1IngressRule.js.map + +/***/ }), + +/***/ 56512: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1IngressSpec = void 0; +/** +* IngressSpec describes the Ingress the user wishes to exist. +*/ +class NetworkingV1beta1IngressSpec { + static getAttributeTypeMap() { + return NetworkingV1beta1IngressSpec.attributeTypeMap; + } +} +exports.NetworkingV1beta1IngressSpec = NetworkingV1beta1IngressSpec; +NetworkingV1beta1IngressSpec.discriminator = undefined; +NetworkingV1beta1IngressSpec.attributeTypeMap = [ + { + "name": "backend", + "baseName": "backend", + "type": "NetworkingV1beta1IngressBackend" + }, + { + "name": "ingressClassName", + "baseName": "ingressClassName", + "type": "string" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + }, + { + "name": "tls", + "baseName": "tls", + "type": "Array" + } +]; +//# sourceMappingURL=networkingV1beta1IngressSpec.js.map + +/***/ }), + +/***/ 14841: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1IngressStatus = void 0; +/** +* IngressStatus describe the current state of the Ingress. +*/ +class NetworkingV1beta1IngressStatus { + static getAttributeTypeMap() { + return NetworkingV1beta1IngressStatus.attributeTypeMap; + } +} +exports.NetworkingV1beta1IngressStatus = NetworkingV1beta1IngressStatus; +NetworkingV1beta1IngressStatus.discriminator = undefined; +NetworkingV1beta1IngressStatus.attributeTypeMap = [ + { + "name": "loadBalancer", + "baseName": "loadBalancer", + "type": "V1LoadBalancerStatus" + } +]; +//# sourceMappingURL=networkingV1beta1IngressStatus.js.map + +/***/ }), + +/***/ 58005: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NetworkingV1beta1IngressTLS = void 0; +/** +* IngressTLS describes the transport layer security associated with an Ingress. +*/ +class NetworkingV1beta1IngressTLS { + static getAttributeTypeMap() { + return NetworkingV1beta1IngressTLS.attributeTypeMap; + } +} +exports.NetworkingV1beta1IngressTLS = NetworkingV1beta1IngressTLS; +NetworkingV1beta1IngressTLS.discriminator = undefined; +NetworkingV1beta1IngressTLS.attributeTypeMap = [ + { + "name": "hosts", + "baseName": "hosts", + "type": "Array" + }, + { + "name": "secretName", + "baseName": "secretName", + "type": "string" + } +]; +//# sourceMappingURL=networkingV1beta1IngressTLS.js.map + +/***/ }), + +/***/ 35680: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RbacV1beta1Subject = void 0; +/** +* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. +*/ +class RbacV1beta1Subject { + static getAttributeTypeMap() { + return RbacV1beta1Subject.attributeTypeMap; + } +} +exports.RbacV1beta1Subject = RbacV1beta1Subject; +RbacV1beta1Subject.discriminator = undefined; +RbacV1beta1Subject.attributeTypeMap = [ + { + "name": "apiGroup", + "baseName": "apiGroup", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + } +]; +//# sourceMappingURL=rbacV1beta1Subject.js.map + +/***/ }), + +/***/ 71735: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageV1TokenRequest = void 0; +/** +* TokenRequest contains parameters of a service account token. +*/ +class StorageV1TokenRequest { + static getAttributeTypeMap() { + return StorageV1TokenRequest.attributeTypeMap; + } +} +exports.StorageV1TokenRequest = StorageV1TokenRequest; +StorageV1TokenRequest.discriminator = undefined; +StorageV1TokenRequest.attributeTypeMap = [ + { + "name": "audience", + "baseName": "audience", + "type": "string" + }, + { + "name": "expirationSeconds", + "baseName": "expirationSeconds", + "type": "number" + } +]; +//# sourceMappingURL=storageV1TokenRequest.js.map + +/***/ }), + +/***/ 60197: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIGroup = void 0; +/** +* APIGroup contains the name, the supported versions, and the preferred version of a group. +*/ +class V1APIGroup { + static getAttributeTypeMap() { + return V1APIGroup.attributeTypeMap; + } +} +exports.V1APIGroup = V1APIGroup; +V1APIGroup.discriminator = undefined; +V1APIGroup.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "preferredVersion", + "baseName": "preferredVersion", + "type": "V1GroupVersionForDiscovery" + }, + { + "name": "serverAddressByClientCIDRs", + "baseName": "serverAddressByClientCIDRs", + "type": "Array" + }, + { + "name": "versions", + "baseName": "versions", + "type": "Array" + } +]; +//# sourceMappingURL=v1APIGroup.js.map + +/***/ }), + +/***/ 53598: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIGroupList = void 0; +/** +* APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis. +*/ +class V1APIGroupList { + static getAttributeTypeMap() { + return V1APIGroupList.attributeTypeMap; + } +} +exports.V1APIGroupList = V1APIGroupList; +V1APIGroupList.discriminator = undefined; +V1APIGroupList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + } +]; +//# sourceMappingURL=v1APIGroupList.js.map + +/***/ }), + +/***/ 25099: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIResource = void 0; +/** +* APIResource specifies the name of a resource and whether it is namespaced. +*/ +class V1APIResource { + static getAttributeTypeMap() { + return V1APIResource.attributeTypeMap; + } +} +exports.V1APIResource = V1APIResource; +V1APIResource.discriminator = undefined; +V1APIResource.attributeTypeMap = [ + { + "name": "categories", + "baseName": "categories", + "type": "Array" + }, + { + "name": "group", + "baseName": "group", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespaced", + "baseName": "namespaced", + "type": "boolean" + }, + { + "name": "shortNames", + "baseName": "shortNames", + "type": "Array" + }, + { + "name": "singularName", + "baseName": "singularName", + "type": "string" + }, + { + "name": "storageVersionHash", + "baseName": "storageVersionHash", + "type": "string" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + } +]; +//# sourceMappingURL=v1APIResource.js.map + +/***/ }), + +/***/ 35184: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIResourceList = void 0; +/** +* APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced. +*/ +class V1APIResourceList { + static getAttributeTypeMap() { + return V1APIResourceList.attributeTypeMap; + } +} +exports.V1APIResourceList = V1APIResourceList; +V1APIResourceList.discriminator = undefined; +V1APIResourceList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "groupVersion", + "baseName": "groupVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + } +]; +//# sourceMappingURL=v1APIResourceList.js.map + +/***/ }), + +/***/ 94872: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIService = void 0; +/** +* APIService represents a server for a particular GroupVersion. Name must be \"version.group\". +*/ +class V1APIService { + static getAttributeTypeMap() { + return V1APIService.attributeTypeMap; + } +} +exports.V1APIService = V1APIService; +V1APIService.discriminator = undefined; +V1APIService.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1APIServiceSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1APIServiceStatus" + } +]; +//# sourceMappingURL=v1APIService.js.map + +/***/ }), + +/***/ 95173: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIServiceCondition = void 0; +/** +* APIServiceCondition describes the state of an APIService at a particular point +*/ +class V1APIServiceCondition { + static getAttributeTypeMap() { + return V1APIServiceCondition.attributeTypeMap; + } +} +exports.V1APIServiceCondition = V1APIServiceCondition; +V1APIServiceCondition.discriminator = undefined; +V1APIServiceCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1APIServiceCondition.js.map + +/***/ }), + +/***/ 69022: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIServiceList = void 0; +/** +* APIServiceList is a list of APIService objects. +*/ +class V1APIServiceList { + static getAttributeTypeMap() { + return V1APIServiceList.attributeTypeMap; + } +} +exports.V1APIServiceList = V1APIServiceList; +V1APIServiceList.discriminator = undefined; +V1APIServiceList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1APIServiceList.js.map + +/***/ }), + +/***/ 17272: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIServiceSpec = void 0; +/** +* APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. +*/ +class V1APIServiceSpec { + static getAttributeTypeMap() { + return V1APIServiceSpec.attributeTypeMap; + } +} +exports.V1APIServiceSpec = V1APIServiceSpec; +V1APIServiceSpec.discriminator = undefined; +V1APIServiceSpec.attributeTypeMap = [ + { + "name": "caBundle", + "baseName": "caBundle", + "type": "string" + }, + { + "name": "group", + "baseName": "group", + "type": "string" + }, + { + "name": "groupPriorityMinimum", + "baseName": "groupPriorityMinimum", + "type": "number" + }, + { + "name": "insecureSkipTLSVerify", + "baseName": "insecureSkipTLSVerify", + "type": "boolean" + }, + { + "name": "service", + "baseName": "service", + "type": "ApiregistrationV1ServiceReference" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + }, + { + "name": "versionPriority", + "baseName": "versionPriority", + "type": "number" + } +]; +//# sourceMappingURL=v1APIServiceSpec.js.map + +/***/ }), + +/***/ 29509: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIServiceStatus = void 0; +/** +* APIServiceStatus contains derived information about an API server +*/ +class V1APIServiceStatus { + static getAttributeTypeMap() { + return V1APIServiceStatus.attributeTypeMap; + } +} +exports.V1APIServiceStatus = V1APIServiceStatus; +V1APIServiceStatus.discriminator = undefined; +V1APIServiceStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + } +]; +//# sourceMappingURL=v1APIServiceStatus.js.map + +/***/ }), + +/***/ 417: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1APIVersions = void 0; +/** +* APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API. +*/ +class V1APIVersions { + static getAttributeTypeMap() { + return V1APIVersions.attributeTypeMap; + } +} +exports.V1APIVersions = V1APIVersions; +V1APIVersions.discriminator = undefined; +V1APIVersions.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "serverAddressByClientCIDRs", + "baseName": "serverAddressByClientCIDRs", + "type": "Array" + }, + { + "name": "versions", + "baseName": "versions", + "type": "Array" + } +]; +//# sourceMappingURL=v1APIVersions.js.map + +/***/ }), + +/***/ 55353: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1AWSElasticBlockStoreVolumeSource = void 0; +/** +* Represents a Persistent Disk resource in AWS. An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling. +*/ +class V1AWSElasticBlockStoreVolumeSource { + static getAttributeTypeMap() { + return V1AWSElasticBlockStoreVolumeSource.attributeTypeMap; + } +} +exports.V1AWSElasticBlockStoreVolumeSource = V1AWSElasticBlockStoreVolumeSource; +V1AWSElasticBlockStoreVolumeSource.discriminator = undefined; +V1AWSElasticBlockStoreVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "partition", + "baseName": "partition", + "type": "number" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "volumeID", + "baseName": "volumeID", + "type": "string" + } +]; +//# sourceMappingURL=v1AWSElasticBlockStoreVolumeSource.js.map + +/***/ }), + +/***/ 81491: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Affinity = void 0; +/** +* Affinity is a group of affinity scheduling rules. +*/ +class V1Affinity { + static getAttributeTypeMap() { + return V1Affinity.attributeTypeMap; + } +} +exports.V1Affinity = V1Affinity; +V1Affinity.discriminator = undefined; +V1Affinity.attributeTypeMap = [ + { + "name": "nodeAffinity", + "baseName": "nodeAffinity", + "type": "V1NodeAffinity" + }, + { + "name": "podAffinity", + "baseName": "podAffinity", + "type": "V1PodAffinity" + }, + { + "name": "podAntiAffinity", + "baseName": "podAntiAffinity", + "type": "V1PodAntiAffinity" + } +]; +//# sourceMappingURL=v1Affinity.js.map + +/***/ }), + +/***/ 77816: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1AggregationRule = void 0; +/** +* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole +*/ +class V1AggregationRule { + static getAttributeTypeMap() { + return V1AggregationRule.attributeTypeMap; + } +} +exports.V1AggregationRule = V1AggregationRule; +V1AggregationRule.discriminator = undefined; +V1AggregationRule.attributeTypeMap = [ + { + "name": "clusterRoleSelectors", + "baseName": "clusterRoleSelectors", + "type": "Array" + } +]; +//# sourceMappingURL=v1AggregationRule.js.map + +/***/ }), + +/***/ 40016: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1AttachedVolume = void 0; +/** +* AttachedVolume describes a volume attached to a node +*/ +class V1AttachedVolume { + static getAttributeTypeMap() { + return V1AttachedVolume.attributeTypeMap; + } +} +exports.V1AttachedVolume = V1AttachedVolume; +V1AttachedVolume.discriminator = undefined; +V1AttachedVolume.attributeTypeMap = [ + { + "name": "devicePath", + "baseName": "devicePath", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1AttachedVolume.js.map + +/***/ }), + +/***/ 42389: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1AzureDiskVolumeSource = void 0; +/** +* AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. +*/ +class V1AzureDiskVolumeSource { + static getAttributeTypeMap() { + return V1AzureDiskVolumeSource.attributeTypeMap; + } +} +exports.V1AzureDiskVolumeSource = V1AzureDiskVolumeSource; +V1AzureDiskVolumeSource.discriminator = undefined; +V1AzureDiskVolumeSource.attributeTypeMap = [ + { + "name": "cachingMode", + "baseName": "cachingMode", + "type": "string" + }, + { + "name": "diskName", + "baseName": "diskName", + "type": "string" + }, + { + "name": "diskURI", + "baseName": "diskURI", + "type": "string" + }, + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + } +]; +//# sourceMappingURL=v1AzureDiskVolumeSource.js.map + +/***/ }), + +/***/ 11524: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1AzureFilePersistentVolumeSource = void 0; +/** +* AzureFile represents an Azure File Service mount on the host and bind mount to the pod. +*/ +class V1AzureFilePersistentVolumeSource { + static getAttributeTypeMap() { + return V1AzureFilePersistentVolumeSource.attributeTypeMap; + } +} +exports.V1AzureFilePersistentVolumeSource = V1AzureFilePersistentVolumeSource; +V1AzureFilePersistentVolumeSource.discriminator = undefined; +V1AzureFilePersistentVolumeSource.attributeTypeMap = [ + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretName", + "baseName": "secretName", + "type": "string" + }, + { + "name": "secretNamespace", + "baseName": "secretNamespace", + "type": "string" + }, + { + "name": "shareName", + "baseName": "shareName", + "type": "string" + } +]; +//# sourceMappingURL=v1AzureFilePersistentVolumeSource.js.map + +/***/ }), + +/***/ 63609: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1AzureFileVolumeSource = void 0; +/** +* AzureFile represents an Azure File Service mount on the host and bind mount to the pod. +*/ +class V1AzureFileVolumeSource { + static getAttributeTypeMap() { + return V1AzureFileVolumeSource.attributeTypeMap; + } +} +exports.V1AzureFileVolumeSource = V1AzureFileVolumeSource; +V1AzureFileVolumeSource.discriminator = undefined; +V1AzureFileVolumeSource.attributeTypeMap = [ + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretName", + "baseName": "secretName", + "type": "string" + }, + { + "name": "shareName", + "baseName": "shareName", + "type": "string" + } +]; +//# sourceMappingURL=v1AzureFileVolumeSource.js.map + +/***/ }), + +/***/ 46508: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Binding = void 0; +/** +* Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead. +*/ +class V1Binding { + static getAttributeTypeMap() { + return V1Binding.attributeTypeMap; + } +} +exports.V1Binding = V1Binding; +V1Binding.discriminator = undefined; +V1Binding.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "target", + "baseName": "target", + "type": "V1ObjectReference" + } +]; +//# sourceMappingURL=v1Binding.js.map + +/***/ }), + +/***/ 35417: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1BoundObjectReference = void 0; +/** +* BoundObjectReference is a reference to an object that a token is bound to. +*/ +class V1BoundObjectReference { + static getAttributeTypeMap() { + return V1BoundObjectReference.attributeTypeMap; + } +} +exports.V1BoundObjectReference = V1BoundObjectReference; +V1BoundObjectReference.discriminator = undefined; +V1BoundObjectReference.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + } +]; +//# sourceMappingURL=v1BoundObjectReference.js.map + +/***/ }), + +/***/ 90437: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CSIDriver = void 0; +/** +* CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced. +*/ +class V1CSIDriver { + static getAttributeTypeMap() { + return V1CSIDriver.attributeTypeMap; + } +} +exports.V1CSIDriver = V1CSIDriver; +V1CSIDriver.discriminator = undefined; +V1CSIDriver.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1CSIDriverSpec" + } +]; +//# sourceMappingURL=v1CSIDriver.js.map + +/***/ }), + +/***/ 34301: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CSIDriverList = void 0; +/** +* CSIDriverList is a collection of CSIDriver objects. +*/ +class V1CSIDriverList { + static getAttributeTypeMap() { + return V1CSIDriverList.attributeTypeMap; + } +} +exports.V1CSIDriverList = V1CSIDriverList; +V1CSIDriverList.discriminator = undefined; +V1CSIDriverList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1CSIDriverList.js.map + +/***/ }), + +/***/ 76400: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CSIDriverSpec = void 0; +/** +* CSIDriverSpec is the specification of a CSIDriver. +*/ +class V1CSIDriverSpec { + static getAttributeTypeMap() { + return V1CSIDriverSpec.attributeTypeMap; + } +} +exports.V1CSIDriverSpec = V1CSIDriverSpec; +V1CSIDriverSpec.discriminator = undefined; +V1CSIDriverSpec.attributeTypeMap = [ + { + "name": "attachRequired", + "baseName": "attachRequired", + "type": "boolean" + }, + { + "name": "fsGroupPolicy", + "baseName": "fsGroupPolicy", + "type": "string" + }, + { + "name": "podInfoOnMount", + "baseName": "podInfoOnMount", + "type": "boolean" + }, + { + "name": "requiresRepublish", + "baseName": "requiresRepublish", + "type": "boolean" + }, + { + "name": "storageCapacity", + "baseName": "storageCapacity", + "type": "boolean" + }, + { + "name": "tokenRequests", + "baseName": "tokenRequests", + "type": "Array" + }, + { + "name": "volumeLifecycleModes", + "baseName": "volumeLifecycleModes", + "type": "Array" + } +]; +//# sourceMappingURL=v1CSIDriverSpec.js.map + +/***/ }), + +/***/ 47341: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CSINode = void 0; +/** +* CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn\'t create this object. CSINode has an OwnerReference that points to the corresponding node object. +*/ +class V1CSINode { + static getAttributeTypeMap() { + return V1CSINode.attributeTypeMap; + } +} +exports.V1CSINode = V1CSINode; +V1CSINode.discriminator = undefined; +V1CSINode.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1CSINodeSpec" + } +]; +//# sourceMappingURL=v1CSINode.js.map + +/***/ }), + +/***/ 47995: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CSINodeDriver = void 0; +/** +* CSINodeDriver holds information about the specification of one CSI driver installed on a node +*/ +class V1CSINodeDriver { + static getAttributeTypeMap() { + return V1CSINodeDriver.attributeTypeMap; + } +} +exports.V1CSINodeDriver = V1CSINodeDriver; +V1CSINodeDriver.discriminator = undefined; +V1CSINodeDriver.attributeTypeMap = [ + { + "name": "allocatable", + "baseName": "allocatable", + "type": "V1VolumeNodeResources" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "nodeID", + "baseName": "nodeID", + "type": "string" + }, + { + "name": "topologyKeys", + "baseName": "topologyKeys", + "type": "Array" + } +]; +//# sourceMappingURL=v1CSINodeDriver.js.map + +/***/ }), + +/***/ 43677: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CSINodeList = void 0; +/** +* CSINodeList is a collection of CSINode objects. +*/ +class V1CSINodeList { + static getAttributeTypeMap() { + return V1CSINodeList.attributeTypeMap; + } +} +exports.V1CSINodeList = V1CSINodeList; +V1CSINodeList.discriminator = undefined; +V1CSINodeList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1CSINodeList.js.map + +/***/ }), + +/***/ 3443: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CSINodeSpec = void 0; +/** +* CSINodeSpec holds information about the specification of all CSI drivers installed on a node +*/ +class V1CSINodeSpec { + static getAttributeTypeMap() { + return V1CSINodeSpec.attributeTypeMap; + } +} +exports.V1CSINodeSpec = V1CSINodeSpec; +V1CSINodeSpec.discriminator = undefined; +V1CSINodeSpec.attributeTypeMap = [ + { + "name": "drivers", + "baseName": "drivers", + "type": "Array" + } +]; +//# sourceMappingURL=v1CSINodeSpec.js.map + +/***/ }), + +/***/ 32892: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CSIPersistentVolumeSource = void 0; +/** +* Represents storage that is managed by an external CSI volume driver (Beta feature) +*/ +class V1CSIPersistentVolumeSource { + static getAttributeTypeMap() { + return V1CSIPersistentVolumeSource.attributeTypeMap; + } +} +exports.V1CSIPersistentVolumeSource = V1CSIPersistentVolumeSource; +V1CSIPersistentVolumeSource.discriminator = undefined; +V1CSIPersistentVolumeSource.attributeTypeMap = [ + { + "name": "controllerExpandSecretRef", + "baseName": "controllerExpandSecretRef", + "type": "V1SecretReference" + }, + { + "name": "controllerPublishSecretRef", + "baseName": "controllerPublishSecretRef", + "type": "V1SecretReference" + }, + { + "name": "driver", + "baseName": "driver", + "type": "string" + }, + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "nodePublishSecretRef", + "baseName": "nodePublishSecretRef", + "type": "V1SecretReference" + }, + { + "name": "nodeStageSecretRef", + "baseName": "nodeStageSecretRef", + "type": "V1SecretReference" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "volumeAttributes", + "baseName": "volumeAttributes", + "type": "{ [key: string]: string; }" + }, + { + "name": "volumeHandle", + "baseName": "volumeHandle", + "type": "string" + } +]; +//# sourceMappingURL=v1CSIPersistentVolumeSource.js.map + +/***/ }), + +/***/ 16840: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CSIVolumeSource = void 0; +/** +* Represents a source location of a volume to mount, managed by an external CSI driver +*/ +class V1CSIVolumeSource { + static getAttributeTypeMap() { + return V1CSIVolumeSource.attributeTypeMap; + } +} +exports.V1CSIVolumeSource = V1CSIVolumeSource; +V1CSIVolumeSource.discriminator = undefined; +V1CSIVolumeSource.attributeTypeMap = [ + { + "name": "driver", + "baseName": "driver", + "type": "string" + }, + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "nodePublishSecretRef", + "baseName": "nodePublishSecretRef", + "type": "V1LocalObjectReference" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "volumeAttributes", + "baseName": "volumeAttributes", + "type": "{ [key: string]: string; }" + } +]; +//# sourceMappingURL=v1CSIVolumeSource.js.map + +/***/ }), + +/***/ 10982: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Capabilities = void 0; +/** +* Adds and removes POSIX capabilities from running containers. +*/ +class V1Capabilities { + static getAttributeTypeMap() { + return V1Capabilities.attributeTypeMap; + } +} +exports.V1Capabilities = V1Capabilities; +V1Capabilities.discriminator = undefined; +V1Capabilities.attributeTypeMap = [ + { + "name": "add", + "baseName": "add", + "type": "Array" + }, + { + "name": "drop", + "baseName": "drop", + "type": "Array" + } +]; +//# sourceMappingURL=v1Capabilities.js.map + +/***/ }), + +/***/ 67511: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CephFSPersistentVolumeSource = void 0; +/** +* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. +*/ +class V1CephFSPersistentVolumeSource { + static getAttributeTypeMap() { + return V1CephFSPersistentVolumeSource.attributeTypeMap; + } +} +exports.V1CephFSPersistentVolumeSource = V1CephFSPersistentVolumeSource; +V1CephFSPersistentVolumeSource.discriminator = undefined; +V1CephFSPersistentVolumeSource.attributeTypeMap = [ + { + "name": "monitors", + "baseName": "monitors", + "type": "Array" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretFile", + "baseName": "secretFile", + "type": "string" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1SecretReference" + }, + { + "name": "user", + "baseName": "user", + "type": "string" + } +]; +//# sourceMappingURL=v1CephFSPersistentVolumeSource.js.map + +/***/ }), + +/***/ 8539: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CephFSVolumeSource = void 0; +/** +* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. +*/ +class V1CephFSVolumeSource { + static getAttributeTypeMap() { + return V1CephFSVolumeSource.attributeTypeMap; + } +} +exports.V1CephFSVolumeSource = V1CephFSVolumeSource; +V1CephFSVolumeSource.discriminator = undefined; +V1CephFSVolumeSource.attributeTypeMap = [ + { + "name": "monitors", + "baseName": "monitors", + "type": "Array" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretFile", + "baseName": "secretFile", + "type": "string" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1LocalObjectReference" + }, + { + "name": "user", + "baseName": "user", + "type": "string" + } +]; +//# sourceMappingURL=v1CephFSVolumeSource.js.map + +/***/ }), + +/***/ 57450: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CertificateSigningRequest = void 0; +/** +* CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. Kubelets use this API to obtain: 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName). 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName). This API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers. +*/ +class V1CertificateSigningRequest { + static getAttributeTypeMap() { + return V1CertificateSigningRequest.attributeTypeMap; + } +} +exports.V1CertificateSigningRequest = V1CertificateSigningRequest; +V1CertificateSigningRequest.discriminator = undefined; +V1CertificateSigningRequest.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1CertificateSigningRequestSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1CertificateSigningRequestStatus" + } +]; +//# sourceMappingURL=v1CertificateSigningRequest.js.map + +/***/ }), + +/***/ 56467: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CertificateSigningRequestCondition = void 0; +/** +* CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object +*/ +class V1CertificateSigningRequestCondition { + static getAttributeTypeMap() { + return V1CertificateSigningRequestCondition.attributeTypeMap; + } +} +exports.V1CertificateSigningRequestCondition = V1CertificateSigningRequestCondition; +V1CertificateSigningRequestCondition.discriminator = undefined; +V1CertificateSigningRequestCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "lastUpdateTime", + "baseName": "lastUpdateTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1CertificateSigningRequestCondition.js.map + +/***/ }), + +/***/ 29362: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CertificateSigningRequestList = void 0; +/** +* CertificateSigningRequestList is a collection of CertificateSigningRequest objects +*/ +class V1CertificateSigningRequestList { + static getAttributeTypeMap() { + return V1CertificateSigningRequestList.attributeTypeMap; + } +} +exports.V1CertificateSigningRequestList = V1CertificateSigningRequestList; +V1CertificateSigningRequestList.discriminator = undefined; +V1CertificateSigningRequestList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1CertificateSigningRequestList.js.map + +/***/ }), + +/***/ 61457: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CertificateSigningRequestSpec = void 0; +/** +* CertificateSigningRequestSpec contains the certificate request. +*/ +class V1CertificateSigningRequestSpec { + static getAttributeTypeMap() { + return V1CertificateSigningRequestSpec.attributeTypeMap; + } +} +exports.V1CertificateSigningRequestSpec = V1CertificateSigningRequestSpec; +V1CertificateSigningRequestSpec.discriminator = undefined; +V1CertificateSigningRequestSpec.attributeTypeMap = [ + { + "name": "extra", + "baseName": "extra", + "type": "{ [key: string]: Array; }" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array" + }, + { + "name": "request", + "baseName": "request", + "type": "string" + }, + { + "name": "signerName", + "baseName": "signerName", + "type": "string" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + }, + { + "name": "usages", + "baseName": "usages", + "type": "Array" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } +]; +//# sourceMappingURL=v1CertificateSigningRequestSpec.js.map + +/***/ }), + +/***/ 14417: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CertificateSigningRequestStatus = void 0; +/** +* CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate. +*/ +class V1CertificateSigningRequestStatus { + static getAttributeTypeMap() { + return V1CertificateSigningRequestStatus.attributeTypeMap; + } +} +exports.V1CertificateSigningRequestStatus = V1CertificateSigningRequestStatus; +V1CertificateSigningRequestStatus.discriminator = undefined; +V1CertificateSigningRequestStatus.attributeTypeMap = [ + { + "name": "certificate", + "baseName": "certificate", + "type": "string" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + } +]; +//# sourceMappingURL=v1CertificateSigningRequestStatus.js.map + +/***/ }), + +/***/ 68248: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CinderPersistentVolumeSource = void 0; +/** +* Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling. +*/ +class V1CinderPersistentVolumeSource { + static getAttributeTypeMap() { + return V1CinderPersistentVolumeSource.attributeTypeMap; + } +} +exports.V1CinderPersistentVolumeSource = V1CinderPersistentVolumeSource; +V1CinderPersistentVolumeSource.discriminator = undefined; +V1CinderPersistentVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1SecretReference" + }, + { + "name": "volumeID", + "baseName": "volumeID", + "type": "string" + } +]; +//# sourceMappingURL=v1CinderPersistentVolumeSource.js.map + +/***/ }), + +/***/ 41263: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CinderVolumeSource = void 0; +/** +* Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling. +*/ +class V1CinderVolumeSource { + static getAttributeTypeMap() { + return V1CinderVolumeSource.attributeTypeMap; + } +} +exports.V1CinderVolumeSource = V1CinderVolumeSource; +V1CinderVolumeSource.discriminator = undefined; +V1CinderVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1LocalObjectReference" + }, + { + "name": "volumeID", + "baseName": "volumeID", + "type": "string" + } +]; +//# sourceMappingURL=v1CinderVolumeSource.js.map + +/***/ }), + +/***/ 6201: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ClientIPConfig = void 0; +/** +* ClientIPConfig represents the configurations of Client IP based session affinity. +*/ +class V1ClientIPConfig { + static getAttributeTypeMap() { + return V1ClientIPConfig.attributeTypeMap; + } +} +exports.V1ClientIPConfig = V1ClientIPConfig; +V1ClientIPConfig.discriminator = undefined; +V1ClientIPConfig.attributeTypeMap = [ + { + "name": "timeoutSeconds", + "baseName": "timeoutSeconds", + "type": "number" + } +]; +//# sourceMappingURL=v1ClientIPConfig.js.map + +/***/ }), + +/***/ 19537: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ClusterRole = void 0; +/** +* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +*/ +class V1ClusterRole { + static getAttributeTypeMap() { + return V1ClusterRole.attributeTypeMap; + } +} +exports.V1ClusterRole = V1ClusterRole; +V1ClusterRole.discriminator = undefined; +V1ClusterRole.attributeTypeMap = [ + { + "name": "aggregationRule", + "baseName": "aggregationRule", + "type": "V1AggregationRule" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + } +]; +//# sourceMappingURL=v1ClusterRole.js.map + +/***/ }), + +/***/ 97878: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ClusterRoleBinding = void 0; +/** +* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. +*/ +class V1ClusterRoleBinding { + static getAttributeTypeMap() { + return V1ClusterRoleBinding.attributeTypeMap; + } +} +exports.V1ClusterRoleBinding = V1ClusterRoleBinding; +V1ClusterRoleBinding.discriminator = undefined; +V1ClusterRoleBinding.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "roleRef", + "baseName": "roleRef", + "type": "V1RoleRef" + }, + { + "name": "subjects", + "baseName": "subjects", + "type": "Array" + } +]; +//# sourceMappingURL=v1ClusterRoleBinding.js.map + +/***/ }), + +/***/ 24665: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ClusterRoleBindingList = void 0; +/** +* ClusterRoleBindingList is a collection of ClusterRoleBindings +*/ +class V1ClusterRoleBindingList { + static getAttributeTypeMap() { + return V1ClusterRoleBindingList.attributeTypeMap; + } +} +exports.V1ClusterRoleBindingList = V1ClusterRoleBindingList; +V1ClusterRoleBindingList.discriminator = undefined; +V1ClusterRoleBindingList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ClusterRoleBindingList.js.map + +/***/ }), + +/***/ 90771: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ClusterRoleList = void 0; +/** +* ClusterRoleList is a collection of ClusterRoles +*/ +class V1ClusterRoleList { + static getAttributeTypeMap() { + return V1ClusterRoleList.attributeTypeMap; + } +} +exports.V1ClusterRoleList = V1ClusterRoleList; +V1ClusterRoleList.discriminator = undefined; +V1ClusterRoleList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ClusterRoleList.js.map + +/***/ }), + +/***/ 86871: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ComponentCondition = void 0; +/** +* Information about the condition of a component. +*/ +class V1ComponentCondition { + static getAttributeTypeMap() { + return V1ComponentCondition.attributeTypeMap; + } +} +exports.V1ComponentCondition = V1ComponentCondition; +V1ComponentCondition.discriminator = undefined; +V1ComponentCondition.attributeTypeMap = [ + { + "name": "error", + "baseName": "error", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1ComponentCondition.js.map + +/***/ }), + +/***/ 30595: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ComponentStatus = void 0; +/** +* ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+ +*/ +class V1ComponentStatus { + static getAttributeTypeMap() { + return V1ComponentStatus.attributeTypeMap; + } +} +exports.V1ComponentStatus = V1ComponentStatus; +V1ComponentStatus.discriminator = undefined; +V1ComponentStatus.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + } +]; +//# sourceMappingURL=v1ComponentStatus.js.map + +/***/ }), + +/***/ 82764: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ComponentStatusList = void 0; +/** +* Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+ +*/ +class V1ComponentStatusList { + static getAttributeTypeMap() { + return V1ComponentStatusList.attributeTypeMap; + } +} +exports.V1ComponentStatusList = V1ComponentStatusList; +V1ComponentStatusList.discriminator = undefined; +V1ComponentStatusList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ComponentStatusList.js.map + +/***/ }), + +/***/ 54629: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Condition = void 0; +/** +* Condition contains details for one aspect of the current state of this API Resource. +*/ +class V1Condition { + static getAttributeTypeMap() { + return V1Condition.attributeTypeMap; + } +} +exports.V1Condition = V1Condition; +V1Condition.discriminator = undefined; +V1Condition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1Condition.js.map + +/***/ }), + +/***/ 99107: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ConfigMap = void 0; +/** +* ConfigMap holds configuration data for pods to consume. +*/ +class V1ConfigMap { + static getAttributeTypeMap() { + return V1ConfigMap.attributeTypeMap; + } +} +exports.V1ConfigMap = V1ConfigMap; +V1ConfigMap.discriminator = undefined; +V1ConfigMap.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "binaryData", + "baseName": "binaryData", + "type": "{ [key: string]: string; }" + }, + { + "name": "data", + "baseName": "data", + "type": "{ [key: string]: string; }" + }, + { + "name": "immutable", + "baseName": "immutable", + "type": "boolean" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + } +]; +//# sourceMappingURL=v1ConfigMap.js.map + +/***/ }), + +/***/ 15931: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ConfigMapEnvSource = void 0; +/** +* ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. The contents of the target ConfigMap\'s Data field will represent the key-value pairs as environment variables. +*/ +class V1ConfigMapEnvSource { + static getAttributeTypeMap() { + return V1ConfigMapEnvSource.attributeTypeMap; + } +} +exports.V1ConfigMapEnvSource = V1ConfigMapEnvSource; +V1ConfigMapEnvSource.discriminator = undefined; +V1ConfigMapEnvSource.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + } +]; +//# sourceMappingURL=v1ConfigMapEnvSource.js.map + +/***/ }), + +/***/ 29849: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ConfigMapKeySelector = void 0; +/** +* Selects a key from a ConfigMap. +*/ +class V1ConfigMapKeySelector { + static getAttributeTypeMap() { + return V1ConfigMapKeySelector.attributeTypeMap; + } +} +exports.V1ConfigMapKeySelector = V1ConfigMapKeySelector; +V1ConfigMapKeySelector.discriminator = undefined; +V1ConfigMapKeySelector.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + } +]; +//# sourceMappingURL=v1ConfigMapKeySelector.js.map + +/***/ }), + +/***/ 76018: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ConfigMapList = void 0; +/** +* ConfigMapList is a resource containing a list of ConfigMap objects. +*/ +class V1ConfigMapList { + static getAttributeTypeMap() { + return V1ConfigMapList.attributeTypeMap; + } +} +exports.V1ConfigMapList = V1ConfigMapList; +V1ConfigMapList.discriminator = undefined; +V1ConfigMapList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ConfigMapList.js.map + +/***/ }), + +/***/ 21303: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ConfigMapNodeConfigSource = void 0; +/** +* ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. +*/ +class V1ConfigMapNodeConfigSource { + static getAttributeTypeMap() { + return V1ConfigMapNodeConfigSource.attributeTypeMap; + } +} +exports.V1ConfigMapNodeConfigSource = V1ConfigMapNodeConfigSource; +V1ConfigMapNodeConfigSource.discriminator = undefined; +V1ConfigMapNodeConfigSource.attributeTypeMap = [ + { + "name": "kubeletConfigKey", + "baseName": "kubeletConfigKey", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "resourceVersion", + "baseName": "resourceVersion", + "type": "string" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + } +]; +//# sourceMappingURL=v1ConfigMapNodeConfigSource.js.map + +/***/ }), + +/***/ 6677: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ConfigMapProjection = void 0; +/** +* Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap\'s Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. +*/ +class V1ConfigMapProjection { + static getAttributeTypeMap() { + return V1ConfigMapProjection.attributeTypeMap; + } +} +exports.V1ConfigMapProjection = V1ConfigMapProjection; +V1ConfigMapProjection.discriminator = undefined; +V1ConfigMapProjection.attributeTypeMap = [ + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + } +]; +//# sourceMappingURL=v1ConfigMapProjection.js.map + +/***/ }), + +/***/ 36505: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ConfigMapVolumeSource = void 0; +/** +* Adapts a ConfigMap into a volume. The contents of the target ConfigMap\'s Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling. +*/ +class V1ConfigMapVolumeSource { + static getAttributeTypeMap() { + return V1ConfigMapVolumeSource.attributeTypeMap; + } +} +exports.V1ConfigMapVolumeSource = V1ConfigMapVolumeSource; +V1ConfigMapVolumeSource.discriminator = undefined; +V1ConfigMapVolumeSource.attributeTypeMap = [ + { + "name": "defaultMode", + "baseName": "defaultMode", + "type": "number" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + } +]; +//# sourceMappingURL=v1ConfigMapVolumeSource.js.map + +/***/ }), + +/***/ 82444: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Container = void 0; +/** +* A single application container that you want to run within a pod. +*/ +class V1Container { + static getAttributeTypeMap() { + return V1Container.attributeTypeMap; + } +} +exports.V1Container = V1Container; +V1Container.discriminator = undefined; +V1Container.attributeTypeMap = [ + { + "name": "args", + "baseName": "args", + "type": "Array" + }, + { + "name": "command", + "baseName": "command", + "type": "Array" + }, + { + "name": "env", + "baseName": "env", + "type": "Array" + }, + { + "name": "envFrom", + "baseName": "envFrom", + "type": "Array" + }, + { + "name": "image", + "baseName": "image", + "type": "string" + }, + { + "name": "imagePullPolicy", + "baseName": "imagePullPolicy", + "type": "string" + }, + { + "name": "lifecycle", + "baseName": "lifecycle", + "type": "V1Lifecycle" + }, + { + "name": "livenessProbe", + "baseName": "livenessProbe", + "type": "V1Probe" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "ports", + "baseName": "ports", + "type": "Array" + }, + { + "name": "readinessProbe", + "baseName": "readinessProbe", + "type": "V1Probe" + }, + { + "name": "resources", + "baseName": "resources", + "type": "V1ResourceRequirements" + }, + { + "name": "securityContext", + "baseName": "securityContext", + "type": "V1SecurityContext" + }, + { + "name": "startupProbe", + "baseName": "startupProbe", + "type": "V1Probe" + }, + { + "name": "stdin", + "baseName": "stdin", + "type": "boolean" + }, + { + "name": "stdinOnce", + "baseName": "stdinOnce", + "type": "boolean" + }, + { + "name": "terminationMessagePath", + "baseName": "terminationMessagePath", + "type": "string" + }, + { + "name": "terminationMessagePolicy", + "baseName": "terminationMessagePolicy", + "type": "string" + }, + { + "name": "tty", + "baseName": "tty", + "type": "boolean" + }, + { + "name": "volumeDevices", + "baseName": "volumeDevices", + "type": "Array" + }, + { + "name": "volumeMounts", + "baseName": "volumeMounts", + "type": "Array" + }, + { + "name": "workingDir", + "baseName": "workingDir", + "type": "string" + } +]; +//# sourceMappingURL=v1Container.js.map + +/***/ }), + +/***/ 66077: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ContainerImage = void 0; +/** +* Describe a container image +*/ +class V1ContainerImage { + static getAttributeTypeMap() { + return V1ContainerImage.attributeTypeMap; + } +} +exports.V1ContainerImage = V1ContainerImage; +V1ContainerImage.discriminator = undefined; +V1ContainerImage.attributeTypeMap = [ + { + "name": "names", + "baseName": "names", + "type": "Array" + }, + { + "name": "sizeBytes", + "baseName": "sizeBytes", + "type": "number" + } +]; +//# sourceMappingURL=v1ContainerImage.js.map + +/***/ }), + +/***/ 25468: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ContainerPort = void 0; +/** +* ContainerPort represents a network port in a single container. +*/ +class V1ContainerPort { + static getAttributeTypeMap() { + return V1ContainerPort.attributeTypeMap; + } +} +exports.V1ContainerPort = V1ContainerPort; +V1ContainerPort.discriminator = undefined; +V1ContainerPort.attributeTypeMap = [ + { + "name": "containerPort", + "baseName": "containerPort", + "type": "number" + }, + { + "name": "hostIP", + "baseName": "hostIP", + "type": "string" + }, + { + "name": "hostPort", + "baseName": "hostPort", + "type": "number" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "protocol", + "baseName": "protocol", + "type": "string" + } +]; +//# sourceMappingURL=v1ContainerPort.js.map + +/***/ }), + +/***/ 36618: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ContainerState = void 0; +/** +* ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting. +*/ +class V1ContainerState { + static getAttributeTypeMap() { + return V1ContainerState.attributeTypeMap; + } +} +exports.V1ContainerState = V1ContainerState; +V1ContainerState.discriminator = undefined; +V1ContainerState.attributeTypeMap = [ + { + "name": "running", + "baseName": "running", + "type": "V1ContainerStateRunning" + }, + { + "name": "terminated", + "baseName": "terminated", + "type": "V1ContainerStateTerminated" + }, + { + "name": "waiting", + "baseName": "waiting", + "type": "V1ContainerStateWaiting" + } +]; +//# sourceMappingURL=v1ContainerState.js.map + +/***/ }), + +/***/ 23454: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ContainerStateRunning = void 0; +/** +* ContainerStateRunning is a running state of a container. +*/ +class V1ContainerStateRunning { + static getAttributeTypeMap() { + return V1ContainerStateRunning.attributeTypeMap; + } +} +exports.V1ContainerStateRunning = V1ContainerStateRunning; +V1ContainerStateRunning.discriminator = undefined; +V1ContainerStateRunning.attributeTypeMap = [ + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date" + } +]; +//# sourceMappingURL=v1ContainerStateRunning.js.map + +/***/ }), + +/***/ 75858: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ContainerStateTerminated = void 0; +/** +* ContainerStateTerminated is a terminated state of a container. +*/ +class V1ContainerStateTerminated { + static getAttributeTypeMap() { + return V1ContainerStateTerminated.attributeTypeMap; + } +} +exports.V1ContainerStateTerminated = V1ContainerStateTerminated; +V1ContainerStateTerminated.discriminator = undefined; +V1ContainerStateTerminated.attributeTypeMap = [ + { + "name": "containerID", + "baseName": "containerID", + "type": "string" + }, + { + "name": "exitCode", + "baseName": "exitCode", + "type": "number" + }, + { + "name": "finishedAt", + "baseName": "finishedAt", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "signal", + "baseName": "signal", + "type": "number" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date" + } +]; +//# sourceMappingURL=v1ContainerStateTerminated.js.map + +/***/ }), + +/***/ 14074: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ContainerStateWaiting = void 0; +/** +* ContainerStateWaiting is a waiting state of a container. +*/ +class V1ContainerStateWaiting { + static getAttributeTypeMap() { + return V1ContainerStateWaiting.attributeTypeMap; + } +} +exports.V1ContainerStateWaiting = V1ContainerStateWaiting; +V1ContainerStateWaiting.discriminator = undefined; +V1ContainerStateWaiting.attributeTypeMap = [ + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + } +]; +//# sourceMappingURL=v1ContainerStateWaiting.js.map + +/***/ }), + +/***/ 21790: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ContainerStatus = void 0; +/** +* ContainerStatus contains details for the current status of this container. +*/ +class V1ContainerStatus { + static getAttributeTypeMap() { + return V1ContainerStatus.attributeTypeMap; + } +} +exports.V1ContainerStatus = V1ContainerStatus; +V1ContainerStatus.discriminator = undefined; +V1ContainerStatus.attributeTypeMap = [ + { + "name": "containerID", + "baseName": "containerID", + "type": "string" + }, + { + "name": "image", + "baseName": "image", + "type": "string" + }, + { + "name": "imageID", + "baseName": "imageID", + "type": "string" + }, + { + "name": "lastState", + "baseName": "lastState", + "type": "V1ContainerState" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "ready", + "baseName": "ready", + "type": "boolean" + }, + { + "name": "restartCount", + "baseName": "restartCount", + "type": "number" + }, + { + "name": "started", + "baseName": "started", + "type": "boolean" + }, + { + "name": "state", + "baseName": "state", + "type": "V1ContainerState" + } +]; +//# sourceMappingURL=v1ContainerStatus.js.map + +/***/ }), + +/***/ 3630: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ControllerRevision = void 0; +/** +* ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers. +*/ +class V1ControllerRevision { + static getAttributeTypeMap() { + return V1ControllerRevision.attributeTypeMap; + } +} +exports.V1ControllerRevision = V1ControllerRevision; +V1ControllerRevision.discriminator = undefined; +V1ControllerRevision.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "data", + "baseName": "data", + "type": "object" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "revision", + "baseName": "revision", + "type": "number" + } +]; +//# sourceMappingURL=v1ControllerRevision.js.map + +/***/ }), + +/***/ 18510: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ControllerRevisionList = void 0; +/** +* ControllerRevisionList is a resource containing a list of ControllerRevision objects. +*/ +class V1ControllerRevisionList { + static getAttributeTypeMap() { + return V1ControllerRevisionList.attributeTypeMap; + } +} +exports.V1ControllerRevisionList = V1ControllerRevisionList; +V1ControllerRevisionList.discriminator = undefined; +V1ControllerRevisionList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ControllerRevisionList.js.map + +/***/ }), + +/***/ 24200: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CronJob = void 0; +/** +* CronJob represents the configuration of a single cron job. +*/ +class V1CronJob { + static getAttributeTypeMap() { + return V1CronJob.attributeTypeMap; + } +} +exports.V1CronJob = V1CronJob; +V1CronJob.discriminator = undefined; +V1CronJob.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1CronJobSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1CronJobStatus" + } +]; +//# sourceMappingURL=v1CronJob.js.map + +/***/ }), + +/***/ 60097: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CronJobList = void 0; +/** +* CronJobList is a collection of cron jobs. +*/ +class V1CronJobList { + static getAttributeTypeMap() { + return V1CronJobList.attributeTypeMap; + } +} +exports.V1CronJobList = V1CronJobList; +V1CronJobList.discriminator = undefined; +V1CronJobList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1CronJobList.js.map + +/***/ }), + +/***/ 91461: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CronJobSpec = void 0; +/** +* CronJobSpec describes how the job execution will look like and when it will actually run. +*/ +class V1CronJobSpec { + static getAttributeTypeMap() { + return V1CronJobSpec.attributeTypeMap; + } +} +exports.V1CronJobSpec = V1CronJobSpec; +V1CronJobSpec.discriminator = undefined; +V1CronJobSpec.attributeTypeMap = [ + { + "name": "concurrencyPolicy", + "baseName": "concurrencyPolicy", + "type": "string" + }, + { + "name": "failedJobsHistoryLimit", + "baseName": "failedJobsHistoryLimit", + "type": "number" + }, + { + "name": "jobTemplate", + "baseName": "jobTemplate", + "type": "V1JobTemplateSpec" + }, + { + "name": "schedule", + "baseName": "schedule", + "type": "string" + }, + { + "name": "startingDeadlineSeconds", + "baseName": "startingDeadlineSeconds", + "type": "number" + }, + { + "name": "successfulJobsHistoryLimit", + "baseName": "successfulJobsHistoryLimit", + "type": "number" + }, + { + "name": "suspend", + "baseName": "suspend", + "type": "boolean" + } +]; +//# sourceMappingURL=v1CronJobSpec.js.map + +/***/ }), + +/***/ 56476: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CronJobStatus = void 0; +/** +* CronJobStatus represents the current state of a cron job. +*/ +class V1CronJobStatus { + static getAttributeTypeMap() { + return V1CronJobStatus.attributeTypeMap; + } +} +exports.V1CronJobStatus = V1CronJobStatus; +V1CronJobStatus.discriminator = undefined; +V1CronJobStatus.attributeTypeMap = [ + { + "name": "active", + "baseName": "active", + "type": "Array" + }, + { + "name": "lastScheduleTime", + "baseName": "lastScheduleTime", + "type": "Date" + }, + { + "name": "lastSuccessfulTime", + "baseName": "lastSuccessfulTime", + "type": "Date" + } +]; +//# sourceMappingURL=v1CronJobStatus.js.map + +/***/ }), + +/***/ 82827: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CrossVersionObjectReference = void 0; +/** +* CrossVersionObjectReference contains enough information to let you identify the referred resource. +*/ +class V1CrossVersionObjectReference { + static getAttributeTypeMap() { + return V1CrossVersionObjectReference.attributeTypeMap; + } +} +exports.V1CrossVersionObjectReference = V1CrossVersionObjectReference; +V1CrossVersionObjectReference.discriminator = undefined; +V1CrossVersionObjectReference.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1CrossVersionObjectReference.js.map + +/***/ }), + +/***/ 46715: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceColumnDefinition = void 0; +/** +* CustomResourceColumnDefinition specifies a column for server side printing. +*/ +class V1CustomResourceColumnDefinition { + static getAttributeTypeMap() { + return V1CustomResourceColumnDefinition.attributeTypeMap; + } +} +exports.V1CustomResourceColumnDefinition = V1CustomResourceColumnDefinition; +V1CustomResourceColumnDefinition.discriminator = undefined; +V1CustomResourceColumnDefinition.attributeTypeMap = [ + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "format", + "baseName": "format", + "type": "string" + }, + { + "name": "jsonPath", + "baseName": "jsonPath", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1CustomResourceColumnDefinition.js.map + +/***/ }), + +/***/ 51707: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceConversion = void 0; +/** +* CustomResourceConversion describes how to convert different versions of a CR. +*/ +class V1CustomResourceConversion { + static getAttributeTypeMap() { + return V1CustomResourceConversion.attributeTypeMap; + } +} +exports.V1CustomResourceConversion = V1CustomResourceConversion; +V1CustomResourceConversion.discriminator = undefined; +V1CustomResourceConversion.attributeTypeMap = [ + { + "name": "strategy", + "baseName": "strategy", + "type": "string" + }, + { + "name": "webhook", + "baseName": "webhook", + "type": "V1WebhookConversion" + } +]; +//# sourceMappingURL=v1CustomResourceConversion.js.map + +/***/ }), + +/***/ 81081: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceDefinition = void 0; +/** +* CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. +*/ +class V1CustomResourceDefinition { + static getAttributeTypeMap() { + return V1CustomResourceDefinition.attributeTypeMap; + } +} +exports.V1CustomResourceDefinition = V1CustomResourceDefinition; +V1CustomResourceDefinition.discriminator = undefined; +V1CustomResourceDefinition.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1CustomResourceDefinitionSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1CustomResourceDefinitionStatus" + } +]; +//# sourceMappingURL=v1CustomResourceDefinition.js.map + +/***/ }), + +/***/ 26067: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceDefinitionCondition = void 0; +/** +* CustomResourceDefinitionCondition contains details for the current condition of this pod. +*/ +class V1CustomResourceDefinitionCondition { + static getAttributeTypeMap() { + return V1CustomResourceDefinitionCondition.attributeTypeMap; + } +} +exports.V1CustomResourceDefinitionCondition = V1CustomResourceDefinitionCondition; +V1CustomResourceDefinitionCondition.discriminator = undefined; +V1CustomResourceDefinitionCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1CustomResourceDefinitionCondition.js.map + +/***/ }), + +/***/ 83976: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceDefinitionList = void 0; +/** +* CustomResourceDefinitionList is a list of CustomResourceDefinition objects. +*/ +class V1CustomResourceDefinitionList { + static getAttributeTypeMap() { + return V1CustomResourceDefinitionList.attributeTypeMap; + } +} +exports.V1CustomResourceDefinitionList = V1CustomResourceDefinitionList; +V1CustomResourceDefinitionList.discriminator = undefined; +V1CustomResourceDefinitionList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1CustomResourceDefinitionList.js.map + +/***/ }), + +/***/ 9523: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceDefinitionNames = void 0; +/** +* CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition +*/ +class V1CustomResourceDefinitionNames { + static getAttributeTypeMap() { + return V1CustomResourceDefinitionNames.attributeTypeMap; + } +} +exports.V1CustomResourceDefinitionNames = V1CustomResourceDefinitionNames; +V1CustomResourceDefinitionNames.discriminator = undefined; +V1CustomResourceDefinitionNames.attributeTypeMap = [ + { + "name": "categories", + "baseName": "categories", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "listKind", + "baseName": "listKind", + "type": "string" + }, + { + "name": "plural", + "baseName": "plural", + "type": "string" + }, + { + "name": "shortNames", + "baseName": "shortNames", + "type": "Array" + }, + { + "name": "singular", + "baseName": "singular", + "type": "string" + } +]; +//# sourceMappingURL=v1CustomResourceDefinitionNames.js.map + +/***/ }), + +/***/ 57276: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceDefinitionSpec = void 0; +/** +* CustomResourceDefinitionSpec describes how a user wants their resource to appear +*/ +class V1CustomResourceDefinitionSpec { + static getAttributeTypeMap() { + return V1CustomResourceDefinitionSpec.attributeTypeMap; + } +} +exports.V1CustomResourceDefinitionSpec = V1CustomResourceDefinitionSpec; +V1CustomResourceDefinitionSpec.discriminator = undefined; +V1CustomResourceDefinitionSpec.attributeTypeMap = [ + { + "name": "conversion", + "baseName": "conversion", + "type": "V1CustomResourceConversion" + }, + { + "name": "group", + "baseName": "group", + "type": "string" + }, + { + "name": "names", + "baseName": "names", + "type": "V1CustomResourceDefinitionNames" + }, + { + "name": "preserveUnknownFields", + "baseName": "preserveUnknownFields", + "type": "boolean" + }, + { + "name": "scope", + "baseName": "scope", + "type": "string" + }, + { + "name": "versions", + "baseName": "versions", + "type": "Array" + } +]; +//# sourceMappingURL=v1CustomResourceDefinitionSpec.js.map + +/***/ }), + +/***/ 64124: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceDefinitionStatus = void 0; +/** +* CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition +*/ +class V1CustomResourceDefinitionStatus { + static getAttributeTypeMap() { + return V1CustomResourceDefinitionStatus.attributeTypeMap; + } +} +exports.V1CustomResourceDefinitionStatus = V1CustomResourceDefinitionStatus; +V1CustomResourceDefinitionStatus.discriminator = undefined; +V1CustomResourceDefinitionStatus.attributeTypeMap = [ + { + "name": "acceptedNames", + "baseName": "acceptedNames", + "type": "V1CustomResourceDefinitionNames" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "storedVersions", + "baseName": "storedVersions", + "type": "Array" + } +]; +//# sourceMappingURL=v1CustomResourceDefinitionStatus.js.map + +/***/ }), + +/***/ 67676: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceDefinitionVersion = void 0; +/** +* CustomResourceDefinitionVersion describes a version for CRD. +*/ +class V1CustomResourceDefinitionVersion { + static getAttributeTypeMap() { + return V1CustomResourceDefinitionVersion.attributeTypeMap; + } +} +exports.V1CustomResourceDefinitionVersion = V1CustomResourceDefinitionVersion; +V1CustomResourceDefinitionVersion.discriminator = undefined; +V1CustomResourceDefinitionVersion.attributeTypeMap = [ + { + "name": "additionalPrinterColumns", + "baseName": "additionalPrinterColumns", + "type": "Array" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean" + }, + { + "name": "deprecationWarning", + "baseName": "deprecationWarning", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "schema", + "baseName": "schema", + "type": "V1CustomResourceValidation" + }, + { + "name": "served", + "baseName": "served", + "type": "boolean" + }, + { + "name": "storage", + "baseName": "storage", + "type": "boolean" + }, + { + "name": "subresources", + "baseName": "subresources", + "type": "V1CustomResourceSubresources" + } +]; +//# sourceMappingURL=v1CustomResourceDefinitionVersion.js.map + +/***/ }), + +/***/ 71098: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceSubresourceScale = void 0; +/** +* CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. +*/ +class V1CustomResourceSubresourceScale { + static getAttributeTypeMap() { + return V1CustomResourceSubresourceScale.attributeTypeMap; + } +} +exports.V1CustomResourceSubresourceScale = V1CustomResourceSubresourceScale; +V1CustomResourceSubresourceScale.discriminator = undefined; +V1CustomResourceSubresourceScale.attributeTypeMap = [ + { + "name": "labelSelectorPath", + "baseName": "labelSelectorPath", + "type": "string" + }, + { + "name": "specReplicasPath", + "baseName": "specReplicasPath", + "type": "string" + }, + { + "name": "statusReplicasPath", + "baseName": "statusReplicasPath", + "type": "string" + } +]; +//# sourceMappingURL=v1CustomResourceSubresourceScale.js.map + +/***/ }), + +/***/ 58786: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceSubresources = void 0; +/** +* CustomResourceSubresources defines the status and scale subresources for CustomResources. +*/ +class V1CustomResourceSubresources { + static getAttributeTypeMap() { + return V1CustomResourceSubresources.attributeTypeMap; + } +} +exports.V1CustomResourceSubresources = V1CustomResourceSubresources; +V1CustomResourceSubresources.discriminator = undefined; +V1CustomResourceSubresources.attributeTypeMap = [ + { + "name": "scale", + "baseName": "scale", + "type": "V1CustomResourceSubresourceScale" + }, + { + "name": "status", + "baseName": "status", + "type": "object" + } +]; +//# sourceMappingURL=v1CustomResourceSubresources.js.map + +/***/ }), + +/***/ 12835: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1CustomResourceValidation = void 0; +/** +* CustomResourceValidation is a list of validation methods for CustomResources. +*/ +class V1CustomResourceValidation { + static getAttributeTypeMap() { + return V1CustomResourceValidation.attributeTypeMap; + } +} +exports.V1CustomResourceValidation = V1CustomResourceValidation; +V1CustomResourceValidation.discriminator = undefined; +V1CustomResourceValidation.attributeTypeMap = [ + { + "name": "openAPIV3Schema", + "baseName": "openAPIV3Schema", + "type": "V1JSONSchemaProps" + } +]; +//# sourceMappingURL=v1CustomResourceValidation.js.map + +/***/ }), + +/***/ 4281: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DaemonEndpoint = void 0; +/** +* DaemonEndpoint contains information about a single Daemon endpoint. +*/ +class V1DaemonEndpoint { + static getAttributeTypeMap() { + return V1DaemonEndpoint.attributeTypeMap; + } +} +exports.V1DaemonEndpoint = V1DaemonEndpoint; +V1DaemonEndpoint.discriminator = undefined; +V1DaemonEndpoint.attributeTypeMap = [ + { + "name": "Port", + "baseName": "Port", + "type": "number" + } +]; +//# sourceMappingURL=v1DaemonEndpoint.js.map + +/***/ }), + +/***/ 83315: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DaemonSet = void 0; +/** +* DaemonSet represents the configuration of a daemon set. +*/ +class V1DaemonSet { + static getAttributeTypeMap() { + return V1DaemonSet.attributeTypeMap; + } +} +exports.V1DaemonSet = V1DaemonSet; +V1DaemonSet.discriminator = undefined; +V1DaemonSet.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1DaemonSetSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1DaemonSetStatus" + } +]; +//# sourceMappingURL=v1DaemonSet.js.map + +/***/ }), + +/***/ 57744: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DaemonSetCondition = void 0; +/** +* DaemonSetCondition describes the state of a DaemonSet at a certain point. +*/ +class V1DaemonSetCondition { + static getAttributeTypeMap() { + return V1DaemonSetCondition.attributeTypeMap; + } +} +exports.V1DaemonSetCondition = V1DaemonSetCondition; +V1DaemonSetCondition.discriminator = undefined; +V1DaemonSetCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1DaemonSetCondition.js.map + +/***/ }), + +/***/ 74976: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DaemonSetList = void 0; +/** +* DaemonSetList is a collection of daemon sets. +*/ +class V1DaemonSetList { + static getAttributeTypeMap() { + return V1DaemonSetList.attributeTypeMap; + } +} +exports.V1DaemonSetList = V1DaemonSetList; +V1DaemonSetList.discriminator = undefined; +V1DaemonSetList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1DaemonSetList.js.map + +/***/ }), + +/***/ 56395: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DaemonSetSpec = void 0; +/** +* DaemonSetSpec is the specification of a daemon set. +*/ +class V1DaemonSetSpec { + static getAttributeTypeMap() { + return V1DaemonSetSpec.attributeTypeMap; + } +} +exports.V1DaemonSetSpec = V1DaemonSetSpec; +V1DaemonSetSpec.discriminator = undefined; +V1DaemonSetSpec.attributeTypeMap = [ + { + "name": "minReadySeconds", + "baseName": "minReadySeconds", + "type": "number" + }, + { + "name": "revisionHistoryLimit", + "baseName": "revisionHistoryLimit", + "type": "number" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + }, + { + "name": "template", + "baseName": "template", + "type": "V1PodTemplateSpec" + }, + { + "name": "updateStrategy", + "baseName": "updateStrategy", + "type": "V1DaemonSetUpdateStrategy" + } +]; +//# sourceMappingURL=v1DaemonSetSpec.js.map + +/***/ }), + +/***/ 40582: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DaemonSetStatus = void 0; +/** +* DaemonSetStatus represents the current status of a daemon set. +*/ +class V1DaemonSetStatus { + static getAttributeTypeMap() { + return V1DaemonSetStatus.attributeTypeMap; + } +} +exports.V1DaemonSetStatus = V1DaemonSetStatus; +V1DaemonSetStatus.discriminator = undefined; +V1DaemonSetStatus.attributeTypeMap = [ + { + "name": "collisionCount", + "baseName": "collisionCount", + "type": "number" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "currentNumberScheduled", + "baseName": "currentNumberScheduled", + "type": "number" + }, + { + "name": "desiredNumberScheduled", + "baseName": "desiredNumberScheduled", + "type": "number" + }, + { + "name": "numberAvailable", + "baseName": "numberAvailable", + "type": "number" + }, + { + "name": "numberMisscheduled", + "baseName": "numberMisscheduled", + "type": "number" + }, + { + "name": "numberReady", + "baseName": "numberReady", + "type": "number" + }, + { + "name": "numberUnavailable", + "baseName": "numberUnavailable", + "type": "number" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + }, + { + "name": "updatedNumberScheduled", + "baseName": "updatedNumberScheduled", + "type": "number" + } +]; +//# sourceMappingURL=v1DaemonSetStatus.js.map + +/***/ }), + +/***/ 2497: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DaemonSetUpdateStrategy = void 0; +/** +* DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. +*/ +class V1DaemonSetUpdateStrategy { + static getAttributeTypeMap() { + return V1DaemonSetUpdateStrategy.attributeTypeMap; + } +} +exports.V1DaemonSetUpdateStrategy = V1DaemonSetUpdateStrategy; +V1DaemonSetUpdateStrategy.discriminator = undefined; +V1DaemonSetUpdateStrategy.attributeTypeMap = [ + { + "name": "rollingUpdate", + "baseName": "rollingUpdate", + "type": "V1RollingUpdateDaemonSet" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1DaemonSetUpdateStrategy.js.map + +/***/ }), + +/***/ 85201: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DeleteOptions = void 0; +/** +* DeleteOptions may be provided when deleting an API object. +*/ +class V1DeleteOptions { + static getAttributeTypeMap() { + return V1DeleteOptions.attributeTypeMap; + } +} +exports.V1DeleteOptions = V1DeleteOptions; +V1DeleteOptions.discriminator = undefined; +V1DeleteOptions.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "dryRun", + "baseName": "dryRun", + "type": "Array" + }, + { + "name": "gracePeriodSeconds", + "baseName": "gracePeriodSeconds", + "type": "number" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "orphanDependents", + "baseName": "orphanDependents", + "type": "boolean" + }, + { + "name": "preconditions", + "baseName": "preconditions", + "type": "V1Preconditions" + }, + { + "name": "propagationPolicy", + "baseName": "propagationPolicy", + "type": "string" + } +]; +//# sourceMappingURL=v1DeleteOptions.js.map + +/***/ }), + +/***/ 20870: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Deployment = void 0; +/** +* Deployment enables declarative updates for Pods and ReplicaSets. +*/ +class V1Deployment { + static getAttributeTypeMap() { + return V1Deployment.attributeTypeMap; + } +} +exports.V1Deployment = V1Deployment; +V1Deployment.discriminator = undefined; +V1Deployment.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1DeploymentSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1DeploymentStatus" + } +]; +//# sourceMappingURL=v1Deployment.js.map + +/***/ }), + +/***/ 52085: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DeploymentCondition = void 0; +/** +* DeploymentCondition describes the state of a deployment at a certain point. +*/ +class V1DeploymentCondition { + static getAttributeTypeMap() { + return V1DeploymentCondition.attributeTypeMap; + } +} +exports.V1DeploymentCondition = V1DeploymentCondition; +V1DeploymentCondition.discriminator = undefined; +V1DeploymentCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "lastUpdateTime", + "baseName": "lastUpdateTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1DeploymentCondition.js.map + +/***/ }), + +/***/ 26954: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DeploymentList = void 0; +/** +* DeploymentList is a list of Deployments. +*/ +class V1DeploymentList { + static getAttributeTypeMap() { + return V1DeploymentList.attributeTypeMap; + } +} +exports.V1DeploymentList = V1DeploymentList; +V1DeploymentList.discriminator = undefined; +V1DeploymentList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1DeploymentList.js.map + +/***/ }), + +/***/ 21109: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DeploymentSpec = void 0; +/** +* DeploymentSpec is the specification of the desired behavior of the Deployment. +*/ +class V1DeploymentSpec { + static getAttributeTypeMap() { + return V1DeploymentSpec.attributeTypeMap; + } +} +exports.V1DeploymentSpec = V1DeploymentSpec; +V1DeploymentSpec.discriminator = undefined; +V1DeploymentSpec.attributeTypeMap = [ + { + "name": "minReadySeconds", + "baseName": "minReadySeconds", + "type": "number" + }, + { + "name": "paused", + "baseName": "paused", + "type": "boolean" + }, + { + "name": "progressDeadlineSeconds", + "baseName": "progressDeadlineSeconds", + "type": "number" + }, + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + }, + { + "name": "revisionHistoryLimit", + "baseName": "revisionHistoryLimit", + "type": "number" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + }, + { + "name": "strategy", + "baseName": "strategy", + "type": "V1DeploymentStrategy" + }, + { + "name": "template", + "baseName": "template", + "type": "V1PodTemplateSpec" + } +]; +//# sourceMappingURL=v1DeploymentSpec.js.map + +/***/ }), + +/***/ 14869: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DeploymentStatus = void 0; +/** +* DeploymentStatus is the most recently observed status of the Deployment. +*/ +class V1DeploymentStatus { + static getAttributeTypeMap() { + return V1DeploymentStatus.attributeTypeMap; + } +} +exports.V1DeploymentStatus = V1DeploymentStatus; +V1DeploymentStatus.discriminator = undefined; +V1DeploymentStatus.attributeTypeMap = [ + { + "name": "availableReplicas", + "baseName": "availableReplicas", + "type": "number" + }, + { + "name": "collisionCount", + "baseName": "collisionCount", + "type": "number" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + }, + { + "name": "readyReplicas", + "baseName": "readyReplicas", + "type": "number" + }, + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + }, + { + "name": "unavailableReplicas", + "baseName": "unavailableReplicas", + "type": "number" + }, + { + "name": "updatedReplicas", + "baseName": "updatedReplicas", + "type": "number" + } +]; +//# sourceMappingURL=v1DeploymentStatus.js.map + +/***/ }), + +/***/ 11692: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DeploymentStrategy = void 0; +/** +* DeploymentStrategy describes how to replace existing pods with new ones. +*/ +class V1DeploymentStrategy { + static getAttributeTypeMap() { + return V1DeploymentStrategy.attributeTypeMap; + } +} +exports.V1DeploymentStrategy = V1DeploymentStrategy; +V1DeploymentStrategy.discriminator = undefined; +V1DeploymentStrategy.attributeTypeMap = [ + { + "name": "rollingUpdate", + "baseName": "rollingUpdate", + "type": "V1RollingUpdateDeployment" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1DeploymentStrategy.js.map + +/***/ }), + +/***/ 65792: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DownwardAPIProjection = void 0; +/** +* Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode. +*/ +class V1DownwardAPIProjection { + static getAttributeTypeMap() { + return V1DownwardAPIProjection.attributeTypeMap; + } +} +exports.V1DownwardAPIProjection = V1DownwardAPIProjection; +V1DownwardAPIProjection.discriminator = undefined; +V1DownwardAPIProjection.attributeTypeMap = [ + { + "name": "items", + "baseName": "items", + "type": "Array" + } +]; +//# sourceMappingURL=v1DownwardAPIProjection.js.map + +/***/ }), + +/***/ 71598: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DownwardAPIVolumeFile = void 0; +/** +* DownwardAPIVolumeFile represents information to create the file containing the pod field +*/ +class V1DownwardAPIVolumeFile { + static getAttributeTypeMap() { + return V1DownwardAPIVolumeFile.attributeTypeMap; + } +} +exports.V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile; +V1DownwardAPIVolumeFile.discriminator = undefined; +V1DownwardAPIVolumeFile.attributeTypeMap = [ + { + "name": "fieldRef", + "baseName": "fieldRef", + "type": "V1ObjectFieldSelector" + }, + { + "name": "mode", + "baseName": "mode", + "type": "number" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "resourceFieldRef", + "baseName": "resourceFieldRef", + "type": "V1ResourceFieldSelector" + } +]; +//# sourceMappingURL=v1DownwardAPIVolumeFile.js.map + +/***/ }), + +/***/ 51638: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1DownwardAPIVolumeSource = void 0; +/** +* DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. +*/ +class V1DownwardAPIVolumeSource { + static getAttributeTypeMap() { + return V1DownwardAPIVolumeSource.attributeTypeMap; + } +} +exports.V1DownwardAPIVolumeSource = V1DownwardAPIVolumeSource; +V1DownwardAPIVolumeSource.discriminator = undefined; +V1DownwardAPIVolumeSource.attributeTypeMap = [ + { + "name": "defaultMode", + "baseName": "defaultMode", + "type": "number" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + } +]; +//# sourceMappingURL=v1DownwardAPIVolumeSource.js.map + +/***/ }), + +/***/ 6029: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EmptyDirVolumeSource = void 0; +/** +* Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling. +*/ +class V1EmptyDirVolumeSource { + static getAttributeTypeMap() { + return V1EmptyDirVolumeSource.attributeTypeMap; + } +} +exports.V1EmptyDirVolumeSource = V1EmptyDirVolumeSource; +V1EmptyDirVolumeSource.discriminator = undefined; +V1EmptyDirVolumeSource.attributeTypeMap = [ + { + "name": "medium", + "baseName": "medium", + "type": "string" + }, + { + "name": "sizeLimit", + "baseName": "sizeLimit", + "type": "string" + } +]; +//# sourceMappingURL=v1EmptyDirVolumeSource.js.map + +/***/ }), + +/***/ 12367: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Endpoint = void 0; +/** +* Endpoint represents a single logical \"backend\" implementing a service. +*/ +class V1Endpoint { + static getAttributeTypeMap() { + return V1Endpoint.attributeTypeMap; + } +} +exports.V1Endpoint = V1Endpoint; +V1Endpoint.discriminator = undefined; +V1Endpoint.attributeTypeMap = [ + { + "name": "addresses", + "baseName": "addresses", + "type": "Array" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "V1EndpointConditions" + }, + { + "name": "deprecatedTopology", + "baseName": "deprecatedTopology", + "type": "{ [key: string]: string; }" + }, + { + "name": "hints", + "baseName": "hints", + "type": "V1EndpointHints" + }, + { + "name": "hostname", + "baseName": "hostname", + "type": "string" + }, + { + "name": "nodeName", + "baseName": "nodeName", + "type": "string" + }, + { + "name": "targetRef", + "baseName": "targetRef", + "type": "V1ObjectReference" + }, + { + "name": "zone", + "baseName": "zone", + "type": "string" + } +]; +//# sourceMappingURL=v1Endpoint.js.map + +/***/ }), + +/***/ 41162: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EndpointAddress = void 0; +/** +* EndpointAddress is a tuple that describes single IP address. +*/ +class V1EndpointAddress { + static getAttributeTypeMap() { + return V1EndpointAddress.attributeTypeMap; + } +} +exports.V1EndpointAddress = V1EndpointAddress; +V1EndpointAddress.discriminator = undefined; +V1EndpointAddress.attributeTypeMap = [ + { + "name": "hostname", + "baseName": "hostname", + "type": "string" + }, + { + "name": "ip", + "baseName": "ip", + "type": "string" + }, + { + "name": "nodeName", + "baseName": "nodeName", + "type": "string" + }, + { + "name": "targetRef", + "baseName": "targetRef", + "type": "V1ObjectReference" + } +]; +//# sourceMappingURL=v1EndpointAddress.js.map + +/***/ }), + +/***/ 12242: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EndpointConditions = void 0; +/** +* EndpointConditions represents the current condition of an endpoint. +*/ +class V1EndpointConditions { + static getAttributeTypeMap() { + return V1EndpointConditions.attributeTypeMap; + } +} +exports.V1EndpointConditions = V1EndpointConditions; +V1EndpointConditions.discriminator = undefined; +V1EndpointConditions.attributeTypeMap = [ + { + "name": "ready", + "baseName": "ready", + "type": "boolean" + }, + { + "name": "serving", + "baseName": "serving", + "type": "boolean" + }, + { + "name": "terminating", + "baseName": "terminating", + "type": "boolean" + } +]; +//# sourceMappingURL=v1EndpointConditions.js.map + +/***/ }), + +/***/ 9685: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EndpointHints = void 0; +/** +* EndpointHints provides hints describing how an endpoint should be consumed. +*/ +class V1EndpointHints { + static getAttributeTypeMap() { + return V1EndpointHints.attributeTypeMap; + } +} +exports.V1EndpointHints = V1EndpointHints; +V1EndpointHints.discriminator = undefined; +V1EndpointHints.attributeTypeMap = [ + { + "name": "forZones", + "baseName": "forZones", + "type": "Array" + } +]; +//# sourceMappingURL=v1EndpointHints.js.map + +/***/ }), + +/***/ 20132: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EndpointSlice = void 0; +/** +* EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +*/ +class V1EndpointSlice { + static getAttributeTypeMap() { + return V1EndpointSlice.attributeTypeMap; + } +} +exports.V1EndpointSlice = V1EndpointSlice; +V1EndpointSlice.discriminator = undefined; +V1EndpointSlice.attributeTypeMap = [ + { + "name": "addressType", + "baseName": "addressType", + "type": "string" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "endpoints", + "baseName": "endpoints", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "ports", + "baseName": "ports", + "type": "Array" + } +]; +//# sourceMappingURL=v1EndpointSlice.js.map + +/***/ }), + +/***/ 17209: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EndpointSliceList = void 0; +/** +* EndpointSliceList represents a list of endpoint slices +*/ +class V1EndpointSliceList { + static getAttributeTypeMap() { + return V1EndpointSliceList.attributeTypeMap; + } +} +exports.V1EndpointSliceList = V1EndpointSliceList; +V1EndpointSliceList.discriminator = undefined; +V1EndpointSliceList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1EndpointSliceList.js.map + +/***/ }), + +/***/ 59152: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EndpointSubset = void 0; +/** +* EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given: { Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}], Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}] } The resulting set of endpoints can be viewed as: a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ] +*/ +class V1EndpointSubset { + static getAttributeTypeMap() { + return V1EndpointSubset.attributeTypeMap; + } +} +exports.V1EndpointSubset = V1EndpointSubset; +V1EndpointSubset.discriminator = undefined; +V1EndpointSubset.attributeTypeMap = [ + { + "name": "addresses", + "baseName": "addresses", + "type": "Array" + }, + { + "name": "notReadyAddresses", + "baseName": "notReadyAddresses", + "type": "Array" + }, + { + "name": "ports", + "baseName": "ports", + "type": "Array" + } +]; +//# sourceMappingURL=v1EndpointSubset.js.map + +/***/ }), + +/***/ 74041: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Endpoints = void 0; +/** +* Endpoints is a collection of endpoints that implement the actual service. Example: Name: \"mysvc\", Subsets: [ { Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}], Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}] }, { Addresses: [{\"ip\": \"10.10.3.3\"}], Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}] }, ] +*/ +class V1Endpoints { + static getAttributeTypeMap() { + return V1Endpoints.attributeTypeMap; + } +} +exports.V1Endpoints = V1Endpoints; +V1Endpoints.discriminator = undefined; +V1Endpoints.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "subsets", + "baseName": "subsets", + "type": "Array" + } +]; +//# sourceMappingURL=v1Endpoints.js.map + +/***/ }), + +/***/ 99674: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EndpointsList = void 0; +/** +* EndpointsList is a list of endpoints. +*/ +class V1EndpointsList { + static getAttributeTypeMap() { + return V1EndpointsList.attributeTypeMap; + } +} +exports.V1EndpointsList = V1EndpointsList; +V1EndpointsList.discriminator = undefined; +V1EndpointsList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1EndpointsList.js.map + +/***/ }), + +/***/ 7479: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EnvFromSource = void 0; +/** +* EnvFromSource represents the source of a set of ConfigMaps +*/ +class V1EnvFromSource { + static getAttributeTypeMap() { + return V1EnvFromSource.attributeTypeMap; + } +} +exports.V1EnvFromSource = V1EnvFromSource; +V1EnvFromSource.discriminator = undefined; +V1EnvFromSource.attributeTypeMap = [ + { + "name": "configMapRef", + "baseName": "configMapRef", + "type": "V1ConfigMapEnvSource" + }, + { + "name": "prefix", + "baseName": "prefix", + "type": "string" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1SecretEnvSource" + } +]; +//# sourceMappingURL=v1EnvFromSource.js.map + +/***/ }), + +/***/ 30588: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EnvVar = void 0; +/** +* EnvVar represents an environment variable present in a Container. +*/ +class V1EnvVar { + static getAttributeTypeMap() { + return V1EnvVar.attributeTypeMap; + } +} +exports.V1EnvVar = V1EnvVar; +V1EnvVar.discriminator = undefined; +V1EnvVar.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + }, + { + "name": "valueFrom", + "baseName": "valueFrom", + "type": "V1EnvVarSource" + } +]; +//# sourceMappingURL=v1EnvVar.js.map + +/***/ }), + +/***/ 46561: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EnvVarSource = void 0; +/** +* EnvVarSource represents a source for the value of an EnvVar. +*/ +class V1EnvVarSource { + static getAttributeTypeMap() { + return V1EnvVarSource.attributeTypeMap; + } +} +exports.V1EnvVarSource = V1EnvVarSource; +V1EnvVarSource.discriminator = undefined; +V1EnvVarSource.attributeTypeMap = [ + { + "name": "configMapKeyRef", + "baseName": "configMapKeyRef", + "type": "V1ConfigMapKeySelector" + }, + { + "name": "fieldRef", + "baseName": "fieldRef", + "type": "V1ObjectFieldSelector" + }, + { + "name": "resourceFieldRef", + "baseName": "resourceFieldRef", + "type": "V1ResourceFieldSelector" + }, + { + "name": "secretKeyRef", + "baseName": "secretKeyRef", + "type": "V1SecretKeySelector" + } +]; +//# sourceMappingURL=v1EnvVarSource.js.map + +/***/ }), + +/***/ 15566: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EphemeralContainer = void 0; +/** +* An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod\'s ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag. +*/ +class V1EphemeralContainer { + static getAttributeTypeMap() { + return V1EphemeralContainer.attributeTypeMap; + } +} +exports.V1EphemeralContainer = V1EphemeralContainer; +V1EphemeralContainer.discriminator = undefined; +V1EphemeralContainer.attributeTypeMap = [ + { + "name": "args", + "baseName": "args", + "type": "Array" + }, + { + "name": "command", + "baseName": "command", + "type": "Array" + }, + { + "name": "env", + "baseName": "env", + "type": "Array" + }, + { + "name": "envFrom", + "baseName": "envFrom", + "type": "Array" + }, + { + "name": "image", + "baseName": "image", + "type": "string" + }, + { + "name": "imagePullPolicy", + "baseName": "imagePullPolicy", + "type": "string" + }, + { + "name": "lifecycle", + "baseName": "lifecycle", + "type": "V1Lifecycle" + }, + { + "name": "livenessProbe", + "baseName": "livenessProbe", + "type": "V1Probe" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "ports", + "baseName": "ports", + "type": "Array" + }, + { + "name": "readinessProbe", + "baseName": "readinessProbe", + "type": "V1Probe" + }, + { + "name": "resources", + "baseName": "resources", + "type": "V1ResourceRequirements" + }, + { + "name": "securityContext", + "baseName": "securityContext", + "type": "V1SecurityContext" + }, + { + "name": "startupProbe", + "baseName": "startupProbe", + "type": "V1Probe" + }, + { + "name": "stdin", + "baseName": "stdin", + "type": "boolean" + }, + { + "name": "stdinOnce", + "baseName": "stdinOnce", + "type": "boolean" + }, + { + "name": "targetContainerName", + "baseName": "targetContainerName", + "type": "string" + }, + { + "name": "terminationMessagePath", + "baseName": "terminationMessagePath", + "type": "string" + }, + { + "name": "terminationMessagePolicy", + "baseName": "terminationMessagePolicy", + "type": "string" + }, + { + "name": "tty", + "baseName": "tty", + "type": "boolean" + }, + { + "name": "volumeDevices", + "baseName": "volumeDevices", + "type": "Array" + }, + { + "name": "volumeMounts", + "baseName": "volumeMounts", + "type": "Array" + }, + { + "name": "workingDir", + "baseName": "workingDir", + "type": "string" + } +]; +//# sourceMappingURL=v1EphemeralContainer.js.map + +/***/ }), + +/***/ 81805: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EphemeralContainers = void 0; +/** +* A list of ephemeral containers used with the Pod ephemeralcontainers subresource. +*/ +class V1EphemeralContainers { + static getAttributeTypeMap() { + return V1EphemeralContainers.attributeTypeMap; + } +} +exports.V1EphemeralContainers = V1EphemeralContainers; +V1EphemeralContainers.discriminator = undefined; +V1EphemeralContainers.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "ephemeralContainers", + "baseName": "ephemeralContainers", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + } +]; +//# sourceMappingURL=v1EphemeralContainers.js.map + +/***/ }), + +/***/ 97946: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EphemeralVolumeSource = void 0; +/** +* Represents an ephemeral volume that is handled by a normal storage driver. +*/ +class V1EphemeralVolumeSource { + static getAttributeTypeMap() { + return V1EphemeralVolumeSource.attributeTypeMap; + } +} +exports.V1EphemeralVolumeSource = V1EphemeralVolumeSource; +V1EphemeralVolumeSource.discriminator = undefined; +V1EphemeralVolumeSource.attributeTypeMap = [ + { + "name": "volumeClaimTemplate", + "baseName": "volumeClaimTemplate", + "type": "V1PersistentVolumeClaimTemplate" + } +]; +//# sourceMappingURL=v1EphemeralVolumeSource.js.map + +/***/ }), + +/***/ 56835: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1EventSource = void 0; +/** +* EventSource contains information for an event. +*/ +class V1EventSource { + static getAttributeTypeMap() { + return V1EventSource.attributeTypeMap; + } +} +exports.V1EventSource = V1EventSource; +V1EventSource.discriminator = undefined; +V1EventSource.attributeTypeMap = [ + { + "name": "component", + "baseName": "component", + "type": "string" + }, + { + "name": "host", + "baseName": "host", + "type": "string" + } +]; +//# sourceMappingURL=v1EventSource.js.map + +/***/ }), + +/***/ 91036: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ExecAction = void 0; +/** +* ExecAction describes a \"run in container\" action. +*/ +class V1ExecAction { + static getAttributeTypeMap() { + return V1ExecAction.attributeTypeMap; + } +} +exports.V1ExecAction = V1ExecAction; +V1ExecAction.discriminator = undefined; +V1ExecAction.attributeTypeMap = [ + { + "name": "command", + "baseName": "command", + "type": "Array" + } +]; +//# sourceMappingURL=v1ExecAction.js.map + +/***/ }), + +/***/ 9286: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ExternalDocumentation = void 0; +/** +* ExternalDocumentation allows referencing an external resource for extended documentation. +*/ +class V1ExternalDocumentation { + static getAttributeTypeMap() { + return V1ExternalDocumentation.attributeTypeMap; + } +} +exports.V1ExternalDocumentation = V1ExternalDocumentation; +V1ExternalDocumentation.discriminator = undefined; +V1ExternalDocumentation.attributeTypeMap = [ + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } +]; +//# sourceMappingURL=v1ExternalDocumentation.js.map + +/***/ }), + +/***/ 1948: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1FCVolumeSource = void 0; +/** +* Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling. +*/ +class V1FCVolumeSource { + static getAttributeTypeMap() { + return V1FCVolumeSource.attributeTypeMap; + } +} +exports.V1FCVolumeSource = V1FCVolumeSource; +V1FCVolumeSource.discriminator = undefined; +V1FCVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "lun", + "baseName": "lun", + "type": "number" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "targetWWNs", + "baseName": "targetWWNs", + "type": "Array" + }, + { + "name": "wwids", + "baseName": "wwids", + "type": "Array" + } +]; +//# sourceMappingURL=v1FCVolumeSource.js.map + +/***/ }), + +/***/ 94533: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1FlexPersistentVolumeSource = void 0; +/** +* FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin. +*/ +class V1FlexPersistentVolumeSource { + static getAttributeTypeMap() { + return V1FlexPersistentVolumeSource.attributeTypeMap; + } +} +exports.V1FlexPersistentVolumeSource = V1FlexPersistentVolumeSource; +V1FlexPersistentVolumeSource.discriminator = undefined; +V1FlexPersistentVolumeSource.attributeTypeMap = [ + { + "name": "driver", + "baseName": "driver", + "type": "string" + }, + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "options", + "baseName": "options", + "type": "{ [key: string]: string; }" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1SecretReference" + } +]; +//# sourceMappingURL=v1FlexPersistentVolumeSource.js.map + +/***/ }), + +/***/ 13240: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1FlexVolumeSource = void 0; +/** +* FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. +*/ +class V1FlexVolumeSource { + static getAttributeTypeMap() { + return V1FlexVolumeSource.attributeTypeMap; + } +} +exports.V1FlexVolumeSource = V1FlexVolumeSource; +V1FlexVolumeSource.discriminator = undefined; +V1FlexVolumeSource.attributeTypeMap = [ + { + "name": "driver", + "baseName": "driver", + "type": "string" + }, + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "options", + "baseName": "options", + "type": "{ [key: string]: string; }" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1LocalObjectReference" + } +]; +//# sourceMappingURL=v1FlexVolumeSource.js.map + +/***/ }), + +/***/ 85187: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1FlockerVolumeSource = void 0; +/** +* Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling. +*/ +class V1FlockerVolumeSource { + static getAttributeTypeMap() { + return V1FlockerVolumeSource.attributeTypeMap; + } +} +exports.V1FlockerVolumeSource = V1FlockerVolumeSource; +V1FlockerVolumeSource.discriminator = undefined; +V1FlockerVolumeSource.attributeTypeMap = [ + { + "name": "datasetName", + "baseName": "datasetName", + "type": "string" + }, + { + "name": "datasetUUID", + "baseName": "datasetUUID", + "type": "string" + } +]; +//# sourceMappingURL=v1FlockerVolumeSource.js.map + +/***/ }), + +/***/ 5371: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ForZone = void 0; +/** +* ForZone provides information about which zones should consume this endpoint. +*/ +class V1ForZone { + static getAttributeTypeMap() { + return V1ForZone.attributeTypeMap; + } +} +exports.V1ForZone = V1ForZone; +V1ForZone.discriminator = undefined; +V1ForZone.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1ForZone.js.map + +/***/ }), + +/***/ 37935: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1GCEPersistentDiskVolumeSource = void 0; +/** +* Represents a Persistent Disk resource in Google Compute Engine. A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling. +*/ +class V1GCEPersistentDiskVolumeSource { + static getAttributeTypeMap() { + return V1GCEPersistentDiskVolumeSource.attributeTypeMap; + } +} +exports.V1GCEPersistentDiskVolumeSource = V1GCEPersistentDiskVolumeSource; +V1GCEPersistentDiskVolumeSource.discriminator = undefined; +V1GCEPersistentDiskVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "partition", + "baseName": "partition", + "type": "number" + }, + { + "name": "pdName", + "baseName": "pdName", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + } +]; +//# sourceMappingURL=v1GCEPersistentDiskVolumeSource.js.map + +/***/ }), + +/***/ 13258: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1GitRepoVolumeSource = void 0; +/** +* Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod\'s container. +*/ +class V1GitRepoVolumeSource { + static getAttributeTypeMap() { + return V1GitRepoVolumeSource.attributeTypeMap; + } +} +exports.V1GitRepoVolumeSource = V1GitRepoVolumeSource; +V1GitRepoVolumeSource.discriminator = undefined; +V1GitRepoVolumeSource.attributeTypeMap = [ + { + "name": "directory", + "baseName": "directory", + "type": "string" + }, + { + "name": "repository", + "baseName": "repository", + "type": "string" + }, + { + "name": "revision", + "baseName": "revision", + "type": "string" + } +]; +//# sourceMappingURL=v1GitRepoVolumeSource.js.map + +/***/ }), + +/***/ 27204: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1GlusterfsPersistentVolumeSource = void 0; +/** +* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. +*/ +class V1GlusterfsPersistentVolumeSource { + static getAttributeTypeMap() { + return V1GlusterfsPersistentVolumeSource.attributeTypeMap; + } +} +exports.V1GlusterfsPersistentVolumeSource = V1GlusterfsPersistentVolumeSource; +V1GlusterfsPersistentVolumeSource.discriminator = undefined; +V1GlusterfsPersistentVolumeSource.attributeTypeMap = [ + { + "name": "endpoints", + "baseName": "endpoints", + "type": "string" + }, + { + "name": "endpointsNamespace", + "baseName": "endpointsNamespace", + "type": "string" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + } +]; +//# sourceMappingURL=v1GlusterfsPersistentVolumeSource.js.map + +/***/ }), + +/***/ 29195: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1GlusterfsVolumeSource = void 0; +/** +* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. +*/ +class V1GlusterfsVolumeSource { + static getAttributeTypeMap() { + return V1GlusterfsVolumeSource.attributeTypeMap; + } +} +exports.V1GlusterfsVolumeSource = V1GlusterfsVolumeSource; +V1GlusterfsVolumeSource.discriminator = undefined; +V1GlusterfsVolumeSource.attributeTypeMap = [ + { + "name": "endpoints", + "baseName": "endpoints", + "type": "string" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + } +]; +//# sourceMappingURL=v1GlusterfsVolumeSource.js.map + +/***/ }), + +/***/ 33402: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1GroupVersionForDiscovery = void 0; +/** +* GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility. +*/ +class V1GroupVersionForDiscovery { + static getAttributeTypeMap() { + return V1GroupVersionForDiscovery.attributeTypeMap; + } +} +exports.V1GroupVersionForDiscovery = V1GroupVersionForDiscovery; +V1GroupVersionForDiscovery.discriminator = undefined; +V1GroupVersionForDiscovery.attributeTypeMap = [ + { + "name": "groupVersion", + "baseName": "groupVersion", + "type": "string" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + } +]; +//# sourceMappingURL=v1GroupVersionForDiscovery.js.map + +/***/ }), + +/***/ 8136: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HTTPGetAction = void 0; +/** +* HTTPGetAction describes an action based on HTTP Get requests. +*/ +class V1HTTPGetAction { + static getAttributeTypeMap() { + return V1HTTPGetAction.attributeTypeMap; + } +} +exports.V1HTTPGetAction = V1HTTPGetAction; +V1HTTPGetAction.discriminator = undefined; +V1HTTPGetAction.attributeTypeMap = [ + { + "name": "host", + "baseName": "host", + "type": "string" + }, + { + "name": "httpHeaders", + "baseName": "httpHeaders", + "type": "Array" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "object" + }, + { + "name": "scheme", + "baseName": "scheme", + "type": "string" + } +]; +//# sourceMappingURL=v1HTTPGetAction.js.map + +/***/ }), + +/***/ 74293: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HTTPHeader = void 0; +/** +* HTTPHeader describes a custom header to be used in HTTP probes +*/ +class V1HTTPHeader { + static getAttributeTypeMap() { + return V1HTTPHeader.attributeTypeMap; + } +} +exports.V1HTTPHeader = V1HTTPHeader; +V1HTTPHeader.discriminator = undefined; +V1HTTPHeader.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } +]; +//# sourceMappingURL=v1HTTPHeader.js.map + +/***/ }), + +/***/ 56997: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HTTPIngressPath = void 0; +/** +* HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend. +*/ +class V1HTTPIngressPath { + static getAttributeTypeMap() { + return V1HTTPIngressPath.attributeTypeMap; + } +} +exports.V1HTTPIngressPath = V1HTTPIngressPath; +V1HTTPIngressPath.discriminator = undefined; +V1HTTPIngressPath.attributeTypeMap = [ + { + "name": "backend", + "baseName": "backend", + "type": "V1IngressBackend" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "pathType", + "baseName": "pathType", + "type": "string" + } +]; +//# sourceMappingURL=v1HTTPIngressPath.js.map + +/***/ }), + +/***/ 32171: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HTTPIngressRuleValue = void 0; +/** +* HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last \'/\' and before the first \'?\' or \'#\'. +*/ +class V1HTTPIngressRuleValue { + static getAttributeTypeMap() { + return V1HTTPIngressRuleValue.attributeTypeMap; + } +} +exports.V1HTTPIngressRuleValue = V1HTTPIngressRuleValue; +V1HTTPIngressRuleValue.discriminator = undefined; +V1HTTPIngressRuleValue.attributeTypeMap = [ + { + "name": "paths", + "baseName": "paths", + "type": "Array" + } +]; +//# sourceMappingURL=v1HTTPIngressRuleValue.js.map + +/***/ }), + +/***/ 36100: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Handler = void 0; +/** +* Handler defines a specific action that should be taken +*/ +class V1Handler { + static getAttributeTypeMap() { + return V1Handler.attributeTypeMap; + } +} +exports.V1Handler = V1Handler; +V1Handler.discriminator = undefined; +V1Handler.attributeTypeMap = [ + { + "name": "exec", + "baseName": "exec", + "type": "V1ExecAction" + }, + { + "name": "httpGet", + "baseName": "httpGet", + "type": "V1HTTPGetAction" + }, + { + "name": "tcpSocket", + "baseName": "tcpSocket", + "type": "V1TCPSocketAction" + } +]; +//# sourceMappingURL=v1Handler.js.map + +/***/ }), + +/***/ 6627: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HorizontalPodAutoscaler = void 0; +/** +* configuration of a horizontal pod autoscaler. +*/ +class V1HorizontalPodAutoscaler { + static getAttributeTypeMap() { + return V1HorizontalPodAutoscaler.attributeTypeMap; + } +} +exports.V1HorizontalPodAutoscaler = V1HorizontalPodAutoscaler; +V1HorizontalPodAutoscaler.discriminator = undefined; +V1HorizontalPodAutoscaler.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1HorizontalPodAutoscalerSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1HorizontalPodAutoscalerStatus" + } +]; +//# sourceMappingURL=v1HorizontalPodAutoscaler.js.map + +/***/ }), + +/***/ 99287: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HorizontalPodAutoscalerList = void 0; +/** +* list of horizontal pod autoscaler objects. +*/ +class V1HorizontalPodAutoscalerList { + static getAttributeTypeMap() { + return V1HorizontalPodAutoscalerList.attributeTypeMap; + } +} +exports.V1HorizontalPodAutoscalerList = V1HorizontalPodAutoscalerList; +V1HorizontalPodAutoscalerList.discriminator = undefined; +V1HorizontalPodAutoscalerList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1HorizontalPodAutoscalerList.js.map + +/***/ }), + +/***/ 27360: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HorizontalPodAutoscalerSpec = void 0; +/** +* specification of a horizontal pod autoscaler. +*/ +class V1HorizontalPodAutoscalerSpec { + static getAttributeTypeMap() { + return V1HorizontalPodAutoscalerSpec.attributeTypeMap; + } +} +exports.V1HorizontalPodAutoscalerSpec = V1HorizontalPodAutoscalerSpec; +V1HorizontalPodAutoscalerSpec.discriminator = undefined; +V1HorizontalPodAutoscalerSpec.attributeTypeMap = [ + { + "name": "maxReplicas", + "baseName": "maxReplicas", + "type": "number" + }, + { + "name": "minReplicas", + "baseName": "minReplicas", + "type": "number" + }, + { + "name": "scaleTargetRef", + "baseName": "scaleTargetRef", + "type": "V1CrossVersionObjectReference" + }, + { + "name": "targetCPUUtilizationPercentage", + "baseName": "targetCPUUtilizationPercentage", + "type": "number" + } +]; +//# sourceMappingURL=v1HorizontalPodAutoscalerSpec.js.map + +/***/ }), + +/***/ 79632: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HorizontalPodAutoscalerStatus = void 0; +/** +* current status of a horizontal pod autoscaler +*/ +class V1HorizontalPodAutoscalerStatus { + static getAttributeTypeMap() { + return V1HorizontalPodAutoscalerStatus.attributeTypeMap; + } +} +exports.V1HorizontalPodAutoscalerStatus = V1HorizontalPodAutoscalerStatus; +V1HorizontalPodAutoscalerStatus.discriminator = undefined; +V1HorizontalPodAutoscalerStatus.attributeTypeMap = [ + { + "name": "currentCPUUtilizationPercentage", + "baseName": "currentCPUUtilizationPercentage", + "type": "number" + }, + { + "name": "currentReplicas", + "baseName": "currentReplicas", + "type": "number" + }, + { + "name": "desiredReplicas", + "baseName": "desiredReplicas", + "type": "number" + }, + { + "name": "lastScaleTime", + "baseName": "lastScaleTime", + "type": "Date" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + } +]; +//# sourceMappingURL=v1HorizontalPodAutoscalerStatus.js.map + +/***/ }), + +/***/ 75163: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HostAlias = void 0; +/** +* HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod\'s hosts file. +*/ +class V1HostAlias { + static getAttributeTypeMap() { + return V1HostAlias.attributeTypeMap; + } +} +exports.V1HostAlias = V1HostAlias; +V1HostAlias.discriminator = undefined; +V1HostAlias.attributeTypeMap = [ + { + "name": "hostnames", + "baseName": "hostnames", + "type": "Array" + }, + { + "name": "ip", + "baseName": "ip", + "type": "string" + } +]; +//# sourceMappingURL=v1HostAlias.js.map + +/***/ }), + +/***/ 80954: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1HostPathVolumeSource = void 0; +/** +* Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling. +*/ +class V1HostPathVolumeSource { + static getAttributeTypeMap() { + return V1HostPathVolumeSource.attributeTypeMap; + } +} +exports.V1HostPathVolumeSource = V1HostPathVolumeSource; +V1HostPathVolumeSource.discriminator = undefined; +V1HostPathVolumeSource.attributeTypeMap = [ + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1HostPathVolumeSource.js.map + +/***/ }), + +/***/ 58489: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IPBlock = void 0; +/** +* IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec\'s podSelector. The except entry describes CIDRs that should not be included within this rule. +*/ +class V1IPBlock { + static getAttributeTypeMap() { + return V1IPBlock.attributeTypeMap; + } +} +exports.V1IPBlock = V1IPBlock; +V1IPBlock.discriminator = undefined; +V1IPBlock.attributeTypeMap = [ + { + "name": "cidr", + "baseName": "cidr", + "type": "string" + }, + { + "name": "except", + "baseName": "except", + "type": "Array" + } +]; +//# sourceMappingURL=v1IPBlock.js.map + +/***/ }), + +/***/ 34368: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ISCSIPersistentVolumeSource = void 0; +/** +* ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. +*/ +class V1ISCSIPersistentVolumeSource { + static getAttributeTypeMap() { + return V1ISCSIPersistentVolumeSource.attributeTypeMap; + } +} +exports.V1ISCSIPersistentVolumeSource = V1ISCSIPersistentVolumeSource; +V1ISCSIPersistentVolumeSource.discriminator = undefined; +V1ISCSIPersistentVolumeSource.attributeTypeMap = [ + { + "name": "chapAuthDiscovery", + "baseName": "chapAuthDiscovery", + "type": "boolean" + }, + { + "name": "chapAuthSession", + "baseName": "chapAuthSession", + "type": "boolean" + }, + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "initiatorName", + "baseName": "initiatorName", + "type": "string" + }, + { + "name": "iqn", + "baseName": "iqn", + "type": "string" + }, + { + "name": "iscsiInterface", + "baseName": "iscsiInterface", + "type": "string" + }, + { + "name": "lun", + "baseName": "lun", + "type": "number" + }, + { + "name": "portals", + "baseName": "portals", + "type": "Array" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1SecretReference" + }, + { + "name": "targetPortal", + "baseName": "targetPortal", + "type": "string" + } +]; +//# sourceMappingURL=v1ISCSIPersistentVolumeSource.js.map + +/***/ }), + +/***/ 63617: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ISCSIVolumeSource = void 0; +/** +* Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. +*/ +class V1ISCSIVolumeSource { + static getAttributeTypeMap() { + return V1ISCSIVolumeSource.attributeTypeMap; + } +} +exports.V1ISCSIVolumeSource = V1ISCSIVolumeSource; +V1ISCSIVolumeSource.discriminator = undefined; +V1ISCSIVolumeSource.attributeTypeMap = [ + { + "name": "chapAuthDiscovery", + "baseName": "chapAuthDiscovery", + "type": "boolean" + }, + { + "name": "chapAuthSession", + "baseName": "chapAuthSession", + "type": "boolean" + }, + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "initiatorName", + "baseName": "initiatorName", + "type": "string" + }, + { + "name": "iqn", + "baseName": "iqn", + "type": "string" + }, + { + "name": "iscsiInterface", + "baseName": "iscsiInterface", + "type": "string" + }, + { + "name": "lun", + "baseName": "lun", + "type": "number" + }, + { + "name": "portals", + "baseName": "portals", + "type": "Array" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1LocalObjectReference" + }, + { + "name": "targetPortal", + "baseName": "targetPortal", + "type": "string" + } +]; +//# sourceMappingURL=v1ISCSIVolumeSource.js.map + +/***/ }), + +/***/ 29713: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Ingress = void 0; +/** +* Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. +*/ +class V1Ingress { + static getAttributeTypeMap() { + return V1Ingress.attributeTypeMap; + } +} +exports.V1Ingress = V1Ingress; +V1Ingress.discriminator = undefined; +V1Ingress.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1IngressSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1IngressStatus" + } +]; +//# sourceMappingURL=v1Ingress.js.map + +/***/ }), + +/***/ 10482: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressBackend = void 0; +/** +* IngressBackend describes all endpoints for a given service and port. +*/ +class V1IngressBackend { + static getAttributeTypeMap() { + return V1IngressBackend.attributeTypeMap; + } +} +exports.V1IngressBackend = V1IngressBackend; +V1IngressBackend.discriminator = undefined; +V1IngressBackend.attributeTypeMap = [ + { + "name": "resource", + "baseName": "resource", + "type": "V1TypedLocalObjectReference" + }, + { + "name": "service", + "baseName": "service", + "type": "V1IngressServiceBackend" + } +]; +//# sourceMappingURL=v1IngressBackend.js.map + +/***/ }), + +/***/ 60988: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressClass = void 0; +/** +* IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class. +*/ +class V1IngressClass { + static getAttributeTypeMap() { + return V1IngressClass.attributeTypeMap; + } +} +exports.V1IngressClass = V1IngressClass; +V1IngressClass.discriminator = undefined; +V1IngressClass.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1IngressClassSpec" + } +]; +//# sourceMappingURL=v1IngressClass.js.map + +/***/ }), + +/***/ 15413: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressClassList = void 0; +/** +* IngressClassList is a collection of IngressClasses. +*/ +class V1IngressClassList { + static getAttributeTypeMap() { + return V1IngressClassList.attributeTypeMap; + } +} +exports.V1IngressClassList = V1IngressClassList; +V1IngressClassList.discriminator = undefined; +V1IngressClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1IngressClassList.js.map + +/***/ }), + +/***/ 57566: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressClassParametersReference = void 0; +/** +* IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. +*/ +class V1IngressClassParametersReference { + static getAttributeTypeMap() { + return V1IngressClassParametersReference.attributeTypeMap; + } +} +exports.V1IngressClassParametersReference = V1IngressClassParametersReference; +V1IngressClassParametersReference.discriminator = undefined; +V1IngressClassParametersReference.attributeTypeMap = [ + { + "name": "apiGroup", + "baseName": "apiGroup", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "scope", + "baseName": "scope", + "type": "string" + } +]; +//# sourceMappingURL=v1IngressClassParametersReference.js.map + +/***/ }), + +/***/ 6164: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressClassSpec = void 0; +/** +* IngressClassSpec provides information about the class of an Ingress. +*/ +class V1IngressClassSpec { + static getAttributeTypeMap() { + return V1IngressClassSpec.attributeTypeMap; + } +} +exports.V1IngressClassSpec = V1IngressClassSpec; +V1IngressClassSpec.discriminator = undefined; +V1IngressClassSpec.attributeTypeMap = [ + { + "name": "controller", + "baseName": "controller", + "type": "string" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "V1IngressClassParametersReference" + } +]; +//# sourceMappingURL=v1IngressClassSpec.js.map + +/***/ }), + +/***/ 85661: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressList = void 0; +/** +* IngressList is a collection of Ingress. +*/ +class V1IngressList { + static getAttributeTypeMap() { + return V1IngressList.attributeTypeMap; + } +} +exports.V1IngressList = V1IngressList; +V1IngressList.discriminator = undefined; +V1IngressList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1IngressList.js.map + +/***/ }), + +/***/ 45343: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressRule = void 0; +/** +* IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue. +*/ +class V1IngressRule { + static getAttributeTypeMap() { + return V1IngressRule.attributeTypeMap; + } +} +exports.V1IngressRule = V1IngressRule; +V1IngressRule.discriminator = undefined; +V1IngressRule.attributeTypeMap = [ + { + "name": "host", + "baseName": "host", + "type": "string" + }, + { + "name": "http", + "baseName": "http", + "type": "V1HTTPIngressRuleValue" + } +]; +//# sourceMappingURL=v1IngressRule.js.map + +/***/ }), + +/***/ 62512: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressServiceBackend = void 0; +/** +* IngressServiceBackend references a Kubernetes Service as a Backend. +*/ +class V1IngressServiceBackend { + static getAttributeTypeMap() { + return V1IngressServiceBackend.attributeTypeMap; + } +} +exports.V1IngressServiceBackend = V1IngressServiceBackend; +V1IngressServiceBackend.discriminator = undefined; +V1IngressServiceBackend.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "V1ServiceBackendPort" + } +]; +//# sourceMappingURL=v1IngressServiceBackend.js.map + +/***/ }), + +/***/ 11689: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressSpec = void 0; +/** +* IngressSpec describes the Ingress the user wishes to exist. +*/ +class V1IngressSpec { + static getAttributeTypeMap() { + return V1IngressSpec.attributeTypeMap; + } +} +exports.V1IngressSpec = V1IngressSpec; +V1IngressSpec.discriminator = undefined; +V1IngressSpec.attributeTypeMap = [ + { + "name": "defaultBackend", + "baseName": "defaultBackend", + "type": "V1IngressBackend" + }, + { + "name": "ingressClassName", + "baseName": "ingressClassName", + "type": "string" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + }, + { + "name": "tls", + "baseName": "tls", + "type": "Array" + } +]; +//# sourceMappingURL=v1IngressSpec.js.map + +/***/ }), + +/***/ 10166: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressStatus = void 0; +/** +* IngressStatus describe the current state of the Ingress. +*/ +class V1IngressStatus { + static getAttributeTypeMap() { + return V1IngressStatus.attributeTypeMap; + } +} +exports.V1IngressStatus = V1IngressStatus; +V1IngressStatus.discriminator = undefined; +V1IngressStatus.attributeTypeMap = [ + { + "name": "loadBalancer", + "baseName": "loadBalancer", + "type": "V1LoadBalancerStatus" + } +]; +//# sourceMappingURL=v1IngressStatus.js.map + +/***/ }), + +/***/ 45879: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1IngressTLS = void 0; +/** +* IngressTLS describes the transport layer security associated with an Ingress. +*/ +class V1IngressTLS { + static getAttributeTypeMap() { + return V1IngressTLS.attributeTypeMap; + } +} +exports.V1IngressTLS = V1IngressTLS; +V1IngressTLS.discriminator = undefined; +V1IngressTLS.attributeTypeMap = [ + { + "name": "hosts", + "baseName": "hosts", + "type": "Array" + }, + { + "name": "secretName", + "baseName": "secretName", + "type": "string" + } +]; +//# sourceMappingURL=v1IngressTLS.js.map + +/***/ }), + +/***/ 31273: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1JSONSchemaProps = void 0; +/** +* JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). +*/ +class V1JSONSchemaProps { + static getAttributeTypeMap() { + return V1JSONSchemaProps.attributeTypeMap; + } +} +exports.V1JSONSchemaProps = V1JSONSchemaProps; +V1JSONSchemaProps.discriminator = undefined; +V1JSONSchemaProps.attributeTypeMap = [ + { + "name": "$ref", + "baseName": "$ref", + "type": "string" + }, + { + "name": "$schema", + "baseName": "$schema", + "type": "string" + }, + { + "name": "additionalItems", + "baseName": "additionalItems", + "type": "object" + }, + { + "name": "additionalProperties", + "baseName": "additionalProperties", + "type": "object" + }, + { + "name": "allOf", + "baseName": "allOf", + "type": "Array" + }, + { + "name": "anyOf", + "baseName": "anyOf", + "type": "Array" + }, + { + "name": "_default", + "baseName": "default", + "type": "object" + }, + { + "name": "definitions", + "baseName": "definitions", + "type": "{ [key: string]: V1JSONSchemaProps; }" + }, + { + "name": "dependencies", + "baseName": "dependencies", + "type": "{ [key: string]: object; }" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "_enum", + "baseName": "enum", + "type": "Array" + }, + { + "name": "example", + "baseName": "example", + "type": "object" + }, + { + "name": "exclusiveMaximum", + "baseName": "exclusiveMaximum", + "type": "boolean" + }, + { + "name": "exclusiveMinimum", + "baseName": "exclusiveMinimum", + "type": "boolean" + }, + { + "name": "externalDocs", + "baseName": "externalDocs", + "type": "V1ExternalDocumentation" + }, + { + "name": "format", + "baseName": "format", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "object" + }, + { + "name": "maxItems", + "baseName": "maxItems", + "type": "number" + }, + { + "name": "maxLength", + "baseName": "maxLength", + "type": "number" + }, + { + "name": "maxProperties", + "baseName": "maxProperties", + "type": "number" + }, + { + "name": "maximum", + "baseName": "maximum", + "type": "number" + }, + { + "name": "minItems", + "baseName": "minItems", + "type": "number" + }, + { + "name": "minLength", + "baseName": "minLength", + "type": "number" + }, + { + "name": "minProperties", + "baseName": "minProperties", + "type": "number" + }, + { + "name": "minimum", + "baseName": "minimum", + "type": "number" + }, + { + "name": "multipleOf", + "baseName": "multipleOf", + "type": "number" + }, + { + "name": "not", + "baseName": "not", + "type": "V1JSONSchemaProps" + }, + { + "name": "nullable", + "baseName": "nullable", + "type": "boolean" + }, + { + "name": "oneOf", + "baseName": "oneOf", + "type": "Array" + }, + { + "name": "pattern", + "baseName": "pattern", + "type": "string" + }, + { + "name": "patternProperties", + "baseName": "patternProperties", + "type": "{ [key: string]: V1JSONSchemaProps; }" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: V1JSONSchemaProps; }" + }, + { + "name": "required", + "baseName": "required", + "type": "Array" + }, + { + "name": "title", + "baseName": "title", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "uniqueItems", + "baseName": "uniqueItems", + "type": "boolean" + }, + { + "name": "x_kubernetes_embedded_resource", + "baseName": "x-kubernetes-embedded-resource", + "type": "boolean" + }, + { + "name": "x_kubernetes_int_or_string", + "baseName": "x-kubernetes-int-or-string", + "type": "boolean" + }, + { + "name": "x_kubernetes_list_map_keys", + "baseName": "x-kubernetes-list-map-keys", + "type": "Array" + }, + { + "name": "x_kubernetes_list_type", + "baseName": "x-kubernetes-list-type", + "type": "string" + }, + { + "name": "x_kubernetes_map_type", + "baseName": "x-kubernetes-map-type", + "type": "string" + }, + { + "name": "x_kubernetes_preserve_unknown_fields", + "baseName": "x-kubernetes-preserve-unknown-fields", + "type": "boolean" + } +]; +//# sourceMappingURL=v1JSONSchemaProps.js.map + +/***/ }), + +/***/ 68438: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Job = void 0; +/** +* Job represents the configuration of a single job. +*/ +class V1Job { + static getAttributeTypeMap() { + return V1Job.attributeTypeMap; + } +} +exports.V1Job = V1Job; +V1Job.discriminator = undefined; +V1Job.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1JobSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1JobStatus" + } +]; +//# sourceMappingURL=v1Job.js.map + +/***/ }), + +/***/ 3560: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1JobCondition = void 0; +/** +* JobCondition describes current state of a job. +*/ +class V1JobCondition { + static getAttributeTypeMap() { + return V1JobCondition.attributeTypeMap; + } +} +exports.V1JobCondition = V1JobCondition; +V1JobCondition.discriminator = undefined; +V1JobCondition.attributeTypeMap = [ + { + "name": "lastProbeTime", + "baseName": "lastProbeTime", + "type": "Date" + }, + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1JobCondition.js.map + +/***/ }), + +/***/ 33526: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1JobList = void 0; +/** +* JobList is a collection of jobs. +*/ +class V1JobList { + static getAttributeTypeMap() { + return V1JobList.attributeTypeMap; + } +} +exports.V1JobList = V1JobList; +V1JobList.discriminator = undefined; +V1JobList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1JobList.js.map + +/***/ }), + +/***/ 4215: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1JobSpec = void 0; +/** +* JobSpec describes how the job execution will look like. +*/ +class V1JobSpec { + static getAttributeTypeMap() { + return V1JobSpec.attributeTypeMap; + } +} +exports.V1JobSpec = V1JobSpec; +V1JobSpec.discriminator = undefined; +V1JobSpec.attributeTypeMap = [ + { + "name": "activeDeadlineSeconds", + "baseName": "activeDeadlineSeconds", + "type": "number" + }, + { + "name": "backoffLimit", + "baseName": "backoffLimit", + "type": "number" + }, + { + "name": "completionMode", + "baseName": "completionMode", + "type": "string" + }, + { + "name": "completions", + "baseName": "completions", + "type": "number" + }, + { + "name": "manualSelector", + "baseName": "manualSelector", + "type": "boolean" + }, + { + "name": "parallelism", + "baseName": "parallelism", + "type": "number" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + }, + { + "name": "suspend", + "baseName": "suspend", + "type": "boolean" + }, + { + "name": "template", + "baseName": "template", + "type": "V1PodTemplateSpec" + }, + { + "name": "ttlSecondsAfterFinished", + "baseName": "ttlSecondsAfterFinished", + "type": "number" + } +]; +//# sourceMappingURL=v1JobSpec.js.map + +/***/ }), + +/***/ 47734: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1JobStatus = void 0; +/** +* JobStatus represents the current state of a Job. +*/ +class V1JobStatus { + static getAttributeTypeMap() { + return V1JobStatus.attributeTypeMap; + } +} +exports.V1JobStatus = V1JobStatus; +V1JobStatus.discriminator = undefined; +V1JobStatus.attributeTypeMap = [ + { + "name": "active", + "baseName": "active", + "type": "number" + }, + { + "name": "completedIndexes", + "baseName": "completedIndexes", + "type": "string" + }, + { + "name": "completionTime", + "baseName": "completionTime", + "type": "Date" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "failed", + "baseName": "failed", + "type": "number" + }, + { + "name": "startTime", + "baseName": "startTime", + "type": "Date" + }, + { + "name": "succeeded", + "baseName": "succeeded", + "type": "number" + } +]; +//# sourceMappingURL=v1JobStatus.js.map + +/***/ }), + +/***/ 93145: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1JobTemplateSpec = void 0; +/** +* JobTemplateSpec describes the data a Job should have when created from a template +*/ +class V1JobTemplateSpec { + static getAttributeTypeMap() { + return V1JobTemplateSpec.attributeTypeMap; + } +} +exports.V1JobTemplateSpec = V1JobTemplateSpec; +V1JobTemplateSpec.discriminator = undefined; +V1JobTemplateSpec.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1JobSpec" + } +]; +//# sourceMappingURL=v1JobTemplateSpec.js.map + +/***/ }), + +/***/ 85472: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1KeyToPath = void 0; +/** +* Maps a string key to a path within a volume. +*/ +class V1KeyToPath { + static getAttributeTypeMap() { + return V1KeyToPath.attributeTypeMap; + } +} +exports.V1KeyToPath = V1KeyToPath; +V1KeyToPath.discriminator = undefined; +V1KeyToPath.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "mode", + "baseName": "mode", + "type": "number" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + } +]; +//# sourceMappingURL=v1KeyToPath.js.map + +/***/ }), + +/***/ 50890: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LabelSelector = void 0; +/** +* A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. +*/ +class V1LabelSelector { + static getAttributeTypeMap() { + return V1LabelSelector.attributeTypeMap; + } +} +exports.V1LabelSelector = V1LabelSelector; +V1LabelSelector.discriminator = undefined; +V1LabelSelector.attributeTypeMap = [ + { + "name": "matchExpressions", + "baseName": "matchExpressions", + "type": "Array" + }, + { + "name": "matchLabels", + "baseName": "matchLabels", + "type": "{ [key: string]: string; }" + } +]; +//# sourceMappingURL=v1LabelSelector.js.map + +/***/ }), + +/***/ 52777: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LabelSelectorRequirement = void 0; +/** +* A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +*/ +class V1LabelSelectorRequirement { + static getAttributeTypeMap() { + return V1LabelSelectorRequirement.attributeTypeMap; + } +} +exports.V1LabelSelectorRequirement = V1LabelSelectorRequirement; +V1LabelSelectorRequirement.discriminator = undefined; +V1LabelSelectorRequirement.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string" + }, + { + "name": "values", + "baseName": "values", + "type": "Array" + } +]; +//# sourceMappingURL=v1LabelSelectorRequirement.js.map + +/***/ }), + +/***/ 19024: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Lease = void 0; +/** +* Lease defines a lease concept. +*/ +class V1Lease { + static getAttributeTypeMap() { + return V1Lease.attributeTypeMap; + } +} +exports.V1Lease = V1Lease; +V1Lease.discriminator = undefined; +V1Lease.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1LeaseSpec" + } +]; +//# sourceMappingURL=v1Lease.js.map + +/***/ }), + +/***/ 14624: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LeaseList = void 0; +/** +* LeaseList is a list of Lease objects. +*/ +class V1LeaseList { + static getAttributeTypeMap() { + return V1LeaseList.attributeTypeMap; + } +} +exports.V1LeaseList = V1LeaseList; +V1LeaseList.discriminator = undefined; +V1LeaseList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1LeaseList.js.map + +/***/ }), + +/***/ 20788: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LeaseSpec = void 0; +/** +* LeaseSpec is a specification of a Lease. +*/ +class V1LeaseSpec { + static getAttributeTypeMap() { + return V1LeaseSpec.attributeTypeMap; + } +} +exports.V1LeaseSpec = V1LeaseSpec; +V1LeaseSpec.discriminator = undefined; +V1LeaseSpec.attributeTypeMap = [ + { + "name": "acquireTime", + "baseName": "acquireTime", + "type": "Date" + }, + { + "name": "holderIdentity", + "baseName": "holderIdentity", + "type": "string" + }, + { + "name": "leaseDurationSeconds", + "baseName": "leaseDurationSeconds", + "type": "number" + }, + { + "name": "leaseTransitions", + "baseName": "leaseTransitions", + "type": "number" + }, + { + "name": "renewTime", + "baseName": "renewTime", + "type": "Date" + } +]; +//# sourceMappingURL=v1LeaseSpec.js.map + +/***/ }), + +/***/ 97160: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Lifecycle = void 0; +/** +* Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted. +*/ +class V1Lifecycle { + static getAttributeTypeMap() { + return V1Lifecycle.attributeTypeMap; + } +} +exports.V1Lifecycle = V1Lifecycle; +V1Lifecycle.discriminator = undefined; +V1Lifecycle.attributeTypeMap = [ + { + "name": "postStart", + "baseName": "postStart", + "type": "V1Handler" + }, + { + "name": "preStop", + "baseName": "preStop", + "type": "V1Handler" + } +]; +//# sourceMappingURL=v1Lifecycle.js.map + +/***/ }), + +/***/ 7415: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LimitRange = void 0; +/** +* LimitRange sets resource usage limits for each kind of resource in a Namespace. +*/ +class V1LimitRange { + static getAttributeTypeMap() { + return V1LimitRange.attributeTypeMap; + } +} +exports.V1LimitRange = V1LimitRange; +V1LimitRange.discriminator = undefined; +V1LimitRange.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1LimitRangeSpec" + } +]; +//# sourceMappingURL=v1LimitRange.js.map + +/***/ }), + +/***/ 84434: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LimitRangeItem = void 0; +/** +* LimitRangeItem defines a min/max usage limit for any resource that matches on kind. +*/ +class V1LimitRangeItem { + static getAttributeTypeMap() { + return V1LimitRangeItem.attributeTypeMap; + } +} +exports.V1LimitRangeItem = V1LimitRangeItem; +V1LimitRangeItem.discriminator = undefined; +V1LimitRangeItem.attributeTypeMap = [ + { + "name": "_default", + "baseName": "default", + "type": "{ [key: string]: string; }" + }, + { + "name": "defaultRequest", + "baseName": "defaultRequest", + "type": "{ [key: string]: string; }" + }, + { + "name": "max", + "baseName": "max", + "type": "{ [key: string]: string; }" + }, + { + "name": "maxLimitRequestRatio", + "baseName": "maxLimitRequestRatio", + "type": "{ [key: string]: string; }" + }, + { + "name": "min", + "baseName": "min", + "type": "{ [key: string]: string; }" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1LimitRangeItem.js.map + +/***/ }), + +/***/ 17410: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LimitRangeList = void 0; +/** +* LimitRangeList is a list of LimitRange items. +*/ +class V1LimitRangeList { + static getAttributeTypeMap() { + return V1LimitRangeList.attributeTypeMap; + } +} +exports.V1LimitRangeList = V1LimitRangeList; +V1LimitRangeList.discriminator = undefined; +V1LimitRangeList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1LimitRangeList.js.map + +/***/ }), + +/***/ 95723: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LimitRangeSpec = void 0; +/** +* LimitRangeSpec defines a min/max usage limit for resources that match on kind. +*/ +class V1LimitRangeSpec { + static getAttributeTypeMap() { + return V1LimitRangeSpec.attributeTypeMap; + } +} +exports.V1LimitRangeSpec = V1LimitRangeSpec; +V1LimitRangeSpec.discriminator = undefined; +V1LimitRangeSpec.attributeTypeMap = [ + { + "name": "limits", + "baseName": "limits", + "type": "Array" + } +]; +//# sourceMappingURL=v1LimitRangeSpec.js.map + +/***/ }), + +/***/ 17931: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ListMeta = void 0; +/** +* ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. +*/ +class V1ListMeta { + static getAttributeTypeMap() { + return V1ListMeta.attributeTypeMap; + } +} +exports.V1ListMeta = V1ListMeta; +V1ListMeta.discriminator = undefined; +V1ListMeta.attributeTypeMap = [ + { + "name": "_continue", + "baseName": "continue", + "type": "string" + }, + { + "name": "remainingItemCount", + "baseName": "remainingItemCount", + "type": "number" + }, + { + "name": "resourceVersion", + "baseName": "resourceVersion", + "type": "string" + }, + { + "name": "selfLink", + "baseName": "selfLink", + "type": "string" + } +]; +//# sourceMappingURL=v1ListMeta.js.map + +/***/ }), + +/***/ 48129: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LoadBalancerIngress = void 0; +/** +* LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point. +*/ +class V1LoadBalancerIngress { + static getAttributeTypeMap() { + return V1LoadBalancerIngress.attributeTypeMap; + } +} +exports.V1LoadBalancerIngress = V1LoadBalancerIngress; +V1LoadBalancerIngress.discriminator = undefined; +V1LoadBalancerIngress.attributeTypeMap = [ + { + "name": "hostname", + "baseName": "hostname", + "type": "string" + }, + { + "name": "ip", + "baseName": "ip", + "type": "string" + }, + { + "name": "ports", + "baseName": "ports", + "type": "Array" + } +]; +//# sourceMappingURL=v1LoadBalancerIngress.js.map + +/***/ }), + +/***/ 30727: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LoadBalancerStatus = void 0; +/** +* LoadBalancerStatus represents the status of a load-balancer. +*/ +class V1LoadBalancerStatus { + static getAttributeTypeMap() { + return V1LoadBalancerStatus.attributeTypeMap; + } +} +exports.V1LoadBalancerStatus = V1LoadBalancerStatus; +V1LoadBalancerStatus.discriminator = undefined; +V1LoadBalancerStatus.attributeTypeMap = [ + { + "name": "ingress", + "baseName": "ingress", + "type": "Array" + } +]; +//# sourceMappingURL=v1LoadBalancerStatus.js.map + +/***/ }), + +/***/ 14378: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LocalObjectReference = void 0; +/** +* LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. +*/ +class V1LocalObjectReference { + static getAttributeTypeMap() { + return V1LocalObjectReference.attributeTypeMap; + } +} +exports.V1LocalObjectReference = V1LocalObjectReference; +V1LocalObjectReference.discriminator = undefined; +V1LocalObjectReference.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1LocalObjectReference.js.map + +/***/ }), + +/***/ 11795: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LocalSubjectAccessReview = void 0; +/** +* LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking. +*/ +class V1LocalSubjectAccessReview { + static getAttributeTypeMap() { + return V1LocalSubjectAccessReview.attributeTypeMap; + } +} +exports.V1LocalSubjectAccessReview = V1LocalSubjectAccessReview; +V1LocalSubjectAccessReview.discriminator = undefined; +V1LocalSubjectAccessReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1SubjectAccessReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1SubjectAccessReviewStatus" + } +]; +//# sourceMappingURL=v1LocalSubjectAccessReview.js.map + +/***/ }), + +/***/ 35221: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1LocalVolumeSource = void 0; +/** +* Local represents directly-attached storage with node affinity (Beta feature) +*/ +class V1LocalVolumeSource { + static getAttributeTypeMap() { + return V1LocalVolumeSource.attributeTypeMap; + } +} +exports.V1LocalVolumeSource = V1LocalVolumeSource; +V1LocalVolumeSource.discriminator = undefined; +V1LocalVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + } +]; +//# sourceMappingURL=v1LocalVolumeSource.js.map + +/***/ }), + +/***/ 46389: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ManagedFieldsEntry = void 0; +/** +* ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. +*/ +class V1ManagedFieldsEntry { + static getAttributeTypeMap() { + return V1ManagedFieldsEntry.attributeTypeMap; + } +} +exports.V1ManagedFieldsEntry = V1ManagedFieldsEntry; +V1ManagedFieldsEntry.discriminator = undefined; +V1ManagedFieldsEntry.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "fieldsType", + "baseName": "fieldsType", + "type": "string" + }, + { + "name": "fieldsV1", + "baseName": "fieldsV1", + "type": "object" + }, + { + "name": "manager", + "baseName": "manager", + "type": "string" + }, + { + "name": "operation", + "baseName": "operation", + "type": "string" + }, + { + "name": "time", + "baseName": "time", + "type": "Date" + } +]; +//# sourceMappingURL=v1ManagedFieldsEntry.js.map + +/***/ }), + +/***/ 70547: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1MutatingWebhook = void 0; +/** +* MutatingWebhook describes an admission webhook and the resources and operations it applies to. +*/ +class V1MutatingWebhook { + static getAttributeTypeMap() { + return V1MutatingWebhook.attributeTypeMap; + } +} +exports.V1MutatingWebhook = V1MutatingWebhook; +V1MutatingWebhook.discriminator = undefined; +V1MutatingWebhook.attributeTypeMap = [ + { + "name": "admissionReviewVersions", + "baseName": "admissionReviewVersions", + "type": "Array" + }, + { + "name": "clientConfig", + "baseName": "clientConfig", + "type": "AdmissionregistrationV1WebhookClientConfig" + }, + { + "name": "failurePolicy", + "baseName": "failurePolicy", + "type": "string" + }, + { + "name": "matchPolicy", + "baseName": "matchPolicy", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespaceSelector", + "baseName": "namespaceSelector", + "type": "V1LabelSelector" + }, + { + "name": "objectSelector", + "baseName": "objectSelector", + "type": "V1LabelSelector" + }, + { + "name": "reinvocationPolicy", + "baseName": "reinvocationPolicy", + "type": "string" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + }, + { + "name": "sideEffects", + "baseName": "sideEffects", + "type": "string" + }, + { + "name": "timeoutSeconds", + "baseName": "timeoutSeconds", + "type": "number" + } +]; +//# sourceMappingURL=v1MutatingWebhook.js.map + +/***/ }), + +/***/ 19955: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1MutatingWebhookConfiguration = void 0; +/** +* MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. +*/ +class V1MutatingWebhookConfiguration { + static getAttributeTypeMap() { + return V1MutatingWebhookConfiguration.attributeTypeMap; + } +} +exports.V1MutatingWebhookConfiguration = V1MutatingWebhookConfiguration; +V1MutatingWebhookConfiguration.discriminator = undefined; +V1MutatingWebhookConfiguration.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array" + } +]; +//# sourceMappingURL=v1MutatingWebhookConfiguration.js.map + +/***/ }), + +/***/ 16773: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1MutatingWebhookConfigurationList = void 0; +/** +* MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. +*/ +class V1MutatingWebhookConfigurationList { + static getAttributeTypeMap() { + return V1MutatingWebhookConfigurationList.attributeTypeMap; + } +} +exports.V1MutatingWebhookConfigurationList = V1MutatingWebhookConfigurationList; +V1MutatingWebhookConfigurationList.discriminator = undefined; +V1MutatingWebhookConfigurationList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1MutatingWebhookConfigurationList.js.map + +/***/ }), + +/***/ 3721: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NFSVolumeSource = void 0; +/** +* Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling. +*/ +class V1NFSVolumeSource { + static getAttributeTypeMap() { + return V1NFSVolumeSource.attributeTypeMap; + } +} +exports.V1NFSVolumeSource = V1NFSVolumeSource; +V1NFSVolumeSource.discriminator = undefined; +V1NFSVolumeSource.attributeTypeMap = [ + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "server", + "baseName": "server", + "type": "string" + } +]; +//# sourceMappingURL=v1NFSVolumeSource.js.map + +/***/ }), + +/***/ 80450: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Namespace = void 0; +/** +* Namespace provides a scope for Names. Use of multiple namespaces is optional. +*/ +class V1Namespace { + static getAttributeTypeMap() { + return V1Namespace.attributeTypeMap; + } +} +exports.V1Namespace = V1Namespace; +V1Namespace.discriminator = undefined; +V1Namespace.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1NamespaceSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1NamespaceStatus" + } +]; +//# sourceMappingURL=v1Namespace.js.map + +/***/ }), + +/***/ 50793: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NamespaceCondition = void 0; +/** +* NamespaceCondition contains details about state of namespace. +*/ +class V1NamespaceCondition { + static getAttributeTypeMap() { + return V1NamespaceCondition.attributeTypeMap; + } +} +exports.V1NamespaceCondition = V1NamespaceCondition; +V1NamespaceCondition.discriminator = undefined; +V1NamespaceCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1NamespaceCondition.js.map + +/***/ }), + +/***/ 2006: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NamespaceList = void 0; +/** +* NamespaceList is a list of Namespaces. +*/ +class V1NamespaceList { + static getAttributeTypeMap() { + return V1NamespaceList.attributeTypeMap; + } +} +exports.V1NamespaceList = V1NamespaceList; +V1NamespaceList.discriminator = undefined; +V1NamespaceList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1NamespaceList.js.map + +/***/ }), + +/***/ 42698: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NamespaceSpec = void 0; +/** +* NamespaceSpec describes the attributes on a Namespace. +*/ +class V1NamespaceSpec { + static getAttributeTypeMap() { + return V1NamespaceSpec.attributeTypeMap; + } +} +exports.V1NamespaceSpec = V1NamespaceSpec; +V1NamespaceSpec.discriminator = undefined; +V1NamespaceSpec.attributeTypeMap = [ + { + "name": "finalizers", + "baseName": "finalizers", + "type": "Array" + } +]; +//# sourceMappingURL=v1NamespaceSpec.js.map + +/***/ }), + +/***/ 78986: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NamespaceStatus = void 0; +/** +* NamespaceStatus is information about the current status of a Namespace. +*/ +class V1NamespaceStatus { + static getAttributeTypeMap() { + return V1NamespaceStatus.attributeTypeMap; + } +} +exports.V1NamespaceStatus = V1NamespaceStatus; +V1NamespaceStatus.discriminator = undefined; +V1NamespaceStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "phase", + "baseName": "phase", + "type": "string" + } +]; +//# sourceMappingURL=v1NamespaceStatus.js.map + +/***/ }), + +/***/ 10228: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NetworkPolicy = void 0; +/** +* NetworkPolicy describes what network traffic is allowed for a set of Pods +*/ +class V1NetworkPolicy { + static getAttributeTypeMap() { + return V1NetworkPolicy.attributeTypeMap; + } +} +exports.V1NetworkPolicy = V1NetworkPolicy; +V1NetworkPolicy.discriminator = undefined; +V1NetworkPolicy.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1NetworkPolicySpec" + } +]; +//# sourceMappingURL=v1NetworkPolicy.js.map + +/***/ }), + +/***/ 62397: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NetworkPolicyEgressRule = void 0; +/** +* NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec\'s podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 +*/ +class V1NetworkPolicyEgressRule { + static getAttributeTypeMap() { + return V1NetworkPolicyEgressRule.attributeTypeMap; + } +} +exports.V1NetworkPolicyEgressRule = V1NetworkPolicyEgressRule; +V1NetworkPolicyEgressRule.discriminator = undefined; +V1NetworkPolicyEgressRule.attributeTypeMap = [ + { + "name": "ports", + "baseName": "ports", + "type": "Array" + }, + { + "name": "to", + "baseName": "to", + "type": "Array" + } +]; +//# sourceMappingURL=v1NetworkPolicyEgressRule.js.map + +/***/ }), + +/***/ 90583: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NetworkPolicyIngressRule = void 0; +/** +* NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec\'s podSelector. The traffic must match both ports and from. +*/ +class V1NetworkPolicyIngressRule { + static getAttributeTypeMap() { + return V1NetworkPolicyIngressRule.attributeTypeMap; + } +} +exports.V1NetworkPolicyIngressRule = V1NetworkPolicyIngressRule; +V1NetworkPolicyIngressRule.discriminator = undefined; +V1NetworkPolicyIngressRule.attributeTypeMap = [ + { + "name": "from", + "baseName": "from", + "type": "Array" + }, + { + "name": "ports", + "baseName": "ports", + "type": "Array" + } +]; +//# sourceMappingURL=v1NetworkPolicyIngressRule.js.map + +/***/ }), + +/***/ 62002: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NetworkPolicyList = void 0; +/** +* NetworkPolicyList is a list of NetworkPolicy objects. +*/ +class V1NetworkPolicyList { + static getAttributeTypeMap() { + return V1NetworkPolicyList.attributeTypeMap; + } +} +exports.V1NetworkPolicyList = V1NetworkPolicyList; +V1NetworkPolicyList.discriminator = undefined; +V1NetworkPolicyList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1NetworkPolicyList.js.map + +/***/ }), + +/***/ 87917: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NetworkPolicyPeer = void 0; +/** +* NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed +*/ +class V1NetworkPolicyPeer { + static getAttributeTypeMap() { + return V1NetworkPolicyPeer.attributeTypeMap; + } +} +exports.V1NetworkPolicyPeer = V1NetworkPolicyPeer; +V1NetworkPolicyPeer.discriminator = undefined; +V1NetworkPolicyPeer.attributeTypeMap = [ + { + "name": "ipBlock", + "baseName": "ipBlock", + "type": "V1IPBlock" + }, + { + "name": "namespaceSelector", + "baseName": "namespaceSelector", + "type": "V1LabelSelector" + }, + { + "name": "podSelector", + "baseName": "podSelector", + "type": "V1LabelSelector" + } +]; +//# sourceMappingURL=v1NetworkPolicyPeer.js.map + +/***/ }), + +/***/ 93437: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NetworkPolicyPort = void 0; +/** +* NetworkPolicyPort describes a port to allow traffic on +*/ +class V1NetworkPolicyPort { + static getAttributeTypeMap() { + return V1NetworkPolicyPort.attributeTypeMap; + } +} +exports.V1NetworkPolicyPort = V1NetworkPolicyPort; +V1NetworkPolicyPort.discriminator = undefined; +V1NetworkPolicyPort.attributeTypeMap = [ + { + "name": "endPort", + "baseName": "endPort", + "type": "number" + }, + { + "name": "port", + "baseName": "port", + "type": "object" + }, + { + "name": "protocol", + "baseName": "protocol", + "type": "string" + } +]; +//# sourceMappingURL=v1NetworkPolicyPort.js.map + +/***/ }), + +/***/ 6948: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NetworkPolicySpec = void 0; +/** +* NetworkPolicySpec provides the specification of a NetworkPolicy +*/ +class V1NetworkPolicySpec { + static getAttributeTypeMap() { + return V1NetworkPolicySpec.attributeTypeMap; + } +} +exports.V1NetworkPolicySpec = V1NetworkPolicySpec; +V1NetworkPolicySpec.discriminator = undefined; +V1NetworkPolicySpec.attributeTypeMap = [ + { + "name": "egress", + "baseName": "egress", + "type": "Array" + }, + { + "name": "ingress", + "baseName": "ingress", + "type": "Array" + }, + { + "name": "podSelector", + "baseName": "podSelector", + "type": "V1LabelSelector" + }, + { + "name": "policyTypes", + "baseName": "policyTypes", + "type": "Array" + } +]; +//# sourceMappingURL=v1NetworkPolicySpec.js.map + +/***/ }), + +/***/ 85839: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Node = void 0; +/** +* Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd). +*/ +class V1Node { + static getAttributeTypeMap() { + return V1Node.attributeTypeMap; + } +} +exports.V1Node = V1Node; +V1Node.discriminator = undefined; +V1Node.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1NodeSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1NodeStatus" + } +]; +//# sourceMappingURL=v1Node.js.map + +/***/ }), + +/***/ 45709: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeAddress = void 0; +/** +* NodeAddress contains information for the node\'s address. +*/ +class V1NodeAddress { + static getAttributeTypeMap() { + return V1NodeAddress.attributeTypeMap; + } +} +exports.V1NodeAddress = V1NodeAddress; +V1NodeAddress.discriminator = undefined; +V1NodeAddress.attributeTypeMap = [ + { + "name": "address", + "baseName": "address", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1NodeAddress.js.map + +/***/ }), + +/***/ 78540: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeAffinity = void 0; +/** +* Node affinity is a group of node affinity scheduling rules. +*/ +class V1NodeAffinity { + static getAttributeTypeMap() { + return V1NodeAffinity.attributeTypeMap; + } +} +exports.V1NodeAffinity = V1NodeAffinity; +V1NodeAffinity.discriminator = undefined; +V1NodeAffinity.attributeTypeMap = [ + { + "name": "preferredDuringSchedulingIgnoredDuringExecution", + "baseName": "preferredDuringSchedulingIgnoredDuringExecution", + "type": "Array" + }, + { + "name": "requiredDuringSchedulingIgnoredDuringExecution", + "baseName": "requiredDuringSchedulingIgnoredDuringExecution", + "type": "V1NodeSelector" + } +]; +//# sourceMappingURL=v1NodeAffinity.js.map + +/***/ }), + +/***/ 66628: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeCondition = void 0; +/** +* NodeCondition contains condition information for a node. +*/ +class V1NodeCondition { + static getAttributeTypeMap() { + return V1NodeCondition.attributeTypeMap; + } +} +exports.V1NodeCondition = V1NodeCondition; +V1NodeCondition.discriminator = undefined; +V1NodeCondition.attributeTypeMap = [ + { + "name": "lastHeartbeatTime", + "baseName": "lastHeartbeatTime", + "type": "Date" + }, + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1NodeCondition.js.map + +/***/ }), + +/***/ 5282: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeConfigSource = void 0; +/** +* NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. +*/ +class V1NodeConfigSource { + static getAttributeTypeMap() { + return V1NodeConfigSource.attributeTypeMap; + } +} +exports.V1NodeConfigSource = V1NodeConfigSource; +V1NodeConfigSource.discriminator = undefined; +V1NodeConfigSource.attributeTypeMap = [ + { + "name": "configMap", + "baseName": "configMap", + "type": "V1ConfigMapNodeConfigSource" + } +]; +//# sourceMappingURL=v1NodeConfigSource.js.map + +/***/ }), + +/***/ 63150: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeConfigStatus = void 0; +/** +* NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. +*/ +class V1NodeConfigStatus { + static getAttributeTypeMap() { + return V1NodeConfigStatus.attributeTypeMap; + } +} +exports.V1NodeConfigStatus = V1NodeConfigStatus; +V1NodeConfigStatus.discriminator = undefined; +V1NodeConfigStatus.attributeTypeMap = [ + { + "name": "active", + "baseName": "active", + "type": "V1NodeConfigSource" + }, + { + "name": "assigned", + "baseName": "assigned", + "type": "V1NodeConfigSource" + }, + { + "name": "error", + "baseName": "error", + "type": "string" + }, + { + "name": "lastKnownGood", + "baseName": "lastKnownGood", + "type": "V1NodeConfigSource" + } +]; +//# sourceMappingURL=v1NodeConfigStatus.js.map + +/***/ }), + +/***/ 72907: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeDaemonEndpoints = void 0; +/** +* NodeDaemonEndpoints lists ports opened by daemons running on the Node. +*/ +class V1NodeDaemonEndpoints { + static getAttributeTypeMap() { + return V1NodeDaemonEndpoints.attributeTypeMap; + } +} +exports.V1NodeDaemonEndpoints = V1NodeDaemonEndpoints; +V1NodeDaemonEndpoints.discriminator = undefined; +V1NodeDaemonEndpoints.attributeTypeMap = [ + { + "name": "kubeletEndpoint", + "baseName": "kubeletEndpoint", + "type": "V1DaemonEndpoint" + } +]; +//# sourceMappingURL=v1NodeDaemonEndpoints.js.map + +/***/ }), + +/***/ 36339: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeList = void 0; +/** +* NodeList is the whole list of all Nodes which have been registered with master. +*/ +class V1NodeList { + static getAttributeTypeMap() { + return V1NodeList.attributeTypeMap; + } +} +exports.V1NodeList = V1NodeList; +V1NodeList.discriminator = undefined; +V1NodeList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1NodeList.js.map + +/***/ }), + +/***/ 99044: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeSelector = void 0; +/** +* A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms. +*/ +class V1NodeSelector { + static getAttributeTypeMap() { + return V1NodeSelector.attributeTypeMap; + } +} +exports.V1NodeSelector = V1NodeSelector; +V1NodeSelector.discriminator = undefined; +V1NodeSelector.attributeTypeMap = [ + { + "name": "nodeSelectorTerms", + "baseName": "nodeSelectorTerms", + "type": "Array" + } +]; +//# sourceMappingURL=v1NodeSelector.js.map + +/***/ }), + +/***/ 77600: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeSelectorRequirement = void 0; +/** +* A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +*/ +class V1NodeSelectorRequirement { + static getAttributeTypeMap() { + return V1NodeSelectorRequirement.attributeTypeMap; + } +} +exports.V1NodeSelectorRequirement = V1NodeSelectorRequirement; +V1NodeSelectorRequirement.discriminator = undefined; +V1NodeSelectorRequirement.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string" + }, + { + "name": "values", + "baseName": "values", + "type": "Array" + } +]; +//# sourceMappingURL=v1NodeSelectorRequirement.js.map + +/***/ }), + +/***/ 62333: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeSelectorTerm = void 0; +/** +* A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. +*/ +class V1NodeSelectorTerm { + static getAttributeTypeMap() { + return V1NodeSelectorTerm.attributeTypeMap; + } +} +exports.V1NodeSelectorTerm = V1NodeSelectorTerm; +V1NodeSelectorTerm.discriminator = undefined; +V1NodeSelectorTerm.attributeTypeMap = [ + { + "name": "matchExpressions", + "baseName": "matchExpressions", + "type": "Array" + }, + { + "name": "matchFields", + "baseName": "matchFields", + "type": "Array" + } +]; +//# sourceMappingURL=v1NodeSelectorTerm.js.map + +/***/ }), + +/***/ 89874: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeSpec = void 0; +/** +* NodeSpec describes the attributes that a node is created with. +*/ +class V1NodeSpec { + static getAttributeTypeMap() { + return V1NodeSpec.attributeTypeMap; + } +} +exports.V1NodeSpec = V1NodeSpec; +V1NodeSpec.discriminator = undefined; +V1NodeSpec.attributeTypeMap = [ + { + "name": "configSource", + "baseName": "configSource", + "type": "V1NodeConfigSource" + }, + { + "name": "externalID", + "baseName": "externalID", + "type": "string" + }, + { + "name": "podCIDR", + "baseName": "podCIDR", + "type": "string" + }, + { + "name": "podCIDRs", + "baseName": "podCIDRs", + "type": "Array" + }, + { + "name": "providerID", + "baseName": "providerID", + "type": "string" + }, + { + "name": "taints", + "baseName": "taints", + "type": "Array" + }, + { + "name": "unschedulable", + "baseName": "unschedulable", + "type": "boolean" + } +]; +//# sourceMappingURL=v1NodeSpec.js.map + +/***/ }), + +/***/ 9526: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeStatus = void 0; +/** +* NodeStatus is information about the current status of a node. +*/ +class V1NodeStatus { + static getAttributeTypeMap() { + return V1NodeStatus.attributeTypeMap; + } +} +exports.V1NodeStatus = V1NodeStatus; +V1NodeStatus.discriminator = undefined; +V1NodeStatus.attributeTypeMap = [ + { + "name": "addresses", + "baseName": "addresses", + "type": "Array" + }, + { + "name": "allocatable", + "baseName": "allocatable", + "type": "{ [key: string]: string; }" + }, + { + "name": "capacity", + "baseName": "capacity", + "type": "{ [key: string]: string; }" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "config", + "baseName": "config", + "type": "V1NodeConfigStatus" + }, + { + "name": "daemonEndpoints", + "baseName": "daemonEndpoints", + "type": "V1NodeDaemonEndpoints" + }, + { + "name": "images", + "baseName": "images", + "type": "Array" + }, + { + "name": "nodeInfo", + "baseName": "nodeInfo", + "type": "V1NodeSystemInfo" + }, + { + "name": "phase", + "baseName": "phase", + "type": "string" + }, + { + "name": "volumesAttached", + "baseName": "volumesAttached", + "type": "Array" + }, + { + "name": "volumesInUse", + "baseName": "volumesInUse", + "type": "Array" + } +]; +//# sourceMappingURL=v1NodeStatus.js.map + +/***/ }), + +/***/ 32724: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NodeSystemInfo = void 0; +/** +* NodeSystemInfo is a set of ids/uuids to uniquely identify the node. +*/ +class V1NodeSystemInfo { + static getAttributeTypeMap() { + return V1NodeSystemInfo.attributeTypeMap; + } +} +exports.V1NodeSystemInfo = V1NodeSystemInfo; +V1NodeSystemInfo.discriminator = undefined; +V1NodeSystemInfo.attributeTypeMap = [ + { + "name": "architecture", + "baseName": "architecture", + "type": "string" + }, + { + "name": "bootID", + "baseName": "bootID", + "type": "string" + }, + { + "name": "containerRuntimeVersion", + "baseName": "containerRuntimeVersion", + "type": "string" + }, + { + "name": "kernelVersion", + "baseName": "kernelVersion", + "type": "string" + }, + { + "name": "kubeProxyVersion", + "baseName": "kubeProxyVersion", + "type": "string" + }, + { + "name": "kubeletVersion", + "baseName": "kubeletVersion", + "type": "string" + }, + { + "name": "machineID", + "baseName": "machineID", + "type": "string" + }, + { + "name": "operatingSystem", + "baseName": "operatingSystem", + "type": "string" + }, + { + "name": "osImage", + "baseName": "osImage", + "type": "string" + }, + { + "name": "systemUUID", + "baseName": "systemUUID", + "type": "string" + } +]; +//# sourceMappingURL=v1NodeSystemInfo.js.map + +/***/ }), + +/***/ 8878: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NonResourceAttributes = void 0; +/** +* NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface +*/ +class V1NonResourceAttributes { + static getAttributeTypeMap() { + return V1NonResourceAttributes.attributeTypeMap; + } +} +exports.V1NonResourceAttributes = V1NonResourceAttributes; +V1NonResourceAttributes.discriminator = undefined; +V1NonResourceAttributes.attributeTypeMap = [ + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "verb", + "baseName": "verb", + "type": "string" + } +]; +//# sourceMappingURL=v1NonResourceAttributes.js.map + +/***/ }), + +/***/ 44081: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1NonResourceRule = void 0; +/** +* NonResourceRule holds information that describes a rule for the non-resource +*/ +class V1NonResourceRule { + static getAttributeTypeMap() { + return V1NonResourceRule.attributeTypeMap; + } +} +exports.V1NonResourceRule = V1NonResourceRule; +V1NonResourceRule.discriminator = undefined; +V1NonResourceRule.attributeTypeMap = [ + { + "name": "nonResourceURLs", + "baseName": "nonResourceURLs", + "type": "Array" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + } +]; +//# sourceMappingURL=v1NonResourceRule.js.map + +/***/ }), + +/***/ 52150: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ObjectFieldSelector = void 0; +/** +* ObjectFieldSelector selects an APIVersioned field of an object. +*/ +class V1ObjectFieldSelector { + static getAttributeTypeMap() { + return V1ObjectFieldSelector.attributeTypeMap; + } +} +exports.V1ObjectFieldSelector = V1ObjectFieldSelector; +V1ObjectFieldSelector.discriminator = undefined; +V1ObjectFieldSelector.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "fieldPath", + "baseName": "fieldPath", + "type": "string" + } +]; +//# sourceMappingURL=v1ObjectFieldSelector.js.map + +/***/ }), + +/***/ 88638: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ObjectMeta = void 0; +/** +* ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. +*/ +class V1ObjectMeta { + static getAttributeTypeMap() { + return V1ObjectMeta.attributeTypeMap; + } +} +exports.V1ObjectMeta = V1ObjectMeta; +V1ObjectMeta.discriminator = undefined; +V1ObjectMeta.attributeTypeMap = [ + { + "name": "annotations", + "baseName": "annotations", + "type": "{ [key: string]: string; }" + }, + { + "name": "clusterName", + "baseName": "clusterName", + "type": "string" + }, + { + "name": "creationTimestamp", + "baseName": "creationTimestamp", + "type": "Date" + }, + { + "name": "deletionGracePeriodSeconds", + "baseName": "deletionGracePeriodSeconds", + "type": "number" + }, + { + "name": "deletionTimestamp", + "baseName": "deletionTimestamp", + "type": "Date" + }, + { + "name": "finalizers", + "baseName": "finalizers", + "type": "Array" + }, + { + "name": "generateName", + "baseName": "generateName", + "type": "string" + }, + { + "name": "generation", + "baseName": "generation", + "type": "number" + }, + { + "name": "labels", + "baseName": "labels", + "type": "{ [key: string]: string; }" + }, + { + "name": "managedFields", + "baseName": "managedFields", + "type": "Array" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "ownerReferences", + "baseName": "ownerReferences", + "type": "Array" + }, + { + "name": "resourceVersion", + "baseName": "resourceVersion", + "type": "string" + }, + { + "name": "selfLink", + "baseName": "selfLink", + "type": "string" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + } +]; +//# sourceMappingURL=v1ObjectMeta.js.map + +/***/ }), + +/***/ 93792: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ObjectReference = void 0; +/** +* ObjectReference contains enough information to let you inspect or modify the referred object. +*/ +class V1ObjectReference { + static getAttributeTypeMap() { + return V1ObjectReference.attributeTypeMap; + } +} +exports.V1ObjectReference = V1ObjectReference; +V1ObjectReference.discriminator = undefined; +V1ObjectReference.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "fieldPath", + "baseName": "fieldPath", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "resourceVersion", + "baseName": "resourceVersion", + "type": "string" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + } +]; +//# sourceMappingURL=v1ObjectReference.js.map + +/***/ }), + +/***/ 87514: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Overhead = void 0; +/** +* Overhead structure represents the resource overhead associated with running a pod. +*/ +class V1Overhead { + static getAttributeTypeMap() { + return V1Overhead.attributeTypeMap; + } +} +exports.V1Overhead = V1Overhead; +V1Overhead.discriminator = undefined; +V1Overhead.attributeTypeMap = [ + { + "name": "podFixed", + "baseName": "podFixed", + "type": "{ [key: string]: string; }" + } +]; +//# sourceMappingURL=v1Overhead.js.map + +/***/ }), + +/***/ 8143: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1OwnerReference = void 0; +/** +* OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field. +*/ +class V1OwnerReference { + static getAttributeTypeMap() { + return V1OwnerReference.attributeTypeMap; + } +} +exports.V1OwnerReference = V1OwnerReference; +V1OwnerReference.discriminator = undefined; +V1OwnerReference.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "blockOwnerDeletion", + "baseName": "blockOwnerDeletion", + "type": "boolean" + }, + { + "name": "controller", + "baseName": "controller", + "type": "boolean" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + } +]; +//# sourceMappingURL=v1OwnerReference.js.map + +/***/ }), + +/***/ 34661: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolume = void 0; +/** +* PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes +*/ +class V1PersistentVolume { + static getAttributeTypeMap() { + return V1PersistentVolume.attributeTypeMap; + } +} +exports.V1PersistentVolume = V1PersistentVolume; +V1PersistentVolume.discriminator = undefined; +V1PersistentVolume.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1PersistentVolumeSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1PersistentVolumeStatus" + } +]; +//# sourceMappingURL=v1PersistentVolume.js.map + +/***/ }), + +/***/ 43856: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeClaim = void 0; +/** +* PersistentVolumeClaim is a user\'s request for and claim to a persistent volume +*/ +class V1PersistentVolumeClaim { + static getAttributeTypeMap() { + return V1PersistentVolumeClaim.attributeTypeMap; + } +} +exports.V1PersistentVolumeClaim = V1PersistentVolumeClaim; +V1PersistentVolumeClaim.discriminator = undefined; +V1PersistentVolumeClaim.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1PersistentVolumeClaimSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1PersistentVolumeClaimStatus" + } +]; +//# sourceMappingURL=v1PersistentVolumeClaim.js.map + +/***/ }), + +/***/ 84989: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeClaimCondition = void 0; +/** +* PersistentVolumeClaimCondition contails details about state of pvc +*/ +class V1PersistentVolumeClaimCondition { + static getAttributeTypeMap() { + return V1PersistentVolumeClaimCondition.attributeTypeMap; + } +} +exports.V1PersistentVolumeClaimCondition = V1PersistentVolumeClaimCondition; +V1PersistentVolumeClaimCondition.discriminator = undefined; +V1PersistentVolumeClaimCondition.attributeTypeMap = [ + { + "name": "lastProbeTime", + "baseName": "lastProbeTime", + "type": "Date" + }, + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1PersistentVolumeClaimCondition.js.map + +/***/ }), + +/***/ 51875: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeClaimList = void 0; +/** +* PersistentVolumeClaimList is a list of PersistentVolumeClaim items. +*/ +class V1PersistentVolumeClaimList { + static getAttributeTypeMap() { + return V1PersistentVolumeClaimList.attributeTypeMap; + } +} +exports.V1PersistentVolumeClaimList = V1PersistentVolumeClaimList; +V1PersistentVolumeClaimList.discriminator = undefined; +V1PersistentVolumeClaimList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1PersistentVolumeClaimList.js.map + +/***/ }), + +/***/ 3364: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeClaimSpec = void 0; +/** +* PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes +*/ +class V1PersistentVolumeClaimSpec { + static getAttributeTypeMap() { + return V1PersistentVolumeClaimSpec.attributeTypeMap; + } +} +exports.V1PersistentVolumeClaimSpec = V1PersistentVolumeClaimSpec; +V1PersistentVolumeClaimSpec.discriminator = undefined; +V1PersistentVolumeClaimSpec.attributeTypeMap = [ + { + "name": "accessModes", + "baseName": "accessModes", + "type": "Array" + }, + { + "name": "dataSource", + "baseName": "dataSource", + "type": "V1TypedLocalObjectReference" + }, + { + "name": "resources", + "baseName": "resources", + "type": "V1ResourceRequirements" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + }, + { + "name": "storageClassName", + "baseName": "storageClassName", + "type": "string" + }, + { + "name": "volumeMode", + "baseName": "volumeMode", + "type": "string" + }, + { + "name": "volumeName", + "baseName": "volumeName", + "type": "string" + } +]; +//# sourceMappingURL=v1PersistentVolumeClaimSpec.js.map + +/***/ }), + +/***/ 66521: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeClaimStatus = void 0; +/** +* PersistentVolumeClaimStatus is the current status of a persistent volume claim. +*/ +class V1PersistentVolumeClaimStatus { + static getAttributeTypeMap() { + return V1PersistentVolumeClaimStatus.attributeTypeMap; + } +} +exports.V1PersistentVolumeClaimStatus = V1PersistentVolumeClaimStatus; +V1PersistentVolumeClaimStatus.discriminator = undefined; +V1PersistentVolumeClaimStatus.attributeTypeMap = [ + { + "name": "accessModes", + "baseName": "accessModes", + "type": "Array" + }, + { + "name": "capacity", + "baseName": "capacity", + "type": "{ [key: string]: string; }" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "phase", + "baseName": "phase", + "type": "string" + } +]; +//# sourceMappingURL=v1PersistentVolumeClaimStatus.js.map + +/***/ }), + +/***/ 94329: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeClaimTemplate = void 0; +/** +* PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource. +*/ +class V1PersistentVolumeClaimTemplate { + static getAttributeTypeMap() { + return V1PersistentVolumeClaimTemplate.attributeTypeMap; + } +} +exports.V1PersistentVolumeClaimTemplate = V1PersistentVolumeClaimTemplate; +V1PersistentVolumeClaimTemplate.discriminator = undefined; +V1PersistentVolumeClaimTemplate.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1PersistentVolumeClaimSpec" + } +]; +//# sourceMappingURL=v1PersistentVolumeClaimTemplate.js.map + +/***/ }), + +/***/ 56849: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeClaimVolumeSource = void 0; +/** +* PersistentVolumeClaimVolumeSource references the user\'s PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system). +*/ +class V1PersistentVolumeClaimVolumeSource { + static getAttributeTypeMap() { + return V1PersistentVolumeClaimVolumeSource.attributeTypeMap; + } +} +exports.V1PersistentVolumeClaimVolumeSource = V1PersistentVolumeClaimVolumeSource; +V1PersistentVolumeClaimVolumeSource.discriminator = undefined; +V1PersistentVolumeClaimVolumeSource.attributeTypeMap = [ + { + "name": "claimName", + "baseName": "claimName", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + } +]; +//# sourceMappingURL=v1PersistentVolumeClaimVolumeSource.js.map + +/***/ }), + +/***/ 40700: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeList = void 0; +/** +* PersistentVolumeList is a list of PersistentVolume items. +*/ +class V1PersistentVolumeList { + static getAttributeTypeMap() { + return V1PersistentVolumeList.attributeTypeMap; + } +} +exports.V1PersistentVolumeList = V1PersistentVolumeList; +V1PersistentVolumeList.discriminator = undefined; +V1PersistentVolumeList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1PersistentVolumeList.js.map + +/***/ }), + +/***/ 13386: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeSpec = void 0; +/** +* PersistentVolumeSpec is the specification of a persistent volume. +*/ +class V1PersistentVolumeSpec { + static getAttributeTypeMap() { + return V1PersistentVolumeSpec.attributeTypeMap; + } +} +exports.V1PersistentVolumeSpec = V1PersistentVolumeSpec; +V1PersistentVolumeSpec.discriminator = undefined; +V1PersistentVolumeSpec.attributeTypeMap = [ + { + "name": "accessModes", + "baseName": "accessModes", + "type": "Array" + }, + { + "name": "awsElasticBlockStore", + "baseName": "awsElasticBlockStore", + "type": "V1AWSElasticBlockStoreVolumeSource" + }, + { + "name": "azureDisk", + "baseName": "azureDisk", + "type": "V1AzureDiskVolumeSource" + }, + { + "name": "azureFile", + "baseName": "azureFile", + "type": "V1AzureFilePersistentVolumeSource" + }, + { + "name": "capacity", + "baseName": "capacity", + "type": "{ [key: string]: string; }" + }, + { + "name": "cephfs", + "baseName": "cephfs", + "type": "V1CephFSPersistentVolumeSource" + }, + { + "name": "cinder", + "baseName": "cinder", + "type": "V1CinderPersistentVolumeSource" + }, + { + "name": "claimRef", + "baseName": "claimRef", + "type": "V1ObjectReference" + }, + { + "name": "csi", + "baseName": "csi", + "type": "V1CSIPersistentVolumeSource" + }, + { + "name": "fc", + "baseName": "fc", + "type": "V1FCVolumeSource" + }, + { + "name": "flexVolume", + "baseName": "flexVolume", + "type": "V1FlexPersistentVolumeSource" + }, + { + "name": "flocker", + "baseName": "flocker", + "type": "V1FlockerVolumeSource" + }, + { + "name": "gcePersistentDisk", + "baseName": "gcePersistentDisk", + "type": "V1GCEPersistentDiskVolumeSource" + }, + { + "name": "glusterfs", + "baseName": "glusterfs", + "type": "V1GlusterfsPersistentVolumeSource" + }, + { + "name": "hostPath", + "baseName": "hostPath", + "type": "V1HostPathVolumeSource" + }, + { + "name": "iscsi", + "baseName": "iscsi", + "type": "V1ISCSIPersistentVolumeSource" + }, + { + "name": "local", + "baseName": "local", + "type": "V1LocalVolumeSource" + }, + { + "name": "mountOptions", + "baseName": "mountOptions", + "type": "Array" + }, + { + "name": "nfs", + "baseName": "nfs", + "type": "V1NFSVolumeSource" + }, + { + "name": "nodeAffinity", + "baseName": "nodeAffinity", + "type": "V1VolumeNodeAffinity" + }, + { + "name": "persistentVolumeReclaimPolicy", + "baseName": "persistentVolumeReclaimPolicy", + "type": "string" + }, + { + "name": "photonPersistentDisk", + "baseName": "photonPersistentDisk", + "type": "V1PhotonPersistentDiskVolumeSource" + }, + { + "name": "portworxVolume", + "baseName": "portworxVolume", + "type": "V1PortworxVolumeSource" + }, + { + "name": "quobyte", + "baseName": "quobyte", + "type": "V1QuobyteVolumeSource" + }, + { + "name": "rbd", + "baseName": "rbd", + "type": "V1RBDPersistentVolumeSource" + }, + { + "name": "scaleIO", + "baseName": "scaleIO", + "type": "V1ScaleIOPersistentVolumeSource" + }, + { + "name": "storageClassName", + "baseName": "storageClassName", + "type": "string" + }, + { + "name": "storageos", + "baseName": "storageos", + "type": "V1StorageOSPersistentVolumeSource" + }, + { + "name": "volumeMode", + "baseName": "volumeMode", + "type": "string" + }, + { + "name": "vsphereVolume", + "baseName": "vsphereVolume", + "type": "V1VsphereVirtualDiskVolumeSource" + } +]; +//# sourceMappingURL=v1PersistentVolumeSpec.js.map + +/***/ }), + +/***/ 71028: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PersistentVolumeStatus = void 0; +/** +* PersistentVolumeStatus is the current status of a persistent volume. +*/ +class V1PersistentVolumeStatus { + static getAttributeTypeMap() { + return V1PersistentVolumeStatus.attributeTypeMap; + } +} +exports.V1PersistentVolumeStatus = V1PersistentVolumeStatus; +V1PersistentVolumeStatus.discriminator = undefined; +V1PersistentVolumeStatus.attributeTypeMap = [ + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "phase", + "baseName": "phase", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + } +]; +//# sourceMappingURL=v1PersistentVolumeStatus.js.map + +/***/ }), + +/***/ 69815: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PhotonPersistentDiskVolumeSource = void 0; +/** +* Represents a Photon Controller persistent disk resource. +*/ +class V1PhotonPersistentDiskVolumeSource { + static getAttributeTypeMap() { + return V1PhotonPersistentDiskVolumeSource.attributeTypeMap; + } +} +exports.V1PhotonPersistentDiskVolumeSource = V1PhotonPersistentDiskVolumeSource; +V1PhotonPersistentDiskVolumeSource.discriminator = undefined; +V1PhotonPersistentDiskVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "pdID", + "baseName": "pdID", + "type": "string" + } +]; +//# sourceMappingURL=v1PhotonPersistentDiskVolumeSource.js.map + +/***/ }), + +/***/ 91845: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Pod = void 0; +/** +* Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. +*/ +class V1Pod { + static getAttributeTypeMap() { + return V1Pod.attributeTypeMap; + } +} +exports.V1Pod = V1Pod; +V1Pod.discriminator = undefined; +V1Pod.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1PodSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1PodStatus" + } +]; +//# sourceMappingURL=v1Pod.js.map + +/***/ }), + +/***/ 60108: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodAffinity = void 0; +/** +* Pod affinity is a group of inter pod affinity scheduling rules. +*/ +class V1PodAffinity { + static getAttributeTypeMap() { + return V1PodAffinity.attributeTypeMap; + } +} +exports.V1PodAffinity = V1PodAffinity; +V1PodAffinity.discriminator = undefined; +V1PodAffinity.attributeTypeMap = [ + { + "name": "preferredDuringSchedulingIgnoredDuringExecution", + "baseName": "preferredDuringSchedulingIgnoredDuringExecution", + "type": "Array" + }, + { + "name": "requiredDuringSchedulingIgnoredDuringExecution", + "baseName": "requiredDuringSchedulingIgnoredDuringExecution", + "type": "Array" + } +]; +//# sourceMappingURL=v1PodAffinity.js.map + +/***/ }), + +/***/ 41042: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodAffinityTerm = void 0; +/** +* Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running +*/ +class V1PodAffinityTerm { + static getAttributeTypeMap() { + return V1PodAffinityTerm.attributeTypeMap; + } +} +exports.V1PodAffinityTerm = V1PodAffinityTerm; +V1PodAffinityTerm.discriminator = undefined; +V1PodAffinityTerm.attributeTypeMap = [ + { + "name": "labelSelector", + "baseName": "labelSelector", + "type": "V1LabelSelector" + }, + { + "name": "namespaceSelector", + "baseName": "namespaceSelector", + "type": "V1LabelSelector" + }, + { + "name": "namespaces", + "baseName": "namespaces", + "type": "Array" + }, + { + "name": "topologyKey", + "baseName": "topologyKey", + "type": "string" + } +]; +//# sourceMappingURL=v1PodAffinityTerm.js.map + +/***/ }), + +/***/ 50297: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodAntiAffinity = void 0; +/** +* Pod anti affinity is a group of inter pod anti affinity scheduling rules. +*/ +class V1PodAntiAffinity { + static getAttributeTypeMap() { + return V1PodAntiAffinity.attributeTypeMap; + } +} +exports.V1PodAntiAffinity = V1PodAntiAffinity; +V1PodAntiAffinity.discriminator = undefined; +V1PodAntiAffinity.attributeTypeMap = [ + { + "name": "preferredDuringSchedulingIgnoredDuringExecution", + "baseName": "preferredDuringSchedulingIgnoredDuringExecution", + "type": "Array" + }, + { + "name": "requiredDuringSchedulingIgnoredDuringExecution", + "baseName": "requiredDuringSchedulingIgnoredDuringExecution", + "type": "Array" + } +]; +//# sourceMappingURL=v1PodAntiAffinity.js.map + +/***/ }), + +/***/ 71064: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodCondition = void 0; +/** +* PodCondition contains details for the current condition of this pod. +*/ +class V1PodCondition { + static getAttributeTypeMap() { + return V1PodCondition.attributeTypeMap; + } +} +exports.V1PodCondition = V1PodCondition; +V1PodCondition.discriminator = undefined; +V1PodCondition.attributeTypeMap = [ + { + "name": "lastProbeTime", + "baseName": "lastProbeTime", + "type": "Date" + }, + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1PodCondition.js.map + +/***/ }), + +/***/ 44598: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodDNSConfig = void 0; +/** +* PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. +*/ +class V1PodDNSConfig { + static getAttributeTypeMap() { + return V1PodDNSConfig.attributeTypeMap; + } +} +exports.V1PodDNSConfig = V1PodDNSConfig; +V1PodDNSConfig.discriminator = undefined; +V1PodDNSConfig.attributeTypeMap = [ + { + "name": "nameservers", + "baseName": "nameservers", + "type": "Array" + }, + { + "name": "options", + "baseName": "options", + "type": "Array" + }, + { + "name": "searches", + "baseName": "searches", + "type": "Array" + } +]; +//# sourceMappingURL=v1PodDNSConfig.js.map + +/***/ }), + +/***/ 96863: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodDNSConfigOption = void 0; +/** +* PodDNSConfigOption defines DNS resolver options of a pod. +*/ +class V1PodDNSConfigOption { + static getAttributeTypeMap() { + return V1PodDNSConfigOption.attributeTypeMap; + } +} +exports.V1PodDNSConfigOption = V1PodDNSConfigOption; +V1PodDNSConfigOption.discriminator = undefined; +V1PodDNSConfigOption.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } +]; +//# sourceMappingURL=v1PodDNSConfigOption.js.map + +/***/ }), + +/***/ 33836: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodDisruptionBudget = void 0; +/** +* PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +*/ +class V1PodDisruptionBudget { + static getAttributeTypeMap() { + return V1PodDisruptionBudget.attributeTypeMap; + } +} +exports.V1PodDisruptionBudget = V1PodDisruptionBudget; +V1PodDisruptionBudget.discriminator = undefined; +V1PodDisruptionBudget.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1PodDisruptionBudgetSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1PodDisruptionBudgetStatus" + } +]; +//# sourceMappingURL=v1PodDisruptionBudget.js.map + +/***/ }), + +/***/ 19014: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodDisruptionBudgetList = void 0; +/** +* PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +*/ +class V1PodDisruptionBudgetList { + static getAttributeTypeMap() { + return V1PodDisruptionBudgetList.attributeTypeMap; + } +} +exports.V1PodDisruptionBudgetList = V1PodDisruptionBudgetList; +V1PodDisruptionBudgetList.discriminator = undefined; +V1PodDisruptionBudgetList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1PodDisruptionBudgetList.js.map + +/***/ }), + +/***/ 216: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodDisruptionBudgetSpec = void 0; +/** +* PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +*/ +class V1PodDisruptionBudgetSpec { + static getAttributeTypeMap() { + return V1PodDisruptionBudgetSpec.attributeTypeMap; + } +} +exports.V1PodDisruptionBudgetSpec = V1PodDisruptionBudgetSpec; +V1PodDisruptionBudgetSpec.discriminator = undefined; +V1PodDisruptionBudgetSpec.attributeTypeMap = [ + { + "name": "maxUnavailable", + "baseName": "maxUnavailable", + "type": "object" + }, + { + "name": "minAvailable", + "baseName": "minAvailable", + "type": "object" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + } +]; +//# sourceMappingURL=v1PodDisruptionBudgetSpec.js.map + +/***/ }), + +/***/ 27906: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodDisruptionBudgetStatus = void 0; +/** +* PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. +*/ +class V1PodDisruptionBudgetStatus { + static getAttributeTypeMap() { + return V1PodDisruptionBudgetStatus.attributeTypeMap; + } +} +exports.V1PodDisruptionBudgetStatus = V1PodDisruptionBudgetStatus; +V1PodDisruptionBudgetStatus.discriminator = undefined; +V1PodDisruptionBudgetStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "currentHealthy", + "baseName": "currentHealthy", + "type": "number" + }, + { + "name": "desiredHealthy", + "baseName": "desiredHealthy", + "type": "number" + }, + { + "name": "disruptedPods", + "baseName": "disruptedPods", + "type": "{ [key: string]: Date; }" + }, + { + "name": "disruptionsAllowed", + "baseName": "disruptionsAllowed", + "type": "number" + }, + { + "name": "expectedPods", + "baseName": "expectedPods", + "type": "number" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + } +]; +//# sourceMappingURL=v1PodDisruptionBudgetStatus.js.map + +/***/ }), + +/***/ 58362: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodIP = void 0; +/** +* IP address information for entries in the (plural) PodIPs field. Each entry includes: IP: An IP address allocated to the pod. Routable at least within the cluster. +*/ +class V1PodIP { + static getAttributeTypeMap() { + return V1PodIP.attributeTypeMap; + } +} +exports.V1PodIP = V1PodIP; +V1PodIP.discriminator = undefined; +V1PodIP.attributeTypeMap = [ + { + "name": "ip", + "baseName": "ip", + "type": "string" + } +]; +//# sourceMappingURL=v1PodIP.js.map + +/***/ }), + +/***/ 26971: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodList = void 0; +/** +* PodList is a list of Pods. +*/ +class V1PodList { + static getAttributeTypeMap() { + return V1PodList.attributeTypeMap; + } +} +exports.V1PodList = V1PodList; +V1PodList.discriminator = undefined; +V1PodList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1PodList.js.map + +/***/ }), + +/***/ 6709: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodReadinessGate = void 0; +/** +* PodReadinessGate contains the reference to a pod condition +*/ +class V1PodReadinessGate { + static getAttributeTypeMap() { + return V1PodReadinessGate.attributeTypeMap; + } +} +exports.V1PodReadinessGate = V1PodReadinessGate; +V1PodReadinessGate.discriminator = undefined; +V1PodReadinessGate.attributeTypeMap = [ + { + "name": "conditionType", + "baseName": "conditionType", + "type": "string" + } +]; +//# sourceMappingURL=v1PodReadinessGate.js.map + +/***/ }), + +/***/ 99439: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodSecurityContext = void 0; +/** +* PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext. +*/ +class V1PodSecurityContext { + static getAttributeTypeMap() { + return V1PodSecurityContext.attributeTypeMap; + } +} +exports.V1PodSecurityContext = V1PodSecurityContext; +V1PodSecurityContext.discriminator = undefined; +V1PodSecurityContext.attributeTypeMap = [ + { + "name": "fsGroup", + "baseName": "fsGroup", + "type": "number" + }, + { + "name": "fsGroupChangePolicy", + "baseName": "fsGroupChangePolicy", + "type": "string" + }, + { + "name": "runAsGroup", + "baseName": "runAsGroup", + "type": "number" + }, + { + "name": "runAsNonRoot", + "baseName": "runAsNonRoot", + "type": "boolean" + }, + { + "name": "runAsUser", + "baseName": "runAsUser", + "type": "number" + }, + { + "name": "seLinuxOptions", + "baseName": "seLinuxOptions", + "type": "V1SELinuxOptions" + }, + { + "name": "seccompProfile", + "baseName": "seccompProfile", + "type": "V1SeccompProfile" + }, + { + "name": "supplementalGroups", + "baseName": "supplementalGroups", + "type": "Array" + }, + { + "name": "sysctls", + "baseName": "sysctls", + "type": "Array" + }, + { + "name": "windowsOptions", + "baseName": "windowsOptions", + "type": "V1WindowsSecurityContextOptions" + } +]; +//# sourceMappingURL=v1PodSecurityContext.js.map + +/***/ }), + +/***/ 82780: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodSpec = void 0; +/** +* PodSpec is a description of a pod. +*/ +class V1PodSpec { + static getAttributeTypeMap() { + return V1PodSpec.attributeTypeMap; + } +} +exports.V1PodSpec = V1PodSpec; +V1PodSpec.discriminator = undefined; +V1PodSpec.attributeTypeMap = [ + { + "name": "activeDeadlineSeconds", + "baseName": "activeDeadlineSeconds", + "type": "number" + }, + { + "name": "affinity", + "baseName": "affinity", + "type": "V1Affinity" + }, + { + "name": "automountServiceAccountToken", + "baseName": "automountServiceAccountToken", + "type": "boolean" + }, + { + "name": "containers", + "baseName": "containers", + "type": "Array" + }, + { + "name": "dnsConfig", + "baseName": "dnsConfig", + "type": "V1PodDNSConfig" + }, + { + "name": "dnsPolicy", + "baseName": "dnsPolicy", + "type": "string" + }, + { + "name": "enableServiceLinks", + "baseName": "enableServiceLinks", + "type": "boolean" + }, + { + "name": "ephemeralContainers", + "baseName": "ephemeralContainers", + "type": "Array" + }, + { + "name": "hostAliases", + "baseName": "hostAliases", + "type": "Array" + }, + { + "name": "hostIPC", + "baseName": "hostIPC", + "type": "boolean" + }, + { + "name": "hostNetwork", + "baseName": "hostNetwork", + "type": "boolean" + }, + { + "name": "hostPID", + "baseName": "hostPID", + "type": "boolean" + }, + { + "name": "hostname", + "baseName": "hostname", + "type": "string" + }, + { + "name": "imagePullSecrets", + "baseName": "imagePullSecrets", + "type": "Array" + }, + { + "name": "initContainers", + "baseName": "initContainers", + "type": "Array" + }, + { + "name": "nodeName", + "baseName": "nodeName", + "type": "string" + }, + { + "name": "nodeSelector", + "baseName": "nodeSelector", + "type": "{ [key: string]: string; }" + }, + { + "name": "overhead", + "baseName": "overhead", + "type": "{ [key: string]: string; }" + }, + { + "name": "preemptionPolicy", + "baseName": "preemptionPolicy", + "type": "string" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number" + }, + { + "name": "priorityClassName", + "baseName": "priorityClassName", + "type": "string" + }, + { + "name": "readinessGates", + "baseName": "readinessGates", + "type": "Array" + }, + { + "name": "restartPolicy", + "baseName": "restartPolicy", + "type": "string" + }, + { + "name": "runtimeClassName", + "baseName": "runtimeClassName", + "type": "string" + }, + { + "name": "schedulerName", + "baseName": "schedulerName", + "type": "string" + }, + { + "name": "securityContext", + "baseName": "securityContext", + "type": "V1PodSecurityContext" + }, + { + "name": "serviceAccount", + "baseName": "serviceAccount", + "type": "string" + }, + { + "name": "serviceAccountName", + "baseName": "serviceAccountName", + "type": "string" + }, + { + "name": "setHostnameAsFQDN", + "baseName": "setHostnameAsFQDN", + "type": "boolean" + }, + { + "name": "shareProcessNamespace", + "baseName": "shareProcessNamespace", + "type": "boolean" + }, + { + "name": "subdomain", + "baseName": "subdomain", + "type": "string" + }, + { + "name": "terminationGracePeriodSeconds", + "baseName": "terminationGracePeriodSeconds", + "type": "number" + }, + { + "name": "tolerations", + "baseName": "tolerations", + "type": "Array" + }, + { + "name": "topologySpreadConstraints", + "baseName": "topologySpreadConstraints", + "type": "Array" + }, + { + "name": "volumes", + "baseName": "volumes", + "type": "Array" + } +]; +//# sourceMappingURL=v1PodSpec.js.map + +/***/ }), + +/***/ 19437: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodStatus = void 0; +/** +* PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane. +*/ +class V1PodStatus { + static getAttributeTypeMap() { + return V1PodStatus.attributeTypeMap; + } +} +exports.V1PodStatus = V1PodStatus; +V1PodStatus.discriminator = undefined; +V1PodStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "containerStatuses", + "baseName": "containerStatuses", + "type": "Array" + }, + { + "name": "ephemeralContainerStatuses", + "baseName": "ephemeralContainerStatuses", + "type": "Array" + }, + { + "name": "hostIP", + "baseName": "hostIP", + "type": "string" + }, + { + "name": "initContainerStatuses", + "baseName": "initContainerStatuses", + "type": "Array" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "nominatedNodeName", + "baseName": "nominatedNodeName", + "type": "string" + }, + { + "name": "phase", + "baseName": "phase", + "type": "string" + }, + { + "name": "podIP", + "baseName": "podIP", + "type": "string" + }, + { + "name": "podIPs", + "baseName": "podIPs", + "type": "Array" + }, + { + "name": "qosClass", + "baseName": "qosClass", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "startTime", + "baseName": "startTime", + "type": "Date" + } +]; +//# sourceMappingURL=v1PodStatus.js.map + +/***/ }), + +/***/ 96091: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodTemplate = void 0; +/** +* PodTemplate describes a template for creating copies of a predefined pod. +*/ +class V1PodTemplate { + static getAttributeTypeMap() { + return V1PodTemplate.attributeTypeMap; + } +} +exports.V1PodTemplate = V1PodTemplate; +V1PodTemplate.discriminator = undefined; +V1PodTemplate.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "template", + "baseName": "template", + "type": "V1PodTemplateSpec" + } +]; +//# sourceMappingURL=v1PodTemplate.js.map + +/***/ }), + +/***/ 14020: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodTemplateList = void 0; +/** +* PodTemplateList is a list of PodTemplates. +*/ +class V1PodTemplateList { + static getAttributeTypeMap() { + return V1PodTemplateList.attributeTypeMap; + } +} +exports.V1PodTemplateList = V1PodTemplateList; +V1PodTemplateList.discriminator = undefined; +V1PodTemplateList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1PodTemplateList.js.map + +/***/ }), + +/***/ 31731: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PodTemplateSpec = void 0; +/** +* PodTemplateSpec describes the data a pod should have when created from a template +*/ +class V1PodTemplateSpec { + static getAttributeTypeMap() { + return V1PodTemplateSpec.attributeTypeMap; + } +} +exports.V1PodTemplateSpec = V1PodTemplateSpec; +V1PodTemplateSpec.discriminator = undefined; +V1PodTemplateSpec.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1PodSpec" + } +]; +//# sourceMappingURL=v1PodTemplateSpec.js.map + +/***/ }), + +/***/ 29139: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PolicyRule = void 0; +/** +* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. +*/ +class V1PolicyRule { + static getAttributeTypeMap() { + return V1PolicyRule.attributeTypeMap; + } +} +exports.V1PolicyRule = V1PolicyRule; +V1PolicyRule.discriminator = undefined; +V1PolicyRule.attributeTypeMap = [ + { + "name": "apiGroups", + "baseName": "apiGroups", + "type": "Array" + }, + { + "name": "nonResourceURLs", + "baseName": "nonResourceURLs", + "type": "Array" + }, + { + "name": "resourceNames", + "baseName": "resourceNames", + "type": "Array" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + } +]; +//# sourceMappingURL=v1PolicyRule.js.map + +/***/ }), + +/***/ 4652: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PortStatus = void 0; +class V1PortStatus { + static getAttributeTypeMap() { + return V1PortStatus.attributeTypeMap; + } +} +exports.V1PortStatus = V1PortStatus; +V1PortStatus.discriminator = undefined; +V1PortStatus.attributeTypeMap = [ + { + "name": "error", + "baseName": "error", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + }, + { + "name": "protocol", + "baseName": "protocol", + "type": "string" + } +]; +//# sourceMappingURL=v1PortStatus.js.map + +/***/ }), + +/***/ 77988: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PortworxVolumeSource = void 0; +/** +* PortworxVolumeSource represents a Portworx volume resource. +*/ +class V1PortworxVolumeSource { + static getAttributeTypeMap() { + return V1PortworxVolumeSource.attributeTypeMap; + } +} +exports.V1PortworxVolumeSource = V1PortworxVolumeSource; +V1PortworxVolumeSource.discriminator = undefined; +V1PortworxVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "volumeID", + "baseName": "volumeID", + "type": "string" + } +]; +//# sourceMappingURL=v1PortworxVolumeSource.js.map + +/***/ }), + +/***/ 11022: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Preconditions = void 0; +/** +* Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +*/ +class V1Preconditions { + static getAttributeTypeMap() { + return V1Preconditions.attributeTypeMap; + } +} +exports.V1Preconditions = V1Preconditions; +V1Preconditions.discriminator = undefined; +V1Preconditions.attributeTypeMap = [ + { + "name": "resourceVersion", + "baseName": "resourceVersion", + "type": "string" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + } +]; +//# sourceMappingURL=v1Preconditions.js.map + +/***/ }), + +/***/ 68852: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PreferredSchedulingTerm = void 0; +/** +* An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it\'s a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). +*/ +class V1PreferredSchedulingTerm { + static getAttributeTypeMap() { + return V1PreferredSchedulingTerm.attributeTypeMap; + } +} +exports.V1PreferredSchedulingTerm = V1PreferredSchedulingTerm; +V1PreferredSchedulingTerm.discriminator = undefined; +V1PreferredSchedulingTerm.attributeTypeMap = [ + { + "name": "preference", + "baseName": "preference", + "type": "V1NodeSelectorTerm" + }, + { + "name": "weight", + "baseName": "weight", + "type": "number" + } +]; +//# sourceMappingURL=v1PreferredSchedulingTerm.js.map + +/***/ }), + +/***/ 33470: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PriorityClass = void 0; +/** +* PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. +*/ +class V1PriorityClass { + static getAttributeTypeMap() { + return V1PriorityClass.attributeTypeMap; + } +} +exports.V1PriorityClass = V1PriorityClass; +V1PriorityClass.discriminator = undefined; +V1PriorityClass.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "globalDefault", + "baseName": "globalDefault", + "type": "boolean" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "preemptionPolicy", + "baseName": "preemptionPolicy", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } +]; +//# sourceMappingURL=v1PriorityClass.js.map + +/***/ }), + +/***/ 50264: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1PriorityClassList = void 0; +/** +* PriorityClassList is a collection of priority classes. +*/ +class V1PriorityClassList { + static getAttributeTypeMap() { + return V1PriorityClassList.attributeTypeMap; + } +} +exports.V1PriorityClassList = V1PriorityClassList; +V1PriorityClassList.discriminator = undefined; +V1PriorityClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1PriorityClassList.js.map + +/***/ }), + +/***/ 82432: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Probe = void 0; +/** +* Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. +*/ +class V1Probe { + static getAttributeTypeMap() { + return V1Probe.attributeTypeMap; + } +} +exports.V1Probe = V1Probe; +V1Probe.discriminator = undefined; +V1Probe.attributeTypeMap = [ + { + "name": "exec", + "baseName": "exec", + "type": "V1ExecAction" + }, + { + "name": "failureThreshold", + "baseName": "failureThreshold", + "type": "number" + }, + { + "name": "httpGet", + "baseName": "httpGet", + "type": "V1HTTPGetAction" + }, + { + "name": "initialDelaySeconds", + "baseName": "initialDelaySeconds", + "type": "number" + }, + { + "name": "periodSeconds", + "baseName": "periodSeconds", + "type": "number" + }, + { + "name": "successThreshold", + "baseName": "successThreshold", + "type": "number" + }, + { + "name": "tcpSocket", + "baseName": "tcpSocket", + "type": "V1TCPSocketAction" + }, + { + "name": "terminationGracePeriodSeconds", + "baseName": "terminationGracePeriodSeconds", + "type": "number" + }, + { + "name": "timeoutSeconds", + "baseName": "timeoutSeconds", + "type": "number" + } +]; +//# sourceMappingURL=v1Probe.js.map + +/***/ }), + +/***/ 73598: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ProjectedVolumeSource = void 0; +/** +* Represents a projected volume source +*/ +class V1ProjectedVolumeSource { + static getAttributeTypeMap() { + return V1ProjectedVolumeSource.attributeTypeMap; + } +} +exports.V1ProjectedVolumeSource = V1ProjectedVolumeSource; +V1ProjectedVolumeSource.discriminator = undefined; +V1ProjectedVolumeSource.attributeTypeMap = [ + { + "name": "defaultMode", + "baseName": "defaultMode", + "type": "number" + }, + { + "name": "sources", + "baseName": "sources", + "type": "Array" + } +]; +//# sourceMappingURL=v1ProjectedVolumeSource.js.map + +/***/ }), + +/***/ 94635: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1QuobyteVolumeSource = void 0; +/** +* Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling. +*/ +class V1QuobyteVolumeSource { + static getAttributeTypeMap() { + return V1QuobyteVolumeSource.attributeTypeMap; + } +} +exports.V1QuobyteVolumeSource = V1QuobyteVolumeSource; +V1QuobyteVolumeSource.discriminator = undefined; +V1QuobyteVolumeSource.attributeTypeMap = [ + { + "name": "group", + "baseName": "group", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "registry", + "baseName": "registry", + "type": "string" + }, + { + "name": "tenant", + "baseName": "tenant", + "type": "string" + }, + { + "name": "user", + "baseName": "user", + "type": "string" + }, + { + "name": "volume", + "baseName": "volume", + "type": "string" + } +]; +//# sourceMappingURL=v1QuobyteVolumeSource.js.map + +/***/ }), + +/***/ 84895: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RBDPersistentVolumeSource = void 0; +/** +* Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. +*/ +class V1RBDPersistentVolumeSource { + static getAttributeTypeMap() { + return V1RBDPersistentVolumeSource.attributeTypeMap; + } +} +exports.V1RBDPersistentVolumeSource = V1RBDPersistentVolumeSource; +V1RBDPersistentVolumeSource.discriminator = undefined; +V1RBDPersistentVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "image", + "baseName": "image", + "type": "string" + }, + { + "name": "keyring", + "baseName": "keyring", + "type": "string" + }, + { + "name": "monitors", + "baseName": "monitors", + "type": "Array" + }, + { + "name": "pool", + "baseName": "pool", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1SecretReference" + }, + { + "name": "user", + "baseName": "user", + "type": "string" + } +]; +//# sourceMappingURL=v1RBDPersistentVolumeSource.js.map + +/***/ }), + +/***/ 73369: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RBDVolumeSource = void 0; +/** +* Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. +*/ +class V1RBDVolumeSource { + static getAttributeTypeMap() { + return V1RBDVolumeSource.attributeTypeMap; + } +} +exports.V1RBDVolumeSource = V1RBDVolumeSource; +V1RBDVolumeSource.discriminator = undefined; +V1RBDVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "image", + "baseName": "image", + "type": "string" + }, + { + "name": "keyring", + "baseName": "keyring", + "type": "string" + }, + { + "name": "monitors", + "baseName": "monitors", + "type": "Array" + }, + { + "name": "pool", + "baseName": "pool", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1LocalObjectReference" + }, + { + "name": "user", + "baseName": "user", + "type": "string" + } +]; +//# sourceMappingURL=v1RBDVolumeSource.js.map + +/***/ }), + +/***/ 73725: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicaSet = void 0; +/** +* ReplicaSet ensures that a specified number of pod replicas are running at any given time. +*/ +class V1ReplicaSet { + static getAttributeTypeMap() { + return V1ReplicaSet.attributeTypeMap; + } +} +exports.V1ReplicaSet = V1ReplicaSet; +V1ReplicaSet.discriminator = undefined; +V1ReplicaSet.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1ReplicaSetSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1ReplicaSetStatus" + } +]; +//# sourceMappingURL=v1ReplicaSet.js.map + +/***/ }), + +/***/ 76186: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicaSetCondition = void 0; +/** +* ReplicaSetCondition describes the state of a replica set at a certain point. +*/ +class V1ReplicaSetCondition { + static getAttributeTypeMap() { + return V1ReplicaSetCondition.attributeTypeMap; + } +} +exports.V1ReplicaSetCondition = V1ReplicaSetCondition; +V1ReplicaSetCondition.discriminator = undefined; +V1ReplicaSetCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1ReplicaSetCondition.js.map + +/***/ }), + +/***/ 5042: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicaSetList = void 0; +/** +* ReplicaSetList is a collection of ReplicaSets. +*/ +class V1ReplicaSetList { + static getAttributeTypeMap() { + return V1ReplicaSetList.attributeTypeMap; + } +} +exports.V1ReplicaSetList = V1ReplicaSetList; +V1ReplicaSetList.discriminator = undefined; +V1ReplicaSetList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ReplicaSetList.js.map + +/***/ }), + +/***/ 12574: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicaSetSpec = void 0; +/** +* ReplicaSetSpec is the specification of a ReplicaSet. +*/ +class V1ReplicaSetSpec { + static getAttributeTypeMap() { + return V1ReplicaSetSpec.attributeTypeMap; + } +} +exports.V1ReplicaSetSpec = V1ReplicaSetSpec; +V1ReplicaSetSpec.discriminator = undefined; +V1ReplicaSetSpec.attributeTypeMap = [ + { + "name": "minReadySeconds", + "baseName": "minReadySeconds", + "type": "number" + }, + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + }, + { + "name": "template", + "baseName": "template", + "type": "V1PodTemplateSpec" + } +]; +//# sourceMappingURL=v1ReplicaSetSpec.js.map + +/***/ }), + +/***/ 90145: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicaSetStatus = void 0; +/** +* ReplicaSetStatus represents the current status of a ReplicaSet. +*/ +class V1ReplicaSetStatus { + static getAttributeTypeMap() { + return V1ReplicaSetStatus.attributeTypeMap; + } +} +exports.V1ReplicaSetStatus = V1ReplicaSetStatus; +V1ReplicaSetStatus.discriminator = undefined; +V1ReplicaSetStatus.attributeTypeMap = [ + { + "name": "availableReplicas", + "baseName": "availableReplicas", + "type": "number" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "fullyLabeledReplicas", + "baseName": "fullyLabeledReplicas", + "type": "number" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + }, + { + "name": "readyReplicas", + "baseName": "readyReplicas", + "type": "number" + }, + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + } +]; +//# sourceMappingURL=v1ReplicaSetStatus.js.map + +/***/ }), + +/***/ 60500: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicationController = void 0; +/** +* ReplicationController represents the configuration of a replication controller. +*/ +class V1ReplicationController { + static getAttributeTypeMap() { + return V1ReplicationController.attributeTypeMap; + } +} +exports.V1ReplicationController = V1ReplicationController; +V1ReplicationController.discriminator = undefined; +V1ReplicationController.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1ReplicationControllerSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1ReplicationControllerStatus" + } +]; +//# sourceMappingURL=v1ReplicationController.js.map + +/***/ }), + +/***/ 27886: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicationControllerCondition = void 0; +/** +* ReplicationControllerCondition describes the state of a replication controller at a certain point. +*/ +class V1ReplicationControllerCondition { + static getAttributeTypeMap() { + return V1ReplicationControllerCondition.attributeTypeMap; + } +} +exports.V1ReplicationControllerCondition = V1ReplicationControllerCondition; +V1ReplicationControllerCondition.discriminator = undefined; +V1ReplicationControllerCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1ReplicationControllerCondition.js.map + +/***/ }), + +/***/ 86844: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicationControllerList = void 0; +/** +* ReplicationControllerList is a collection of replication controllers. +*/ +class V1ReplicationControllerList { + static getAttributeTypeMap() { + return V1ReplicationControllerList.attributeTypeMap; + } +} +exports.V1ReplicationControllerList = V1ReplicationControllerList; +V1ReplicationControllerList.discriminator = undefined; +V1ReplicationControllerList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ReplicationControllerList.js.map + +/***/ }), + +/***/ 48666: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicationControllerSpec = void 0; +/** +* ReplicationControllerSpec is the specification of a replication controller. +*/ +class V1ReplicationControllerSpec { + static getAttributeTypeMap() { + return V1ReplicationControllerSpec.attributeTypeMap; + } +} +exports.V1ReplicationControllerSpec = V1ReplicationControllerSpec; +V1ReplicationControllerSpec.discriminator = undefined; +V1ReplicationControllerSpec.attributeTypeMap = [ + { + "name": "minReadySeconds", + "baseName": "minReadySeconds", + "type": "number" + }, + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + }, + { + "name": "selector", + "baseName": "selector", + "type": "{ [key: string]: string; }" + }, + { + "name": "template", + "baseName": "template", + "type": "V1PodTemplateSpec" + } +]; +//# sourceMappingURL=v1ReplicationControllerSpec.js.map + +/***/ }), + +/***/ 67426: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ReplicationControllerStatus = void 0; +/** +* ReplicationControllerStatus represents the current status of a replication controller. +*/ +class V1ReplicationControllerStatus { + static getAttributeTypeMap() { + return V1ReplicationControllerStatus.attributeTypeMap; + } +} +exports.V1ReplicationControllerStatus = V1ReplicationControllerStatus; +V1ReplicationControllerStatus.discriminator = undefined; +V1ReplicationControllerStatus.attributeTypeMap = [ + { + "name": "availableReplicas", + "baseName": "availableReplicas", + "type": "number" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "fullyLabeledReplicas", + "baseName": "fullyLabeledReplicas", + "type": "number" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + }, + { + "name": "readyReplicas", + "baseName": "readyReplicas", + "type": "number" + }, + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + } +]; +//# sourceMappingURL=v1ReplicationControllerStatus.js.map + +/***/ }), + +/***/ 11995: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ResourceAttributes = void 0; +/** +* ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface +*/ +class V1ResourceAttributes { + static getAttributeTypeMap() { + return V1ResourceAttributes.attributeTypeMap; + } +} +exports.V1ResourceAttributes = V1ResourceAttributes; +V1ResourceAttributes.discriminator = undefined; +V1ResourceAttributes.attributeTypeMap = [ + { + "name": "group", + "baseName": "group", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "resource", + "baseName": "resource", + "type": "string" + }, + { + "name": "subresource", + "baseName": "subresource", + "type": "string" + }, + { + "name": "verb", + "baseName": "verb", + "type": "string" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + } +]; +//# sourceMappingURL=v1ResourceAttributes.js.map + +/***/ }), + +/***/ 59597: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ResourceFieldSelector = void 0; +/** +* ResourceFieldSelector represents container resources (cpu, memory) and their output format +*/ +class V1ResourceFieldSelector { + static getAttributeTypeMap() { + return V1ResourceFieldSelector.attributeTypeMap; + } +} +exports.V1ResourceFieldSelector = V1ResourceFieldSelector; +V1ResourceFieldSelector.discriminator = undefined; +V1ResourceFieldSelector.attributeTypeMap = [ + { + "name": "containerName", + "baseName": "containerName", + "type": "string" + }, + { + "name": "divisor", + "baseName": "divisor", + "type": "string" + }, + { + "name": "resource", + "baseName": "resource", + "type": "string" + } +]; +//# sourceMappingURL=v1ResourceFieldSelector.js.map + +/***/ }), + +/***/ 51088: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ResourceQuota = void 0; +/** +* ResourceQuota sets aggregate quota restrictions enforced per namespace +*/ +class V1ResourceQuota { + static getAttributeTypeMap() { + return V1ResourceQuota.attributeTypeMap; + } +} +exports.V1ResourceQuota = V1ResourceQuota; +V1ResourceQuota.discriminator = undefined; +V1ResourceQuota.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1ResourceQuotaSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1ResourceQuotaStatus" + } +]; +//# sourceMappingURL=v1ResourceQuota.js.map + +/***/ }), + +/***/ 35162: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ResourceQuotaList = void 0; +/** +* ResourceQuotaList is a list of ResourceQuota items. +*/ +class V1ResourceQuotaList { + static getAttributeTypeMap() { + return V1ResourceQuotaList.attributeTypeMap; + } +} +exports.V1ResourceQuotaList = V1ResourceQuotaList; +V1ResourceQuotaList.discriminator = undefined; +V1ResourceQuotaList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ResourceQuotaList.js.map + +/***/ }), + +/***/ 56546: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ResourceQuotaSpec = void 0; +/** +* ResourceQuotaSpec defines the desired hard limits to enforce for Quota. +*/ +class V1ResourceQuotaSpec { + static getAttributeTypeMap() { + return V1ResourceQuotaSpec.attributeTypeMap; + } +} +exports.V1ResourceQuotaSpec = V1ResourceQuotaSpec; +V1ResourceQuotaSpec.discriminator = undefined; +V1ResourceQuotaSpec.attributeTypeMap = [ + { + "name": "hard", + "baseName": "hard", + "type": "{ [key: string]: string; }" + }, + { + "name": "scopeSelector", + "baseName": "scopeSelector", + "type": "V1ScopeSelector" + }, + { + "name": "scopes", + "baseName": "scopes", + "type": "Array" + } +]; +//# sourceMappingURL=v1ResourceQuotaSpec.js.map + +/***/ }), + +/***/ 46233: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ResourceQuotaStatus = void 0; +/** +* ResourceQuotaStatus defines the enforced hard limits and observed use. +*/ +class V1ResourceQuotaStatus { + static getAttributeTypeMap() { + return V1ResourceQuotaStatus.attributeTypeMap; + } +} +exports.V1ResourceQuotaStatus = V1ResourceQuotaStatus; +V1ResourceQuotaStatus.discriminator = undefined; +V1ResourceQuotaStatus.attributeTypeMap = [ + { + "name": "hard", + "baseName": "hard", + "type": "{ [key: string]: string; }" + }, + { + "name": "used", + "baseName": "used", + "type": "{ [key: string]: string; }" + } +]; +//# sourceMappingURL=v1ResourceQuotaStatus.js.map + +/***/ }), + +/***/ 82525: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ResourceRequirements = void 0; +/** +* ResourceRequirements describes the compute resource requirements. +*/ +class V1ResourceRequirements { + static getAttributeTypeMap() { + return V1ResourceRequirements.attributeTypeMap; + } +} +exports.V1ResourceRequirements = V1ResourceRequirements; +V1ResourceRequirements.discriminator = undefined; +V1ResourceRequirements.attributeTypeMap = [ + { + "name": "limits", + "baseName": "limits", + "type": "{ [key: string]: string; }" + }, + { + "name": "requests", + "baseName": "requests", + "type": "{ [key: string]: string; }" + } +]; +//# sourceMappingURL=v1ResourceRequirements.js.map + +/***/ }), + +/***/ 41128: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ResourceRule = void 0; +/** +* ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn\'t significant, may contain duplicates, and possibly be incomplete. +*/ +class V1ResourceRule { + static getAttributeTypeMap() { + return V1ResourceRule.attributeTypeMap; + } +} +exports.V1ResourceRule = V1ResourceRule; +V1ResourceRule.discriminator = undefined; +V1ResourceRule.attributeTypeMap = [ + { + "name": "apiGroups", + "baseName": "apiGroups", + "type": "Array" + }, + { + "name": "resourceNames", + "baseName": "resourceNames", + "type": "Array" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + } +]; +//# sourceMappingURL=v1ResourceRule.js.map + +/***/ }), + +/***/ 46997: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Role = void 0; +/** +* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +*/ +class V1Role { + static getAttributeTypeMap() { + return V1Role.attributeTypeMap; + } +} +exports.V1Role = V1Role; +V1Role.discriminator = undefined; +V1Role.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + } +]; +//# sourceMappingURL=v1Role.js.map + +/***/ }), + +/***/ 41575: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RoleBinding = void 0; +/** +* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. +*/ +class V1RoleBinding { + static getAttributeTypeMap() { + return V1RoleBinding.attributeTypeMap; + } +} +exports.V1RoleBinding = V1RoleBinding; +V1RoleBinding.discriminator = undefined; +V1RoleBinding.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "roleRef", + "baseName": "roleRef", + "type": "V1RoleRef" + }, + { + "name": "subjects", + "baseName": "subjects", + "type": "Array" + } +]; +//# sourceMappingURL=v1RoleBinding.js.map + +/***/ }), + +/***/ 36971: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RoleBindingList = void 0; +/** +* RoleBindingList is a collection of RoleBindings +*/ +class V1RoleBindingList { + static getAttributeTypeMap() { + return V1RoleBindingList.attributeTypeMap; + } +} +exports.V1RoleBindingList = V1RoleBindingList; +V1RoleBindingList.discriminator = undefined; +V1RoleBindingList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1RoleBindingList.js.map + +/***/ }), + +/***/ 66081: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RoleList = void 0; +/** +* RoleList is a collection of Roles +*/ +class V1RoleList { + static getAttributeTypeMap() { + return V1RoleList.attributeTypeMap; + } +} +exports.V1RoleList = V1RoleList; +V1RoleList.discriminator = undefined; +V1RoleList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1RoleList.js.map + +/***/ }), + +/***/ 16454: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RoleRef = void 0; +/** +* RoleRef contains information that points to the role being used +*/ +class V1RoleRef { + static getAttributeTypeMap() { + return V1RoleRef.attributeTypeMap; + } +} +exports.V1RoleRef = V1RoleRef; +V1RoleRef.discriminator = undefined; +V1RoleRef.attributeTypeMap = [ + { + "name": "apiGroup", + "baseName": "apiGroup", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1RoleRef.js.map + +/***/ }), + +/***/ 88113: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RollingUpdateDaemonSet = void 0; +/** +* Spec to control the desired behavior of daemon set rolling update. +*/ +class V1RollingUpdateDaemonSet { + static getAttributeTypeMap() { + return V1RollingUpdateDaemonSet.attributeTypeMap; + } +} +exports.V1RollingUpdateDaemonSet = V1RollingUpdateDaemonSet; +V1RollingUpdateDaemonSet.discriminator = undefined; +V1RollingUpdateDaemonSet.attributeTypeMap = [ + { + "name": "maxSurge", + "baseName": "maxSurge", + "type": "object" + }, + { + "name": "maxUnavailable", + "baseName": "maxUnavailable", + "type": "object" + } +]; +//# sourceMappingURL=v1RollingUpdateDaemonSet.js.map + +/***/ }), + +/***/ 19616: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RollingUpdateDeployment = void 0; +/** +* Spec to control the desired behavior of rolling update. +*/ +class V1RollingUpdateDeployment { + static getAttributeTypeMap() { + return V1RollingUpdateDeployment.attributeTypeMap; + } +} +exports.V1RollingUpdateDeployment = V1RollingUpdateDeployment; +V1RollingUpdateDeployment.discriminator = undefined; +V1RollingUpdateDeployment.attributeTypeMap = [ + { + "name": "maxSurge", + "baseName": "maxSurge", + "type": "object" + }, + { + "name": "maxUnavailable", + "baseName": "maxUnavailable", + "type": "object" + } +]; +//# sourceMappingURL=v1RollingUpdateDeployment.js.map + +/***/ }), + +/***/ 15899: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RollingUpdateStatefulSetStrategy = void 0; +/** +* RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. +*/ +class V1RollingUpdateStatefulSetStrategy { + static getAttributeTypeMap() { + return V1RollingUpdateStatefulSetStrategy.attributeTypeMap; + } +} +exports.V1RollingUpdateStatefulSetStrategy = V1RollingUpdateStatefulSetStrategy; +V1RollingUpdateStatefulSetStrategy.discriminator = undefined; +V1RollingUpdateStatefulSetStrategy.attributeTypeMap = [ + { + "name": "partition", + "baseName": "partition", + "type": "number" + } +]; +//# sourceMappingURL=v1RollingUpdateStatefulSetStrategy.js.map + +/***/ }), + +/***/ 73966: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RuleWithOperations = void 0; +/** +* RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. +*/ +class V1RuleWithOperations { + static getAttributeTypeMap() { + return V1RuleWithOperations.attributeTypeMap; + } +} +exports.V1RuleWithOperations = V1RuleWithOperations; +V1RuleWithOperations.discriminator = undefined; +V1RuleWithOperations.attributeTypeMap = [ + { + "name": "apiGroups", + "baseName": "apiGroups", + "type": "Array" + }, + { + "name": "apiVersions", + "baseName": "apiVersions", + "type": "Array" + }, + { + "name": "operations", + "baseName": "operations", + "type": "Array" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + }, + { + "name": "scope", + "baseName": "scope", + "type": "string" + } +]; +//# sourceMappingURL=v1RuleWithOperations.js.map + +/***/ }), + +/***/ 84445: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RuntimeClass = void 0; +/** +* RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/ +*/ +class V1RuntimeClass { + static getAttributeTypeMap() { + return V1RuntimeClass.attributeTypeMap; + } +} +exports.V1RuntimeClass = V1RuntimeClass; +V1RuntimeClass.discriminator = undefined; +V1RuntimeClass.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "handler", + "baseName": "handler", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "overhead", + "baseName": "overhead", + "type": "V1Overhead" + }, + { + "name": "scheduling", + "baseName": "scheduling", + "type": "V1Scheduling" + } +]; +//# sourceMappingURL=v1RuntimeClass.js.map + +/***/ }), + +/***/ 61491: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1RuntimeClassList = void 0; +/** +* RuntimeClassList is a list of RuntimeClass objects. +*/ +class V1RuntimeClassList { + static getAttributeTypeMap() { + return V1RuntimeClassList.attributeTypeMap; + } +} +exports.V1RuntimeClassList = V1RuntimeClassList; +V1RuntimeClassList.discriminator = undefined; +V1RuntimeClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1RuntimeClassList.js.map + +/***/ }), + +/***/ 56067: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SELinuxOptions = void 0; +/** +* SELinuxOptions are the labels to be applied to the container +*/ +class V1SELinuxOptions { + static getAttributeTypeMap() { + return V1SELinuxOptions.attributeTypeMap; + } +} +exports.V1SELinuxOptions = V1SELinuxOptions; +V1SELinuxOptions.discriminator = undefined; +V1SELinuxOptions.attributeTypeMap = [ + { + "name": "level", + "baseName": "level", + "type": "string" + }, + { + "name": "role", + "baseName": "role", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "user", + "baseName": "user", + "type": "string" + } +]; +//# sourceMappingURL=v1SELinuxOptions.js.map + +/***/ }), + +/***/ 65750: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Scale = void 0; +/** +* Scale represents a scaling request for a resource. +*/ +class V1Scale { + static getAttributeTypeMap() { + return V1Scale.attributeTypeMap; + } +} +exports.V1Scale = V1Scale; +V1Scale.discriminator = undefined; +V1Scale.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1ScaleSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1ScaleStatus" + } +]; +//# sourceMappingURL=v1Scale.js.map + +/***/ }), + +/***/ 3065: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ScaleIOPersistentVolumeSource = void 0; +/** +* ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume +*/ +class V1ScaleIOPersistentVolumeSource { + static getAttributeTypeMap() { + return V1ScaleIOPersistentVolumeSource.attributeTypeMap; + } +} +exports.V1ScaleIOPersistentVolumeSource = V1ScaleIOPersistentVolumeSource; +V1ScaleIOPersistentVolumeSource.discriminator = undefined; +V1ScaleIOPersistentVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "gateway", + "baseName": "gateway", + "type": "string" + }, + { + "name": "protectionDomain", + "baseName": "protectionDomain", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1SecretReference" + }, + { + "name": "sslEnabled", + "baseName": "sslEnabled", + "type": "boolean" + }, + { + "name": "storageMode", + "baseName": "storageMode", + "type": "string" + }, + { + "name": "storagePool", + "baseName": "storagePool", + "type": "string" + }, + { + "name": "system", + "baseName": "system", + "type": "string" + }, + { + "name": "volumeName", + "baseName": "volumeName", + "type": "string" + } +]; +//# sourceMappingURL=v1ScaleIOPersistentVolumeSource.js.map + +/***/ }), + +/***/ 41156: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ScaleIOVolumeSource = void 0; +/** +* ScaleIOVolumeSource represents a persistent ScaleIO volume +*/ +class V1ScaleIOVolumeSource { + static getAttributeTypeMap() { + return V1ScaleIOVolumeSource.attributeTypeMap; + } +} +exports.V1ScaleIOVolumeSource = V1ScaleIOVolumeSource; +V1ScaleIOVolumeSource.discriminator = undefined; +V1ScaleIOVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "gateway", + "baseName": "gateway", + "type": "string" + }, + { + "name": "protectionDomain", + "baseName": "protectionDomain", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1LocalObjectReference" + }, + { + "name": "sslEnabled", + "baseName": "sslEnabled", + "type": "boolean" + }, + { + "name": "storageMode", + "baseName": "storageMode", + "type": "string" + }, + { + "name": "storagePool", + "baseName": "storagePool", + "type": "string" + }, + { + "name": "system", + "baseName": "system", + "type": "string" + }, + { + "name": "volumeName", + "baseName": "volumeName", + "type": "string" + } +]; +//# sourceMappingURL=v1ScaleIOVolumeSource.js.map + +/***/ }), + +/***/ 55131: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ScaleSpec = void 0; +/** +* ScaleSpec describes the attributes of a scale subresource. +*/ +class V1ScaleSpec { + static getAttributeTypeMap() { + return V1ScaleSpec.attributeTypeMap; + } +} +exports.V1ScaleSpec = V1ScaleSpec; +V1ScaleSpec.discriminator = undefined; +V1ScaleSpec.attributeTypeMap = [ + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + } +]; +//# sourceMappingURL=v1ScaleSpec.js.map + +/***/ }), + +/***/ 91879: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ScaleStatus = void 0; +/** +* ScaleStatus represents the current status of a scale subresource. +*/ +class V1ScaleStatus { + static getAttributeTypeMap() { + return V1ScaleStatus.attributeTypeMap; + } +} +exports.V1ScaleStatus = V1ScaleStatus; +V1ScaleStatus.discriminator = undefined; +V1ScaleStatus.attributeTypeMap = [ + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + }, + { + "name": "selector", + "baseName": "selector", + "type": "string" + } +]; +//# sourceMappingURL=v1ScaleStatus.js.map + +/***/ }), + +/***/ 20024: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Scheduling = void 0; +/** +* Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. +*/ +class V1Scheduling { + static getAttributeTypeMap() { + return V1Scheduling.attributeTypeMap; + } +} +exports.V1Scheduling = V1Scheduling; +V1Scheduling.discriminator = undefined; +V1Scheduling.attributeTypeMap = [ + { + "name": "nodeSelector", + "baseName": "nodeSelector", + "type": "{ [key: string]: string; }" + }, + { + "name": "tolerations", + "baseName": "tolerations", + "type": "Array" + } +]; +//# sourceMappingURL=v1Scheduling.js.map + +/***/ }), + +/***/ 54123: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ScopeSelector = void 0; +/** +* A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements. +*/ +class V1ScopeSelector { + static getAttributeTypeMap() { + return V1ScopeSelector.attributeTypeMap; + } +} +exports.V1ScopeSelector = V1ScopeSelector; +V1ScopeSelector.discriminator = undefined; +V1ScopeSelector.attributeTypeMap = [ + { + "name": "matchExpressions", + "baseName": "matchExpressions", + "type": "Array" + } +]; +//# sourceMappingURL=v1ScopeSelector.js.map + +/***/ }), + +/***/ 38307: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ScopedResourceSelectorRequirement = void 0; +/** +* A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. +*/ +class V1ScopedResourceSelectorRequirement { + static getAttributeTypeMap() { + return V1ScopedResourceSelectorRequirement.attributeTypeMap; + } +} +exports.V1ScopedResourceSelectorRequirement = V1ScopedResourceSelectorRequirement; +V1ScopedResourceSelectorRequirement.discriminator = undefined; +V1ScopedResourceSelectorRequirement.attributeTypeMap = [ + { + "name": "operator", + "baseName": "operator", + "type": "string" + }, + { + "name": "scopeName", + "baseName": "scopeName", + "type": "string" + }, + { + "name": "values", + "baseName": "values", + "type": "Array" + } +]; +//# sourceMappingURL=v1ScopedResourceSelectorRequirement.js.map + +/***/ }), + +/***/ 82: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SeccompProfile = void 0; +/** +* SeccompProfile defines a pod/container\'s seccomp profile settings. Only one profile source may be set. +*/ +class V1SeccompProfile { + static getAttributeTypeMap() { + return V1SeccompProfile.attributeTypeMap; + } +} +exports.V1SeccompProfile = V1SeccompProfile; +V1SeccompProfile.discriminator = undefined; +V1SeccompProfile.attributeTypeMap = [ + { + "name": "localhostProfile", + "baseName": "localhostProfile", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1SeccompProfile.js.map + +/***/ }), + +/***/ 40626: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Secret = void 0; +/** +* Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes. +*/ +class V1Secret { + static getAttributeTypeMap() { + return V1Secret.attributeTypeMap; + } +} +exports.V1Secret = V1Secret; +V1Secret.discriminator = undefined; +V1Secret.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "data", + "baseName": "data", + "type": "{ [key: string]: string; }" + }, + { + "name": "immutable", + "baseName": "immutable", + "type": "boolean" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "stringData", + "baseName": "stringData", + "type": "{ [key: string]: string; }" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1Secret.js.map + +/***/ }), + +/***/ 60276: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SecretEnvSource = void 0; +/** +* SecretEnvSource selects a Secret to populate the environment variables with. The contents of the target Secret\'s Data field will represent the key-value pairs as environment variables. +*/ +class V1SecretEnvSource { + static getAttributeTypeMap() { + return V1SecretEnvSource.attributeTypeMap; + } +} +exports.V1SecretEnvSource = V1SecretEnvSource; +V1SecretEnvSource.discriminator = undefined; +V1SecretEnvSource.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + } +]; +//# sourceMappingURL=v1SecretEnvSource.js.map + +/***/ }), + +/***/ 27536: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SecretKeySelector = void 0; +/** +* SecretKeySelector selects a key of a Secret. +*/ +class V1SecretKeySelector { + static getAttributeTypeMap() { + return V1SecretKeySelector.attributeTypeMap; + } +} +exports.V1SecretKeySelector = V1SecretKeySelector; +V1SecretKeySelector.discriminator = undefined; +V1SecretKeySelector.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + } +]; +//# sourceMappingURL=v1SecretKeySelector.js.map + +/***/ }), + +/***/ 20056: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SecretList = void 0; +/** +* SecretList is a list of Secret. +*/ +class V1SecretList { + static getAttributeTypeMap() { + return V1SecretList.attributeTypeMap; + } +} +exports.V1SecretList = V1SecretList; +V1SecretList.discriminator = undefined; +V1SecretList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1SecretList.js.map + +/***/ }), + +/***/ 71241: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SecretProjection = void 0; +/** +* Adapts a secret into a projected volume. The contents of the target Secret\'s Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. +*/ +class V1SecretProjection { + static getAttributeTypeMap() { + return V1SecretProjection.attributeTypeMap; + } +} +exports.V1SecretProjection = V1SecretProjection; +V1SecretProjection.discriminator = undefined; +V1SecretProjection.attributeTypeMap = [ + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + } +]; +//# sourceMappingURL=v1SecretProjection.js.map + +/***/ }), + +/***/ 22746: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SecretReference = void 0; +/** +* SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace +*/ +class V1SecretReference { + static getAttributeTypeMap() { + return V1SecretReference.attributeTypeMap; + } +} +exports.V1SecretReference = V1SecretReference; +V1SecretReference.discriminator = undefined; +V1SecretReference.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + } +]; +//# sourceMappingURL=v1SecretReference.js.map + +/***/ }), + +/***/ 70716: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SecretVolumeSource = void 0; +/** +* Adapts a Secret into a volume. The contents of the target Secret\'s Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling. +*/ +class V1SecretVolumeSource { + static getAttributeTypeMap() { + return V1SecretVolumeSource.attributeTypeMap; + } +} +exports.V1SecretVolumeSource = V1SecretVolumeSource; +V1SecretVolumeSource.discriminator = undefined; +V1SecretVolumeSource.attributeTypeMap = [ + { + "name": "defaultMode", + "baseName": "defaultMode", + "type": "number" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + }, + { + "name": "secretName", + "baseName": "secretName", + "type": "string" + } +]; +//# sourceMappingURL=v1SecretVolumeSource.js.map + +/***/ }), + +/***/ 48928: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SecurityContext = void 0; +/** +* SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence. +*/ +class V1SecurityContext { + static getAttributeTypeMap() { + return V1SecurityContext.attributeTypeMap; + } +} +exports.V1SecurityContext = V1SecurityContext; +V1SecurityContext.discriminator = undefined; +V1SecurityContext.attributeTypeMap = [ + { + "name": "allowPrivilegeEscalation", + "baseName": "allowPrivilegeEscalation", + "type": "boolean" + }, + { + "name": "capabilities", + "baseName": "capabilities", + "type": "V1Capabilities" + }, + { + "name": "privileged", + "baseName": "privileged", + "type": "boolean" + }, + { + "name": "procMount", + "baseName": "procMount", + "type": "string" + }, + { + "name": "readOnlyRootFilesystem", + "baseName": "readOnlyRootFilesystem", + "type": "boolean" + }, + { + "name": "runAsGroup", + "baseName": "runAsGroup", + "type": "number" + }, + { + "name": "runAsNonRoot", + "baseName": "runAsNonRoot", + "type": "boolean" + }, + { + "name": "runAsUser", + "baseName": "runAsUser", + "type": "number" + }, + { + "name": "seLinuxOptions", + "baseName": "seLinuxOptions", + "type": "V1SELinuxOptions" + }, + { + "name": "seccompProfile", + "baseName": "seccompProfile", + "type": "V1SeccompProfile" + }, + { + "name": "windowsOptions", + "baseName": "windowsOptions", + "type": "V1WindowsSecurityContextOptions" + } +]; +//# sourceMappingURL=v1SecurityContext.js.map + +/***/ }), + +/***/ 97443: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SelfSubjectAccessReview = void 0; +/** +* SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action +*/ +class V1SelfSubjectAccessReview { + static getAttributeTypeMap() { + return V1SelfSubjectAccessReview.attributeTypeMap; + } +} +exports.V1SelfSubjectAccessReview = V1SelfSubjectAccessReview; +V1SelfSubjectAccessReview.discriminator = undefined; +V1SelfSubjectAccessReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1SelfSubjectAccessReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1SubjectAccessReviewStatus" + } +]; +//# sourceMappingURL=v1SelfSubjectAccessReview.js.map + +/***/ }), + +/***/ 73469: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SelfSubjectAccessReviewSpec = void 0; +/** +* SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set +*/ +class V1SelfSubjectAccessReviewSpec { + static getAttributeTypeMap() { + return V1SelfSubjectAccessReviewSpec.attributeTypeMap; + } +} +exports.V1SelfSubjectAccessReviewSpec = V1SelfSubjectAccessReviewSpec; +V1SelfSubjectAccessReviewSpec.discriminator = undefined; +V1SelfSubjectAccessReviewSpec.attributeTypeMap = [ + { + "name": "nonResourceAttributes", + "baseName": "nonResourceAttributes", + "type": "V1NonResourceAttributes" + }, + { + "name": "resourceAttributes", + "baseName": "resourceAttributes", + "type": "V1ResourceAttributes" + } +]; +//# sourceMappingURL=v1SelfSubjectAccessReviewSpec.js.map + +/***/ }), + +/***/ 82875: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SelfSubjectRulesReview = void 0; +/** +* SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server\'s authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. +*/ +class V1SelfSubjectRulesReview { + static getAttributeTypeMap() { + return V1SelfSubjectRulesReview.attributeTypeMap; + } +} +exports.V1SelfSubjectRulesReview = V1SelfSubjectRulesReview; +V1SelfSubjectRulesReview.discriminator = undefined; +V1SelfSubjectRulesReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1SelfSubjectRulesReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1SubjectRulesReviewStatus" + } +]; +//# sourceMappingURL=v1SelfSubjectRulesReview.js.map + +/***/ }), + +/***/ 29170: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SelfSubjectRulesReviewSpec = void 0; +class V1SelfSubjectRulesReviewSpec { + static getAttributeTypeMap() { + return V1SelfSubjectRulesReviewSpec.attributeTypeMap; + } +} +exports.V1SelfSubjectRulesReviewSpec = V1SelfSubjectRulesReviewSpec; +V1SelfSubjectRulesReviewSpec.discriminator = undefined; +V1SelfSubjectRulesReviewSpec.attributeTypeMap = [ + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + } +]; +//# sourceMappingURL=v1SelfSubjectRulesReviewSpec.js.map + +/***/ }), + +/***/ 99317: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ServerAddressByClientCIDR = void 0; +/** +* ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. +*/ +class V1ServerAddressByClientCIDR { + static getAttributeTypeMap() { + return V1ServerAddressByClientCIDR.attributeTypeMap; + } +} +exports.V1ServerAddressByClientCIDR = V1ServerAddressByClientCIDR; +V1ServerAddressByClientCIDR.discriminator = undefined; +V1ServerAddressByClientCIDR.attributeTypeMap = [ + { + "name": "clientCIDR", + "baseName": "clientCIDR", + "type": "string" + }, + { + "name": "serverAddress", + "baseName": "serverAddress", + "type": "string" + } +]; +//# sourceMappingURL=v1ServerAddressByClientCIDR.js.map + +/***/ }), + +/***/ 90952: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Service = void 0; +/** +* Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy. +*/ +class V1Service { + static getAttributeTypeMap() { + return V1Service.attributeTypeMap; + } +} +exports.V1Service = V1Service; +V1Service.discriminator = undefined; +V1Service.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1ServiceSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1ServiceStatus" + } +]; +//# sourceMappingURL=v1Service.js.map + +/***/ }), + +/***/ 92117: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ServiceAccount = void 0; +/** +* ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets +*/ +class V1ServiceAccount { + static getAttributeTypeMap() { + return V1ServiceAccount.attributeTypeMap; + } +} +exports.V1ServiceAccount = V1ServiceAccount; +V1ServiceAccount.discriminator = undefined; +V1ServiceAccount.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "automountServiceAccountToken", + "baseName": "automountServiceAccountToken", + "type": "boolean" + }, + { + "name": "imagePullSecrets", + "baseName": "imagePullSecrets", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "secrets", + "baseName": "secrets", + "type": "Array" + } +]; +//# sourceMappingURL=v1ServiceAccount.js.map + +/***/ }), + +/***/ 13228: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ServiceAccountList = void 0; +/** +* ServiceAccountList is a list of ServiceAccount objects +*/ +class V1ServiceAccountList { + static getAttributeTypeMap() { + return V1ServiceAccountList.attributeTypeMap; + } +} +exports.V1ServiceAccountList = V1ServiceAccountList; +V1ServiceAccountList.discriminator = undefined; +V1ServiceAccountList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ServiceAccountList.js.map + +/***/ }), + +/***/ 55739: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ServiceAccountTokenProjection = void 0; +/** +* ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). +*/ +class V1ServiceAccountTokenProjection { + static getAttributeTypeMap() { + return V1ServiceAccountTokenProjection.attributeTypeMap; + } +} +exports.V1ServiceAccountTokenProjection = V1ServiceAccountTokenProjection; +V1ServiceAccountTokenProjection.discriminator = undefined; +V1ServiceAccountTokenProjection.attributeTypeMap = [ + { + "name": "audience", + "baseName": "audience", + "type": "string" + }, + { + "name": "expirationSeconds", + "baseName": "expirationSeconds", + "type": "number" + }, + { + "name": "path", + "baseName": "path", + "type": "string" + } +]; +//# sourceMappingURL=v1ServiceAccountTokenProjection.js.map + +/***/ }), + +/***/ 8340: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ServiceBackendPort = void 0; +/** +* ServiceBackendPort is the service port being referenced. +*/ +class V1ServiceBackendPort { + static getAttributeTypeMap() { + return V1ServiceBackendPort.attributeTypeMap; + } +} +exports.V1ServiceBackendPort = V1ServiceBackendPort; +V1ServiceBackendPort.discriminator = undefined; +V1ServiceBackendPort.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "number", + "baseName": "number", + "type": "number" + } +]; +//# sourceMappingURL=v1ServiceBackendPort.js.map + +/***/ }), + +/***/ 3025: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ServiceList = void 0; +/** +* ServiceList holds a list of services. +*/ +class V1ServiceList { + static getAttributeTypeMap() { + return V1ServiceList.attributeTypeMap; + } +} +exports.V1ServiceList = V1ServiceList; +V1ServiceList.discriminator = undefined; +V1ServiceList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ServiceList.js.map + +/***/ }), + +/***/ 16093: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ServicePort = void 0; +/** +* ServicePort contains information on service\'s port. +*/ +class V1ServicePort { + static getAttributeTypeMap() { + return V1ServicePort.attributeTypeMap; + } +} +exports.V1ServicePort = V1ServicePort; +V1ServicePort.discriminator = undefined; +V1ServicePort.attributeTypeMap = [ + { + "name": "appProtocol", + "baseName": "appProtocol", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "nodePort", + "baseName": "nodePort", + "type": "number" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + }, + { + "name": "protocol", + "baseName": "protocol", + "type": "string" + }, + { + "name": "targetPort", + "baseName": "targetPort", + "type": "object" + } +]; +//# sourceMappingURL=v1ServicePort.js.map + +/***/ }), + +/***/ 56829: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ServiceSpec = void 0; +/** +* ServiceSpec describes the attributes that a user creates on a service. +*/ +class V1ServiceSpec { + static getAttributeTypeMap() { + return V1ServiceSpec.attributeTypeMap; + } +} +exports.V1ServiceSpec = V1ServiceSpec; +V1ServiceSpec.discriminator = undefined; +V1ServiceSpec.attributeTypeMap = [ + { + "name": "allocateLoadBalancerNodePorts", + "baseName": "allocateLoadBalancerNodePorts", + "type": "boolean" + }, + { + "name": "clusterIP", + "baseName": "clusterIP", + "type": "string" + }, + { + "name": "clusterIPs", + "baseName": "clusterIPs", + "type": "Array" + }, + { + "name": "externalIPs", + "baseName": "externalIPs", + "type": "Array" + }, + { + "name": "externalName", + "baseName": "externalName", + "type": "string" + }, + { + "name": "externalTrafficPolicy", + "baseName": "externalTrafficPolicy", + "type": "string" + }, + { + "name": "healthCheckNodePort", + "baseName": "healthCheckNodePort", + "type": "number" + }, + { + "name": "internalTrafficPolicy", + "baseName": "internalTrafficPolicy", + "type": "string" + }, + { + "name": "ipFamilies", + "baseName": "ipFamilies", + "type": "Array" + }, + { + "name": "ipFamilyPolicy", + "baseName": "ipFamilyPolicy", + "type": "string" + }, + { + "name": "loadBalancerClass", + "baseName": "loadBalancerClass", + "type": "string" + }, + { + "name": "loadBalancerIP", + "baseName": "loadBalancerIP", + "type": "string" + }, + { + "name": "loadBalancerSourceRanges", + "baseName": "loadBalancerSourceRanges", + "type": "Array" + }, + { + "name": "ports", + "baseName": "ports", + "type": "Array" + }, + { + "name": "publishNotReadyAddresses", + "baseName": "publishNotReadyAddresses", + "type": "boolean" + }, + { + "name": "selector", + "baseName": "selector", + "type": "{ [key: string]: string; }" + }, + { + "name": "sessionAffinity", + "baseName": "sessionAffinity", + "type": "string" + }, + { + "name": "sessionAffinityConfig", + "baseName": "sessionAffinityConfig", + "type": "V1SessionAffinityConfig" + }, + { + "name": "topologyKeys", + "baseName": "topologyKeys", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1ServiceSpec.js.map + +/***/ }), + +/***/ 1160: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ServiceStatus = void 0; +/** +* ServiceStatus represents the current status of a service. +*/ +class V1ServiceStatus { + static getAttributeTypeMap() { + return V1ServiceStatus.attributeTypeMap; + } +} +exports.V1ServiceStatus = V1ServiceStatus; +V1ServiceStatus.discriminator = undefined; +V1ServiceStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "loadBalancer", + "baseName": "loadBalancer", + "type": "V1LoadBalancerStatus" + } +]; +//# sourceMappingURL=v1ServiceStatus.js.map + +/***/ }), + +/***/ 83492: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SessionAffinityConfig = void 0; +/** +* SessionAffinityConfig represents the configurations of session affinity. +*/ +class V1SessionAffinityConfig { + static getAttributeTypeMap() { + return V1SessionAffinityConfig.attributeTypeMap; + } +} +exports.V1SessionAffinityConfig = V1SessionAffinityConfig; +V1SessionAffinityConfig.discriminator = undefined; +V1SessionAffinityConfig.attributeTypeMap = [ + { + "name": "clientIP", + "baseName": "clientIP", + "type": "V1ClientIPConfig" + } +]; +//# sourceMappingURL=v1SessionAffinityConfig.js.map + +/***/ }), + +/***/ 56698: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StatefulSet = void 0; +/** +* StatefulSet represents a set of pods with consistent identities. Identities are defined as: - Network: A single stable DNS and hostname. - Storage: As many VolumeClaims as requested. The StatefulSet guarantees that a given network identity will always map to the same storage identity. +*/ +class V1StatefulSet { + static getAttributeTypeMap() { + return V1StatefulSet.attributeTypeMap; + } +} +exports.V1StatefulSet = V1StatefulSet; +V1StatefulSet.discriminator = undefined; +V1StatefulSet.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1StatefulSetSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1StatefulSetStatus" + } +]; +//# sourceMappingURL=v1StatefulSet.js.map + +/***/ }), + +/***/ 80302: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StatefulSetCondition = void 0; +/** +* StatefulSetCondition describes the state of a statefulset at a certain point. +*/ +class V1StatefulSetCondition { + static getAttributeTypeMap() { + return V1StatefulSetCondition.attributeTypeMap; + } +} +exports.V1StatefulSetCondition = V1StatefulSetCondition; +V1StatefulSetCondition.discriminator = undefined; +V1StatefulSetCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1StatefulSetCondition.js.map + +/***/ }), + +/***/ 79979: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StatefulSetList = void 0; +/** +* StatefulSetList is a collection of StatefulSets. +*/ +class V1StatefulSetList { + static getAttributeTypeMap() { + return V1StatefulSetList.attributeTypeMap; + } +} +exports.V1StatefulSetList = V1StatefulSetList; +V1StatefulSetList.discriminator = undefined; +V1StatefulSetList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1StatefulSetList.js.map + +/***/ }), + +/***/ 85679: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StatefulSetSpec = void 0; +/** +* A StatefulSetSpec is the specification of a StatefulSet. +*/ +class V1StatefulSetSpec { + static getAttributeTypeMap() { + return V1StatefulSetSpec.attributeTypeMap; + } +} +exports.V1StatefulSetSpec = V1StatefulSetSpec; +V1StatefulSetSpec.discriminator = undefined; +V1StatefulSetSpec.attributeTypeMap = [ + { + "name": "podManagementPolicy", + "baseName": "podManagementPolicy", + "type": "string" + }, + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + }, + { + "name": "revisionHistoryLimit", + "baseName": "revisionHistoryLimit", + "type": "number" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + }, + { + "name": "serviceName", + "baseName": "serviceName", + "type": "string" + }, + { + "name": "template", + "baseName": "template", + "type": "V1PodTemplateSpec" + }, + { + "name": "updateStrategy", + "baseName": "updateStrategy", + "type": "V1StatefulSetUpdateStrategy" + }, + { + "name": "volumeClaimTemplates", + "baseName": "volumeClaimTemplates", + "type": "Array" + } +]; +//# sourceMappingURL=v1StatefulSetSpec.js.map + +/***/ }), + +/***/ 16910: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StatefulSetStatus = void 0; +/** +* StatefulSetStatus represents the current state of a StatefulSet. +*/ +class V1StatefulSetStatus { + static getAttributeTypeMap() { + return V1StatefulSetStatus.attributeTypeMap; + } +} +exports.V1StatefulSetStatus = V1StatefulSetStatus; +V1StatefulSetStatus.discriminator = undefined; +V1StatefulSetStatus.attributeTypeMap = [ + { + "name": "collisionCount", + "baseName": "collisionCount", + "type": "number" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "currentReplicas", + "baseName": "currentReplicas", + "type": "number" + }, + { + "name": "currentRevision", + "baseName": "currentRevision", + "type": "string" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + }, + { + "name": "readyReplicas", + "baseName": "readyReplicas", + "type": "number" + }, + { + "name": "replicas", + "baseName": "replicas", + "type": "number" + }, + { + "name": "updateRevision", + "baseName": "updateRevision", + "type": "string" + }, + { + "name": "updatedReplicas", + "baseName": "updatedReplicas", + "type": "number" + } +]; +//# sourceMappingURL=v1StatefulSetStatus.js.map + +/***/ }), + +/***/ 32755: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StatefulSetUpdateStrategy = void 0; +/** +* StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy. +*/ +class V1StatefulSetUpdateStrategy { + static getAttributeTypeMap() { + return V1StatefulSetUpdateStrategy.attributeTypeMap; + } +} +exports.V1StatefulSetUpdateStrategy = V1StatefulSetUpdateStrategy; +V1StatefulSetUpdateStrategy.discriminator = undefined; +V1StatefulSetUpdateStrategy.attributeTypeMap = [ + { + "name": "rollingUpdate", + "baseName": "rollingUpdate", + "type": "V1RollingUpdateStatefulSetStrategy" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1StatefulSetUpdateStrategy.js.map + +/***/ }), + +/***/ 32529: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Status = void 0; +/** +* Status is a return value for calls that don\'t return other objects. +*/ +class V1Status { + static getAttributeTypeMap() { + return V1Status.attributeTypeMap; + } +} +exports.V1Status = V1Status; +V1Status.discriminator = undefined; +V1Status.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "code", + "baseName": "code", + "type": "number" + }, + { + "name": "details", + "baseName": "details", + "type": "V1StatusDetails" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } +]; +//# sourceMappingURL=v1Status.js.map + +/***/ }), + +/***/ 59204: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StatusCause = void 0; +/** +* StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. +*/ +class V1StatusCause { + static getAttributeTypeMap() { + return V1StatusCause.attributeTypeMap; + } +} +exports.V1StatusCause = V1StatusCause; +V1StatusCause.discriminator = undefined; +V1StatusCause.attributeTypeMap = [ + { + "name": "field", + "baseName": "field", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + } +]; +//# sourceMappingURL=v1StatusCause.js.map + +/***/ }), + +/***/ 66551: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StatusDetails = void 0; +/** +* StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined. +*/ +class V1StatusDetails { + static getAttributeTypeMap() { + return V1StatusDetails.attributeTypeMap; + } +} +exports.V1StatusDetails = V1StatusDetails; +V1StatusDetails.discriminator = undefined; +V1StatusDetails.attributeTypeMap = [ + { + "name": "causes", + "baseName": "causes", + "type": "Array" + }, + { + "name": "group", + "baseName": "group", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "retryAfterSeconds", + "baseName": "retryAfterSeconds", + "type": "number" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + } +]; +//# sourceMappingURL=v1StatusDetails.js.map + +/***/ }), + +/***/ 38118: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StorageClass = void 0; +/** +* StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name. +*/ +class V1StorageClass { + static getAttributeTypeMap() { + return V1StorageClass.attributeTypeMap; + } +} +exports.V1StorageClass = V1StorageClass; +V1StorageClass.discriminator = undefined; +V1StorageClass.attributeTypeMap = [ + { + "name": "allowVolumeExpansion", + "baseName": "allowVolumeExpansion", + "type": "boolean" + }, + { + "name": "allowedTopologies", + "baseName": "allowedTopologies", + "type": "Array" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "mountOptions", + "baseName": "mountOptions", + "type": "Array" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "{ [key: string]: string; }" + }, + { + "name": "provisioner", + "baseName": "provisioner", + "type": "string" + }, + { + "name": "reclaimPolicy", + "baseName": "reclaimPolicy", + "type": "string" + }, + { + "name": "volumeBindingMode", + "baseName": "volumeBindingMode", + "type": "string" + } +]; +//# sourceMappingURL=v1StorageClass.js.map + +/***/ }), + +/***/ 8996: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StorageClassList = void 0; +/** +* StorageClassList is a collection of storage classes. +*/ +class V1StorageClassList { + static getAttributeTypeMap() { + return V1StorageClassList.attributeTypeMap; + } +} +exports.V1StorageClassList = V1StorageClassList; +V1StorageClassList.discriminator = undefined; +V1StorageClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1StorageClassList.js.map + +/***/ }), + +/***/ 64232: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StorageOSPersistentVolumeSource = void 0; +/** +* Represents a StorageOS persistent volume resource. +*/ +class V1StorageOSPersistentVolumeSource { + static getAttributeTypeMap() { + return V1StorageOSPersistentVolumeSource.attributeTypeMap; + } +} +exports.V1StorageOSPersistentVolumeSource = V1StorageOSPersistentVolumeSource; +V1StorageOSPersistentVolumeSource.discriminator = undefined; +V1StorageOSPersistentVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1ObjectReference" + }, + { + "name": "volumeName", + "baseName": "volumeName", + "type": "string" + }, + { + "name": "volumeNamespace", + "baseName": "volumeNamespace", + "type": "string" + } +]; +//# sourceMappingURL=v1StorageOSPersistentVolumeSource.js.map + +/***/ }), + +/***/ 83693: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1StorageOSVolumeSource = void 0; +/** +* Represents a StorageOS persistent volume resource. +*/ +class V1StorageOSVolumeSource { + static getAttributeTypeMap() { + return V1StorageOSVolumeSource.attributeTypeMap; + } +} +exports.V1StorageOSVolumeSource = V1StorageOSVolumeSource; +V1StorageOSVolumeSource.discriminator = undefined; +V1StorageOSVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "secretRef", + "baseName": "secretRef", + "type": "V1LocalObjectReference" + }, + { + "name": "volumeName", + "baseName": "volumeName", + "type": "string" + }, + { + "name": "volumeNamespace", + "baseName": "volumeNamespace", + "type": "string" + } +]; +//# sourceMappingURL=v1StorageOSVolumeSource.js.map + +/***/ }), + +/***/ 40489: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Subject = void 0; +/** +* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. +*/ +class V1Subject { + static getAttributeTypeMap() { + return V1Subject.attributeTypeMap; + } +} +exports.V1Subject = V1Subject; +V1Subject.discriminator = undefined; +V1Subject.attributeTypeMap = [ + { + "name": "apiGroup", + "baseName": "apiGroup", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + } +]; +//# sourceMappingURL=v1Subject.js.map + +/***/ }), + +/***/ 16836: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SubjectAccessReview = void 0; +/** +* SubjectAccessReview checks whether or not a user or group can perform an action. +*/ +class V1SubjectAccessReview { + static getAttributeTypeMap() { + return V1SubjectAccessReview.attributeTypeMap; + } +} +exports.V1SubjectAccessReview = V1SubjectAccessReview; +V1SubjectAccessReview.discriminator = undefined; +V1SubjectAccessReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1SubjectAccessReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1SubjectAccessReviewStatus" + } +]; +//# sourceMappingURL=v1SubjectAccessReview.js.map + +/***/ }), + +/***/ 8593: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SubjectAccessReviewSpec = void 0; +/** +* SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set +*/ +class V1SubjectAccessReviewSpec { + static getAttributeTypeMap() { + return V1SubjectAccessReviewSpec.attributeTypeMap; + } +} +exports.V1SubjectAccessReviewSpec = V1SubjectAccessReviewSpec; +V1SubjectAccessReviewSpec.discriminator = undefined; +V1SubjectAccessReviewSpec.attributeTypeMap = [ + { + "name": "extra", + "baseName": "extra", + "type": "{ [key: string]: Array; }" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array" + }, + { + "name": "nonResourceAttributes", + "baseName": "nonResourceAttributes", + "type": "V1NonResourceAttributes" + }, + { + "name": "resourceAttributes", + "baseName": "resourceAttributes", + "type": "V1ResourceAttributes" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + }, + { + "name": "user", + "baseName": "user", + "type": "string" + } +]; +//# sourceMappingURL=v1SubjectAccessReviewSpec.js.map + +/***/ }), + +/***/ 13679: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SubjectAccessReviewStatus = void 0; +/** +* SubjectAccessReviewStatus +*/ +class V1SubjectAccessReviewStatus { + static getAttributeTypeMap() { + return V1SubjectAccessReviewStatus.attributeTypeMap; + } +} +exports.V1SubjectAccessReviewStatus = V1SubjectAccessReviewStatus; +V1SubjectAccessReviewStatus.discriminator = undefined; +V1SubjectAccessReviewStatus.attributeTypeMap = [ + { + "name": "allowed", + "baseName": "allowed", + "type": "boolean" + }, + { + "name": "denied", + "baseName": "denied", + "type": "boolean" + }, + { + "name": "evaluationError", + "baseName": "evaluationError", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + } +]; +//# sourceMappingURL=v1SubjectAccessReviewStatus.js.map + +/***/ }), + +/***/ 65083: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1SubjectRulesReviewStatus = void 0; +/** +* SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it\'s safe to assume the subject has that permission, even if that list is incomplete. +*/ +class V1SubjectRulesReviewStatus { + static getAttributeTypeMap() { + return V1SubjectRulesReviewStatus.attributeTypeMap; + } +} +exports.V1SubjectRulesReviewStatus = V1SubjectRulesReviewStatus; +V1SubjectRulesReviewStatus.discriminator = undefined; +V1SubjectRulesReviewStatus.attributeTypeMap = [ + { + "name": "evaluationError", + "baseName": "evaluationError", + "type": "string" + }, + { + "name": "incomplete", + "baseName": "incomplete", + "type": "boolean" + }, + { + "name": "nonResourceRules", + "baseName": "nonResourceRules", + "type": "Array" + }, + { + "name": "resourceRules", + "baseName": "resourceRules", + "type": "Array" + } +]; +//# sourceMappingURL=v1SubjectRulesReviewStatus.js.map + +/***/ }), + +/***/ 74444: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Sysctl = void 0; +/** +* Sysctl defines a kernel parameter to be set +*/ +class V1Sysctl { + static getAttributeTypeMap() { + return V1Sysctl.attributeTypeMap; + } +} +exports.V1Sysctl = V1Sysctl; +V1Sysctl.discriminator = undefined; +V1Sysctl.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } +]; +//# sourceMappingURL=v1Sysctl.js.map + +/***/ }), + +/***/ 89082: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TCPSocketAction = void 0; +/** +* TCPSocketAction describes an action based on opening a socket +*/ +class V1TCPSocketAction { + static getAttributeTypeMap() { + return V1TCPSocketAction.attributeTypeMap; + } +} +exports.V1TCPSocketAction = V1TCPSocketAction; +V1TCPSocketAction.discriminator = undefined; +V1TCPSocketAction.attributeTypeMap = [ + { + "name": "host", + "baseName": "host", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "object" + } +]; +//# sourceMappingURL=v1TCPSocketAction.js.map + +/***/ }), + +/***/ 23946: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Taint = void 0; +/** +* The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint. +*/ +class V1Taint { + static getAttributeTypeMap() { + return V1Taint.attributeTypeMap; + } +} +exports.V1Taint = V1Taint; +V1Taint.discriminator = undefined; +V1Taint.attributeTypeMap = [ + { + "name": "effect", + "baseName": "effect", + "type": "string" + }, + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "timeAdded", + "baseName": "timeAdded", + "type": "Date" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } +]; +//# sourceMappingURL=v1Taint.js.map + +/***/ }), + +/***/ 21866: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TokenRequestSpec = void 0; +/** +* TokenRequestSpec contains client provided parameters of a token request. +*/ +class V1TokenRequestSpec { + static getAttributeTypeMap() { + return V1TokenRequestSpec.attributeTypeMap; + } +} +exports.V1TokenRequestSpec = V1TokenRequestSpec; +V1TokenRequestSpec.discriminator = undefined; +V1TokenRequestSpec.attributeTypeMap = [ + { + "name": "audiences", + "baseName": "audiences", + "type": "Array" + }, + { + "name": "boundObjectRef", + "baseName": "boundObjectRef", + "type": "V1BoundObjectReference" + }, + { + "name": "expirationSeconds", + "baseName": "expirationSeconds", + "type": "number" + } +]; +//# sourceMappingURL=v1TokenRequestSpec.js.map + +/***/ }), + +/***/ 24995: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TokenRequestStatus = void 0; +/** +* TokenRequestStatus is the result of a token request. +*/ +class V1TokenRequestStatus { + static getAttributeTypeMap() { + return V1TokenRequestStatus.attributeTypeMap; + } +} +exports.V1TokenRequestStatus = V1TokenRequestStatus; +V1TokenRequestStatus.discriminator = undefined; +V1TokenRequestStatus.attributeTypeMap = [ + { + "name": "expirationTimestamp", + "baseName": "expirationTimestamp", + "type": "Date" + }, + { + "name": "token", + "baseName": "token", + "type": "string" + } +]; +//# sourceMappingURL=v1TokenRequestStatus.js.map + +/***/ }), + +/***/ 55097: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TokenReview = void 0; +/** +* TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver. +*/ +class V1TokenReview { + static getAttributeTypeMap() { + return V1TokenReview.attributeTypeMap; + } +} +exports.V1TokenReview = V1TokenReview; +V1TokenReview.discriminator = undefined; +V1TokenReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1TokenReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1TokenReviewStatus" + } +]; +//# sourceMappingURL=v1TokenReview.js.map + +/***/ }), + +/***/ 46232: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TokenReviewSpec = void 0; +/** +* TokenReviewSpec is a description of the token authentication request. +*/ +class V1TokenReviewSpec { + static getAttributeTypeMap() { + return V1TokenReviewSpec.attributeTypeMap; + } +} +exports.V1TokenReviewSpec = V1TokenReviewSpec; +V1TokenReviewSpec.discriminator = undefined; +V1TokenReviewSpec.attributeTypeMap = [ + { + "name": "audiences", + "baseName": "audiences", + "type": "Array" + }, + { + "name": "token", + "baseName": "token", + "type": "string" + } +]; +//# sourceMappingURL=v1TokenReviewSpec.js.map + +/***/ }), + +/***/ 12917: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TokenReviewStatus = void 0; +/** +* TokenReviewStatus is the result of the token authentication request. +*/ +class V1TokenReviewStatus { + static getAttributeTypeMap() { + return V1TokenReviewStatus.attributeTypeMap; + } +} +exports.V1TokenReviewStatus = V1TokenReviewStatus; +V1TokenReviewStatus.discriminator = undefined; +V1TokenReviewStatus.attributeTypeMap = [ + { + "name": "audiences", + "baseName": "audiences", + "type": "Array" + }, + { + "name": "authenticated", + "baseName": "authenticated", + "type": "boolean" + }, + { + "name": "error", + "baseName": "error", + "type": "string" + }, + { + "name": "user", + "baseName": "user", + "type": "V1UserInfo" + } +]; +//# sourceMappingURL=v1TokenReviewStatus.js.map + +/***/ }), + +/***/ 68621: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Toleration = void 0; +/** +* The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . +*/ +class V1Toleration { + static getAttributeTypeMap() { + return V1Toleration.attributeTypeMap; + } +} +exports.V1Toleration = V1Toleration; +V1Toleration.discriminator = undefined; +V1Toleration.attributeTypeMap = [ + { + "name": "effect", + "baseName": "effect", + "type": "string" + }, + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string" + }, + { + "name": "tolerationSeconds", + "baseName": "tolerationSeconds", + "type": "number" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } +]; +//# sourceMappingURL=v1Toleration.js.map + +/***/ }), + +/***/ 20539: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TopologySelectorLabelRequirement = void 0; +/** +* A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future. +*/ +class V1TopologySelectorLabelRequirement { + static getAttributeTypeMap() { + return V1TopologySelectorLabelRequirement.attributeTypeMap; + } +} +exports.V1TopologySelectorLabelRequirement = V1TopologySelectorLabelRequirement; +V1TopologySelectorLabelRequirement.discriminator = undefined; +V1TopologySelectorLabelRequirement.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "values", + "baseName": "values", + "type": "Array" + } +]; +//# sourceMappingURL=v1TopologySelectorLabelRequirement.js.map + +/***/ }), + +/***/ 65455: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TopologySelectorTerm = void 0; +/** +* A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future. +*/ +class V1TopologySelectorTerm { + static getAttributeTypeMap() { + return V1TopologySelectorTerm.attributeTypeMap; + } +} +exports.V1TopologySelectorTerm = V1TopologySelectorTerm; +V1TopologySelectorTerm.discriminator = undefined; +V1TopologySelectorTerm.attributeTypeMap = [ + { + "name": "matchLabelExpressions", + "baseName": "matchLabelExpressions", + "type": "Array" + } +]; +//# sourceMappingURL=v1TopologySelectorTerm.js.map + +/***/ }), + +/***/ 37200: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TopologySpreadConstraint = void 0; +/** +* TopologySpreadConstraint specifies how to spread matching pods among the given topology. +*/ +class V1TopologySpreadConstraint { + static getAttributeTypeMap() { + return V1TopologySpreadConstraint.attributeTypeMap; + } +} +exports.V1TopologySpreadConstraint = V1TopologySpreadConstraint; +V1TopologySpreadConstraint.discriminator = undefined; +V1TopologySpreadConstraint.attributeTypeMap = [ + { + "name": "labelSelector", + "baseName": "labelSelector", + "type": "V1LabelSelector" + }, + { + "name": "maxSkew", + "baseName": "maxSkew", + "type": "number" + }, + { + "name": "topologyKey", + "baseName": "topologyKey", + "type": "string" + }, + { + "name": "whenUnsatisfiable", + "baseName": "whenUnsatisfiable", + "type": "string" + } +]; +//# sourceMappingURL=v1TopologySpreadConstraint.js.map + +/***/ }), + +/***/ 23732: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1TypedLocalObjectReference = void 0; +/** +* TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace. +*/ +class V1TypedLocalObjectReference { + static getAttributeTypeMap() { + return V1TypedLocalObjectReference.attributeTypeMap; + } +} +exports.V1TypedLocalObjectReference = V1TypedLocalObjectReference; +V1TypedLocalObjectReference.discriminator = undefined; +V1TypedLocalObjectReference.attributeTypeMap = [ + { + "name": "apiGroup", + "baseName": "apiGroup", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1TypedLocalObjectReference.js.map + +/***/ }), + +/***/ 23607: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1UserInfo = void 0; +/** +* UserInfo holds the information about the user needed to implement the user.Info interface. +*/ +class V1UserInfo { + static getAttributeTypeMap() { + return V1UserInfo.attributeTypeMap; + } +} +exports.V1UserInfo = V1UserInfo; +V1UserInfo.discriminator = undefined; +V1UserInfo.attributeTypeMap = [ + { + "name": "extra", + "baseName": "extra", + "type": "{ [key: string]: Array; }" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } +]; +//# sourceMappingURL=v1UserInfo.js.map + +/***/ }), + +/***/ 4752: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ValidatingWebhook = void 0; +/** +* ValidatingWebhook describes an admission webhook and the resources and operations it applies to. +*/ +class V1ValidatingWebhook { + static getAttributeTypeMap() { + return V1ValidatingWebhook.attributeTypeMap; + } +} +exports.V1ValidatingWebhook = V1ValidatingWebhook; +V1ValidatingWebhook.discriminator = undefined; +V1ValidatingWebhook.attributeTypeMap = [ + { + "name": "admissionReviewVersions", + "baseName": "admissionReviewVersions", + "type": "Array" + }, + { + "name": "clientConfig", + "baseName": "clientConfig", + "type": "AdmissionregistrationV1WebhookClientConfig" + }, + { + "name": "failurePolicy", + "baseName": "failurePolicy", + "type": "string" + }, + { + "name": "matchPolicy", + "baseName": "matchPolicy", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespaceSelector", + "baseName": "namespaceSelector", + "type": "V1LabelSelector" + }, + { + "name": "objectSelector", + "baseName": "objectSelector", + "type": "V1LabelSelector" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + }, + { + "name": "sideEffects", + "baseName": "sideEffects", + "type": "string" + }, + { + "name": "timeoutSeconds", + "baseName": "timeoutSeconds", + "type": "number" + } +]; +//# sourceMappingURL=v1ValidatingWebhook.js.map + +/***/ }), + +/***/ 11509: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ValidatingWebhookConfiguration = void 0; +/** +* ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. +*/ +class V1ValidatingWebhookConfiguration { + static getAttributeTypeMap() { + return V1ValidatingWebhookConfiguration.attributeTypeMap; + } +} +exports.V1ValidatingWebhookConfiguration = V1ValidatingWebhookConfiguration; +V1ValidatingWebhookConfiguration.discriminator = undefined; +V1ValidatingWebhookConfiguration.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array" + } +]; +//# sourceMappingURL=v1ValidatingWebhookConfiguration.js.map + +/***/ }), + +/***/ 69599: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1ValidatingWebhookConfigurationList = void 0; +/** +* ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. +*/ +class V1ValidatingWebhookConfigurationList { + static getAttributeTypeMap() { + return V1ValidatingWebhookConfigurationList.attributeTypeMap; + } +} +exports.V1ValidatingWebhookConfigurationList = V1ValidatingWebhookConfigurationList; +V1ValidatingWebhookConfigurationList.discriminator = undefined; +V1ValidatingWebhookConfigurationList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1ValidatingWebhookConfigurationList.js.map + +/***/ }), + +/***/ 7393: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1Volume = void 0; +/** +* Volume represents a named volume in a pod that may be accessed by any container in the pod. +*/ +class V1Volume { + static getAttributeTypeMap() { + return V1Volume.attributeTypeMap; + } +} +exports.V1Volume = V1Volume; +V1Volume.discriminator = undefined; +V1Volume.attributeTypeMap = [ + { + "name": "awsElasticBlockStore", + "baseName": "awsElasticBlockStore", + "type": "V1AWSElasticBlockStoreVolumeSource" + }, + { + "name": "azureDisk", + "baseName": "azureDisk", + "type": "V1AzureDiskVolumeSource" + }, + { + "name": "azureFile", + "baseName": "azureFile", + "type": "V1AzureFileVolumeSource" + }, + { + "name": "cephfs", + "baseName": "cephfs", + "type": "V1CephFSVolumeSource" + }, + { + "name": "cinder", + "baseName": "cinder", + "type": "V1CinderVolumeSource" + }, + { + "name": "configMap", + "baseName": "configMap", + "type": "V1ConfigMapVolumeSource" + }, + { + "name": "csi", + "baseName": "csi", + "type": "V1CSIVolumeSource" + }, + { + "name": "downwardAPI", + "baseName": "downwardAPI", + "type": "V1DownwardAPIVolumeSource" + }, + { + "name": "emptyDir", + "baseName": "emptyDir", + "type": "V1EmptyDirVolumeSource" + }, + { + "name": "ephemeral", + "baseName": "ephemeral", + "type": "V1EphemeralVolumeSource" + }, + { + "name": "fc", + "baseName": "fc", + "type": "V1FCVolumeSource" + }, + { + "name": "flexVolume", + "baseName": "flexVolume", + "type": "V1FlexVolumeSource" + }, + { + "name": "flocker", + "baseName": "flocker", + "type": "V1FlockerVolumeSource" + }, + { + "name": "gcePersistentDisk", + "baseName": "gcePersistentDisk", + "type": "V1GCEPersistentDiskVolumeSource" + }, + { + "name": "gitRepo", + "baseName": "gitRepo", + "type": "V1GitRepoVolumeSource" + }, + { + "name": "glusterfs", + "baseName": "glusterfs", + "type": "V1GlusterfsVolumeSource" + }, + { + "name": "hostPath", + "baseName": "hostPath", + "type": "V1HostPathVolumeSource" + }, + { + "name": "iscsi", + "baseName": "iscsi", + "type": "V1ISCSIVolumeSource" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "nfs", + "baseName": "nfs", + "type": "V1NFSVolumeSource" + }, + { + "name": "persistentVolumeClaim", + "baseName": "persistentVolumeClaim", + "type": "V1PersistentVolumeClaimVolumeSource" + }, + { + "name": "photonPersistentDisk", + "baseName": "photonPersistentDisk", + "type": "V1PhotonPersistentDiskVolumeSource" + }, + { + "name": "portworxVolume", + "baseName": "portworxVolume", + "type": "V1PortworxVolumeSource" + }, + { + "name": "projected", + "baseName": "projected", + "type": "V1ProjectedVolumeSource" + }, + { + "name": "quobyte", + "baseName": "quobyte", + "type": "V1QuobyteVolumeSource" + }, + { + "name": "rbd", + "baseName": "rbd", + "type": "V1RBDVolumeSource" + }, + { + "name": "scaleIO", + "baseName": "scaleIO", + "type": "V1ScaleIOVolumeSource" + }, + { + "name": "secret", + "baseName": "secret", + "type": "V1SecretVolumeSource" + }, + { + "name": "storageos", + "baseName": "storageos", + "type": "V1StorageOSVolumeSource" + }, + { + "name": "vsphereVolume", + "baseName": "vsphereVolume", + "type": "V1VsphereVirtualDiskVolumeSource" + } +]; +//# sourceMappingURL=v1Volume.js.map + +/***/ }), + +/***/ 80624: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeAttachment = void 0; +/** +* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced. +*/ +class V1VolumeAttachment { + static getAttributeTypeMap() { + return V1VolumeAttachment.attributeTypeMap; + } +} +exports.V1VolumeAttachment = V1VolumeAttachment; +V1VolumeAttachment.discriminator = undefined; +V1VolumeAttachment.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1VolumeAttachmentSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1VolumeAttachmentStatus" + } +]; +//# sourceMappingURL=v1VolumeAttachment.js.map + +/***/ }), + +/***/ 36604: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeAttachmentList = void 0; +/** +* VolumeAttachmentList is a collection of VolumeAttachment objects. +*/ +class V1VolumeAttachmentList { + static getAttributeTypeMap() { + return V1VolumeAttachmentList.attributeTypeMap; + } +} +exports.V1VolumeAttachmentList = V1VolumeAttachmentList; +V1VolumeAttachmentList.discriminator = undefined; +V1VolumeAttachmentList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1VolumeAttachmentList.js.map + +/***/ }), + +/***/ 34472: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeAttachmentSource = void 0; +/** +* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. +*/ +class V1VolumeAttachmentSource { + static getAttributeTypeMap() { + return V1VolumeAttachmentSource.attributeTypeMap; + } +} +exports.V1VolumeAttachmentSource = V1VolumeAttachmentSource; +V1VolumeAttachmentSource.discriminator = undefined; +V1VolumeAttachmentSource.attributeTypeMap = [ + { + "name": "inlineVolumeSpec", + "baseName": "inlineVolumeSpec", + "type": "V1PersistentVolumeSpec" + }, + { + "name": "persistentVolumeName", + "baseName": "persistentVolumeName", + "type": "string" + } +]; +//# sourceMappingURL=v1VolumeAttachmentSource.js.map + +/***/ }), + +/***/ 15521: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeAttachmentSpec = void 0; +/** +* VolumeAttachmentSpec is the specification of a VolumeAttachment request. +*/ +class V1VolumeAttachmentSpec { + static getAttributeTypeMap() { + return V1VolumeAttachmentSpec.attributeTypeMap; + } +} +exports.V1VolumeAttachmentSpec = V1VolumeAttachmentSpec; +V1VolumeAttachmentSpec.discriminator = undefined; +V1VolumeAttachmentSpec.attributeTypeMap = [ + { + "name": "attacher", + "baseName": "attacher", + "type": "string" + }, + { + "name": "nodeName", + "baseName": "nodeName", + "type": "string" + }, + { + "name": "source", + "baseName": "source", + "type": "V1VolumeAttachmentSource" + } +]; +//# sourceMappingURL=v1VolumeAttachmentSpec.js.map + +/***/ }), + +/***/ 5306: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeAttachmentStatus = void 0; +/** +* VolumeAttachmentStatus is the status of a VolumeAttachment request. +*/ +class V1VolumeAttachmentStatus { + static getAttributeTypeMap() { + return V1VolumeAttachmentStatus.attributeTypeMap; + } +} +exports.V1VolumeAttachmentStatus = V1VolumeAttachmentStatus; +V1VolumeAttachmentStatus.discriminator = undefined; +V1VolumeAttachmentStatus.attributeTypeMap = [ + { + "name": "attachError", + "baseName": "attachError", + "type": "V1VolumeError" + }, + { + "name": "attached", + "baseName": "attached", + "type": "boolean" + }, + { + "name": "attachmentMetadata", + "baseName": "attachmentMetadata", + "type": "{ [key: string]: string; }" + }, + { + "name": "detachError", + "baseName": "detachError", + "type": "V1VolumeError" + } +]; +//# sourceMappingURL=v1VolumeAttachmentStatus.js.map + +/***/ }), + +/***/ 88958: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeDevice = void 0; +/** +* volumeDevice describes a mapping of a raw block device within a container. +*/ +class V1VolumeDevice { + static getAttributeTypeMap() { + return V1VolumeDevice.attributeTypeMap; + } +} +exports.V1VolumeDevice = V1VolumeDevice; +V1VolumeDevice.discriminator = undefined; +V1VolumeDevice.attributeTypeMap = [ + { + "name": "devicePath", + "baseName": "devicePath", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1VolumeDevice.js.map + +/***/ }), + +/***/ 42776: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeError = void 0; +/** +* VolumeError captures an error encountered during a volume operation. +*/ +class V1VolumeError { + static getAttributeTypeMap() { + return V1VolumeError.attributeTypeMap; + } +} +exports.V1VolumeError = V1VolumeError; +V1VolumeError.discriminator = undefined; +V1VolumeError.attributeTypeMap = [ + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "time", + "baseName": "time", + "type": "Date" + } +]; +//# sourceMappingURL=v1VolumeError.js.map + +/***/ }), + +/***/ 40497: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeMount = void 0; +/** +* VolumeMount describes a mounting of a Volume within a container. +*/ +class V1VolumeMount { + static getAttributeTypeMap() { + return V1VolumeMount.attributeTypeMap; + } +} +exports.V1VolumeMount = V1VolumeMount; +V1VolumeMount.discriminator = undefined; +V1VolumeMount.attributeTypeMap = [ + { + "name": "mountPath", + "baseName": "mountPath", + "type": "string" + }, + { + "name": "mountPropagation", + "baseName": "mountPropagation", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + }, + { + "name": "subPath", + "baseName": "subPath", + "type": "string" + }, + { + "name": "subPathExpr", + "baseName": "subPathExpr", + "type": "string" + } +]; +//# sourceMappingURL=v1VolumeMount.js.map + +/***/ }), + +/***/ 20446: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeNodeAffinity = void 0; +/** +* VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. +*/ +class V1VolumeNodeAffinity { + static getAttributeTypeMap() { + return V1VolumeNodeAffinity.attributeTypeMap; + } +} +exports.V1VolumeNodeAffinity = V1VolumeNodeAffinity; +V1VolumeNodeAffinity.discriminator = undefined; +V1VolumeNodeAffinity.attributeTypeMap = [ + { + "name": "required", + "baseName": "required", + "type": "V1NodeSelector" + } +]; +//# sourceMappingURL=v1VolumeNodeAffinity.js.map + +/***/ }), + +/***/ 2865: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeNodeResources = void 0; +/** +* VolumeNodeResources is a set of resource limits for scheduling of volumes. +*/ +class V1VolumeNodeResources { + static getAttributeTypeMap() { + return V1VolumeNodeResources.attributeTypeMap; + } +} +exports.V1VolumeNodeResources = V1VolumeNodeResources; +V1VolumeNodeResources.discriminator = undefined; +V1VolumeNodeResources.attributeTypeMap = [ + { + "name": "count", + "baseName": "count", + "type": "number" + } +]; +//# sourceMappingURL=v1VolumeNodeResources.js.map + +/***/ }), + +/***/ 9155: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VolumeProjection = void 0; +/** +* Projection that may be projected along with other supported volume types +*/ +class V1VolumeProjection { + static getAttributeTypeMap() { + return V1VolumeProjection.attributeTypeMap; + } +} +exports.V1VolumeProjection = V1VolumeProjection; +V1VolumeProjection.discriminator = undefined; +V1VolumeProjection.attributeTypeMap = [ + { + "name": "configMap", + "baseName": "configMap", + "type": "V1ConfigMapProjection" + }, + { + "name": "downwardAPI", + "baseName": "downwardAPI", + "type": "V1DownwardAPIProjection" + }, + { + "name": "secret", + "baseName": "secret", + "type": "V1SecretProjection" + }, + { + "name": "serviceAccountToken", + "baseName": "serviceAccountToken", + "type": "V1ServiceAccountTokenProjection" + } +]; +//# sourceMappingURL=v1VolumeProjection.js.map + +/***/ }), + +/***/ 867: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1VsphereVirtualDiskVolumeSource = void 0; +/** +* Represents a vSphere volume resource. +*/ +class V1VsphereVirtualDiskVolumeSource { + static getAttributeTypeMap() { + return V1VsphereVirtualDiskVolumeSource.attributeTypeMap; + } +} +exports.V1VsphereVirtualDiskVolumeSource = V1VsphereVirtualDiskVolumeSource; +V1VsphereVirtualDiskVolumeSource.discriminator = undefined; +V1VsphereVirtualDiskVolumeSource.attributeTypeMap = [ + { + "name": "fsType", + "baseName": "fsType", + "type": "string" + }, + { + "name": "storagePolicyID", + "baseName": "storagePolicyID", + "type": "string" + }, + { + "name": "storagePolicyName", + "baseName": "storagePolicyName", + "type": "string" + }, + { + "name": "volumePath", + "baseName": "volumePath", + "type": "string" + } +]; +//# sourceMappingURL=v1VsphereVirtualDiskVolumeSource.js.map + +/***/ }), + +/***/ 67972: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1WatchEvent = void 0; +/** +* Event represents a single event to a watched resource. +*/ +class V1WatchEvent { + static getAttributeTypeMap() { + return V1WatchEvent.attributeTypeMap; + } +} +exports.V1WatchEvent = V1WatchEvent; +V1WatchEvent.discriminator = undefined; +V1WatchEvent.attributeTypeMap = [ + { + "name": "object", + "baseName": "object", + "type": "object" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1WatchEvent.js.map + +/***/ }), + +/***/ 19183: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1WebhookConversion = void 0; +/** +* WebhookConversion describes how to call a conversion webhook +*/ +class V1WebhookConversion { + static getAttributeTypeMap() { + return V1WebhookConversion.attributeTypeMap; + } +} +exports.V1WebhookConversion = V1WebhookConversion; +V1WebhookConversion.discriminator = undefined; +V1WebhookConversion.attributeTypeMap = [ + { + "name": "clientConfig", + "baseName": "clientConfig", + "type": "ApiextensionsV1WebhookClientConfig" + }, + { + "name": "conversionReviewVersions", + "baseName": "conversionReviewVersions", + "type": "Array" + } +]; +//# sourceMappingURL=v1WebhookConversion.js.map + +/***/ }), + +/***/ 29289: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1WeightedPodAffinityTerm = void 0; +/** +* The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) +*/ +class V1WeightedPodAffinityTerm { + static getAttributeTypeMap() { + return V1WeightedPodAffinityTerm.attributeTypeMap; + } +} +exports.V1WeightedPodAffinityTerm = V1WeightedPodAffinityTerm; +V1WeightedPodAffinityTerm.discriminator = undefined; +V1WeightedPodAffinityTerm.attributeTypeMap = [ + { + "name": "podAffinityTerm", + "baseName": "podAffinityTerm", + "type": "V1PodAffinityTerm" + }, + { + "name": "weight", + "baseName": "weight", + "type": "number" + } +]; +//# sourceMappingURL=v1WeightedPodAffinityTerm.js.map + +/***/ }), + +/***/ 40789: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1WindowsSecurityContextOptions = void 0; +/** +* WindowsSecurityContextOptions contain Windows-specific options and credentials. +*/ +class V1WindowsSecurityContextOptions { + static getAttributeTypeMap() { + return V1WindowsSecurityContextOptions.attributeTypeMap; + } +} +exports.V1WindowsSecurityContextOptions = V1WindowsSecurityContextOptions; +V1WindowsSecurityContextOptions.discriminator = undefined; +V1WindowsSecurityContextOptions.attributeTypeMap = [ + { + "name": "gmsaCredentialSpec", + "baseName": "gmsaCredentialSpec", + "type": "string" + }, + { + "name": "gmsaCredentialSpecName", + "baseName": "gmsaCredentialSpecName", + "type": "string" + }, + { + "name": "runAsUserName", + "baseName": "runAsUserName", + "type": "string" + } +]; +//# sourceMappingURL=v1WindowsSecurityContextOptions.js.map + +/***/ }), + +/***/ 87558: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1AggregationRule = void 0; +/** +* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole +*/ +class V1alpha1AggregationRule { + static getAttributeTypeMap() { + return V1alpha1AggregationRule.attributeTypeMap; + } +} +exports.V1alpha1AggregationRule = V1alpha1AggregationRule; +V1alpha1AggregationRule.discriminator = undefined; +V1alpha1AggregationRule.attributeTypeMap = [ + { + "name": "clusterRoleSelectors", + "baseName": "clusterRoleSelectors", + "type": "Array" + } +]; +//# sourceMappingURL=v1alpha1AggregationRule.js.map + +/***/ }), + +/***/ 76021: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1CSIStorageCapacity = void 0; +/** +* CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. For example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\" The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero The producer of these objects can decide which approach is more suitable. They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +*/ +class V1alpha1CSIStorageCapacity { + static getAttributeTypeMap() { + return V1alpha1CSIStorageCapacity.attributeTypeMap; + } +} +exports.V1alpha1CSIStorageCapacity = V1alpha1CSIStorageCapacity; +V1alpha1CSIStorageCapacity.discriminator = undefined; +V1alpha1CSIStorageCapacity.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "capacity", + "baseName": "capacity", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "maximumVolumeSize", + "baseName": "maximumVolumeSize", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "nodeTopology", + "baseName": "nodeTopology", + "type": "V1LabelSelector" + }, + { + "name": "storageClassName", + "baseName": "storageClassName", + "type": "string" + } +]; +//# sourceMappingURL=v1alpha1CSIStorageCapacity.js.map + +/***/ }), + +/***/ 80242: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1CSIStorageCapacityList = void 0; +/** +* CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +*/ +class V1alpha1CSIStorageCapacityList { + static getAttributeTypeMap() { + return V1alpha1CSIStorageCapacityList.attributeTypeMap; + } +} +exports.V1alpha1CSIStorageCapacityList = V1alpha1CSIStorageCapacityList; +V1alpha1CSIStorageCapacityList.discriminator = undefined; +V1alpha1CSIStorageCapacityList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1alpha1CSIStorageCapacityList.js.map + +/***/ }), + +/***/ 29217: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1ClusterRole = void 0; +/** +* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. +*/ +class V1alpha1ClusterRole { + static getAttributeTypeMap() { + return V1alpha1ClusterRole.attributeTypeMap; + } +} +exports.V1alpha1ClusterRole = V1alpha1ClusterRole; +V1alpha1ClusterRole.discriminator = undefined; +V1alpha1ClusterRole.attributeTypeMap = [ + { + "name": "aggregationRule", + "baseName": "aggregationRule", + "type": "V1alpha1AggregationRule" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + } +]; +//# sourceMappingURL=v1alpha1ClusterRole.js.map + +/***/ }), + +/***/ 37246: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1ClusterRoleBinding = void 0; +/** +* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. +*/ +class V1alpha1ClusterRoleBinding { + static getAttributeTypeMap() { + return V1alpha1ClusterRoleBinding.attributeTypeMap; + } +} +exports.V1alpha1ClusterRoleBinding = V1alpha1ClusterRoleBinding; +V1alpha1ClusterRoleBinding.discriminator = undefined; +V1alpha1ClusterRoleBinding.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "roleRef", + "baseName": "roleRef", + "type": "V1alpha1RoleRef" + }, + { + "name": "subjects", + "baseName": "subjects", + "type": "Array" + } +]; +//# sourceMappingURL=v1alpha1ClusterRoleBinding.js.map + +/***/ }), + +/***/ 70270: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1ClusterRoleBindingList = void 0; +/** +* ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22. +*/ +class V1alpha1ClusterRoleBindingList { + static getAttributeTypeMap() { + return V1alpha1ClusterRoleBindingList.attributeTypeMap; + } +} +exports.V1alpha1ClusterRoleBindingList = V1alpha1ClusterRoleBindingList; +V1alpha1ClusterRoleBindingList.discriminator = undefined; +V1alpha1ClusterRoleBindingList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1alpha1ClusterRoleBindingList.js.map + +/***/ }), + +/***/ 66963: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1ClusterRoleList = void 0; +/** +* ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22. +*/ +class V1alpha1ClusterRoleList { + static getAttributeTypeMap() { + return V1alpha1ClusterRoleList.attributeTypeMap; + } +} +exports.V1alpha1ClusterRoleList = V1alpha1ClusterRoleList; +V1alpha1ClusterRoleList.discriminator = undefined; +V1alpha1ClusterRoleList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1alpha1ClusterRoleList.js.map + +/***/ }), + +/***/ 66233: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1Overhead = void 0; +/** +* Overhead structure represents the resource overhead associated with running a pod. +*/ +class V1alpha1Overhead { + static getAttributeTypeMap() { + return V1alpha1Overhead.attributeTypeMap; + } +} +exports.V1alpha1Overhead = V1alpha1Overhead; +V1alpha1Overhead.discriminator = undefined; +V1alpha1Overhead.attributeTypeMap = [ + { + "name": "podFixed", + "baseName": "podFixed", + "type": "{ [key: string]: string; }" + } +]; +//# sourceMappingURL=v1alpha1Overhead.js.map + +/***/ }), + +/***/ 50140: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1PolicyRule = void 0; +/** +* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. +*/ +class V1alpha1PolicyRule { + static getAttributeTypeMap() { + return V1alpha1PolicyRule.attributeTypeMap; + } +} +exports.V1alpha1PolicyRule = V1alpha1PolicyRule; +V1alpha1PolicyRule.discriminator = undefined; +V1alpha1PolicyRule.attributeTypeMap = [ + { + "name": "apiGroups", + "baseName": "apiGroups", + "type": "Array" + }, + { + "name": "nonResourceURLs", + "baseName": "nonResourceURLs", + "type": "Array" + }, + { + "name": "resourceNames", + "baseName": "resourceNames", + "type": "Array" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + } +]; +//# sourceMappingURL=v1alpha1PolicyRule.js.map + +/***/ }), + +/***/ 93273: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1PriorityClass = void 0; +/** +* DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. +*/ +class V1alpha1PriorityClass { + static getAttributeTypeMap() { + return V1alpha1PriorityClass.attributeTypeMap; + } +} +exports.V1alpha1PriorityClass = V1alpha1PriorityClass; +V1alpha1PriorityClass.discriminator = undefined; +V1alpha1PriorityClass.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "globalDefault", + "baseName": "globalDefault", + "type": "boolean" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "preemptionPolicy", + "baseName": "preemptionPolicy", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } +]; +//# sourceMappingURL=v1alpha1PriorityClass.js.map + +/***/ }), + +/***/ 45566: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1PriorityClassList = void 0; +/** +* PriorityClassList is a collection of priority classes. +*/ +class V1alpha1PriorityClassList { + static getAttributeTypeMap() { + return V1alpha1PriorityClassList.attributeTypeMap; + } +} +exports.V1alpha1PriorityClassList = V1alpha1PriorityClassList; +V1alpha1PriorityClassList.discriminator = undefined; +V1alpha1PriorityClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1alpha1PriorityClassList.js.map + +/***/ }), + +/***/ 10592: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1Role = void 0; +/** +* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. +*/ +class V1alpha1Role { + static getAttributeTypeMap() { + return V1alpha1Role.attributeTypeMap; + } +} +exports.V1alpha1Role = V1alpha1Role; +V1alpha1Role.discriminator = undefined; +V1alpha1Role.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + } +]; +//# sourceMappingURL=v1alpha1Role.js.map + +/***/ }), + +/***/ 50506: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1RoleBinding = void 0; +/** +* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. +*/ +class V1alpha1RoleBinding { + static getAttributeTypeMap() { + return V1alpha1RoleBinding.attributeTypeMap; + } +} +exports.V1alpha1RoleBinding = V1alpha1RoleBinding; +V1alpha1RoleBinding.discriminator = undefined; +V1alpha1RoleBinding.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "roleRef", + "baseName": "roleRef", + "type": "V1alpha1RoleRef" + }, + { + "name": "subjects", + "baseName": "subjects", + "type": "Array" + } +]; +//# sourceMappingURL=v1alpha1RoleBinding.js.map + +/***/ }), + +/***/ 5981: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1RoleBindingList = void 0; +/** +* RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22. +*/ +class V1alpha1RoleBindingList { + static getAttributeTypeMap() { + return V1alpha1RoleBindingList.attributeTypeMap; + } +} +exports.V1alpha1RoleBindingList = V1alpha1RoleBindingList; +V1alpha1RoleBindingList.discriminator = undefined; +V1alpha1RoleBindingList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1alpha1RoleBindingList.js.map + +/***/ }), + +/***/ 17478: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1RoleList = void 0; +/** +* RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22. +*/ +class V1alpha1RoleList { + static getAttributeTypeMap() { + return V1alpha1RoleList.attributeTypeMap; + } +} +exports.V1alpha1RoleList = V1alpha1RoleList; +V1alpha1RoleList.discriminator = undefined; +V1alpha1RoleList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1alpha1RoleList.js.map + +/***/ }), + +/***/ 8030: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1RoleRef = void 0; +/** +* RoleRef contains information that points to the role being used +*/ +class V1alpha1RoleRef { + static getAttributeTypeMap() { + return V1alpha1RoleRef.attributeTypeMap; + } +} +exports.V1alpha1RoleRef = V1alpha1RoleRef; +V1alpha1RoleRef.discriminator = undefined; +V1alpha1RoleRef.attributeTypeMap = [ + { + "name": "apiGroup", + "baseName": "apiGroup", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1alpha1RoleRef.js.map + +/***/ }), + +/***/ 27837: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1RuntimeClass = void 0; +/** +* RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md +*/ +class V1alpha1RuntimeClass { + static getAttributeTypeMap() { + return V1alpha1RuntimeClass.attributeTypeMap; + } +} +exports.V1alpha1RuntimeClass = V1alpha1RuntimeClass; +V1alpha1RuntimeClass.discriminator = undefined; +V1alpha1RuntimeClass.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1alpha1RuntimeClassSpec" + } +]; +//# sourceMappingURL=v1alpha1RuntimeClass.js.map + +/***/ }), + +/***/ 86708: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1RuntimeClassList = void 0; +/** +* RuntimeClassList is a list of RuntimeClass objects. +*/ +class V1alpha1RuntimeClassList { + static getAttributeTypeMap() { + return V1alpha1RuntimeClassList.attributeTypeMap; + } +} +exports.V1alpha1RuntimeClassList = V1alpha1RuntimeClassList; +V1alpha1RuntimeClassList.discriminator = undefined; +V1alpha1RuntimeClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1alpha1RuntimeClassList.js.map + +/***/ }), + +/***/ 44061: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1RuntimeClassSpec = void 0; +/** +* RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable. +*/ +class V1alpha1RuntimeClassSpec { + static getAttributeTypeMap() { + return V1alpha1RuntimeClassSpec.attributeTypeMap; + } +} +exports.V1alpha1RuntimeClassSpec = V1alpha1RuntimeClassSpec; +V1alpha1RuntimeClassSpec.discriminator = undefined; +V1alpha1RuntimeClassSpec.attributeTypeMap = [ + { + "name": "overhead", + "baseName": "overhead", + "type": "V1alpha1Overhead" + }, + { + "name": "runtimeHandler", + "baseName": "runtimeHandler", + "type": "string" + }, + { + "name": "scheduling", + "baseName": "scheduling", + "type": "V1alpha1Scheduling" + } +]; +//# sourceMappingURL=v1alpha1RuntimeClassSpec.js.map + +/***/ }), + +/***/ 95862: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1Scheduling = void 0; +/** +* Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. +*/ +class V1alpha1Scheduling { + static getAttributeTypeMap() { + return V1alpha1Scheduling.attributeTypeMap; + } +} +exports.V1alpha1Scheduling = V1alpha1Scheduling; +V1alpha1Scheduling.discriminator = undefined; +V1alpha1Scheduling.attributeTypeMap = [ + { + "name": "nodeSelector", + "baseName": "nodeSelector", + "type": "{ [key: string]: string; }" + }, + { + "name": "tolerations", + "baseName": "tolerations", + "type": "Array" + } +]; +//# sourceMappingURL=v1alpha1Scheduling.js.map + +/***/ }), + +/***/ 69438: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1ServerStorageVersion = void 0; +/** +* An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend. +*/ +class V1alpha1ServerStorageVersion { + static getAttributeTypeMap() { + return V1alpha1ServerStorageVersion.attributeTypeMap; + } +} +exports.V1alpha1ServerStorageVersion = V1alpha1ServerStorageVersion; +V1alpha1ServerStorageVersion.discriminator = undefined; +V1alpha1ServerStorageVersion.attributeTypeMap = [ + { + "name": "apiServerID", + "baseName": "apiServerID", + "type": "string" + }, + { + "name": "decodableVersions", + "baseName": "decodableVersions", + "type": "Array" + }, + { + "name": "encodingVersion", + "baseName": "encodingVersion", + "type": "string" + } +]; +//# sourceMappingURL=v1alpha1ServerStorageVersion.js.map + +/***/ }), + +/***/ 21599: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1StorageVersion = void 0; +/** +* Storage version of a specific resource. +*/ +class V1alpha1StorageVersion { + static getAttributeTypeMap() { + return V1alpha1StorageVersion.attributeTypeMap; + } +} +exports.V1alpha1StorageVersion = V1alpha1StorageVersion; +V1alpha1StorageVersion.discriminator = undefined; +V1alpha1StorageVersion.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "object" + }, + { + "name": "status", + "baseName": "status", + "type": "V1alpha1StorageVersionStatus" + } +]; +//# sourceMappingURL=v1alpha1StorageVersion.js.map + +/***/ }), + +/***/ 1565: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1StorageVersionCondition = void 0; +/** +* Describes the state of the storageVersion at a certain point. +*/ +class V1alpha1StorageVersionCondition { + static getAttributeTypeMap() { + return V1alpha1StorageVersionCondition.attributeTypeMap; + } +} +exports.V1alpha1StorageVersionCondition = V1alpha1StorageVersionCondition; +V1alpha1StorageVersionCondition.discriminator = undefined; +V1alpha1StorageVersionCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1alpha1StorageVersionCondition.js.map + +/***/ }), + +/***/ 60786: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1StorageVersionList = void 0; +/** +* A list of StorageVersions. +*/ +class V1alpha1StorageVersionList { + static getAttributeTypeMap() { + return V1alpha1StorageVersionList.attributeTypeMap; + } +} +exports.V1alpha1StorageVersionList = V1alpha1StorageVersionList; +V1alpha1StorageVersionList.discriminator = undefined; +V1alpha1StorageVersionList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1alpha1StorageVersionList.js.map + +/***/ }), + +/***/ 5589: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1StorageVersionStatus = void 0; +/** +* API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend. +*/ +class V1alpha1StorageVersionStatus { + static getAttributeTypeMap() { + return V1alpha1StorageVersionStatus.attributeTypeMap; + } +} +exports.V1alpha1StorageVersionStatus = V1alpha1StorageVersionStatus; +V1alpha1StorageVersionStatus.discriminator = undefined; +V1alpha1StorageVersionStatus.attributeTypeMap = [ + { + "name": "commonEncodingVersion", + "baseName": "commonEncodingVersion", + "type": "string" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "storageVersions", + "baseName": "storageVersions", + "type": "Array" + } +]; +//# sourceMappingURL=v1alpha1StorageVersionStatus.js.map + +/***/ }), + +/***/ 11459: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1Subject = void 0; +/** +* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. +*/ +class V1alpha1Subject { + static getAttributeTypeMap() { + return V1alpha1Subject.attributeTypeMap; + } +} +exports.V1alpha1Subject = V1alpha1Subject; +V1alpha1Subject.discriminator = undefined; +V1alpha1Subject.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + } +]; +//# sourceMappingURL=v1alpha1Subject.js.map + +/***/ }), + +/***/ 98725: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1VolumeAttachment = void 0; +/** +* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced. +*/ +class V1alpha1VolumeAttachment { + static getAttributeTypeMap() { + return V1alpha1VolumeAttachment.attributeTypeMap; + } +} +exports.V1alpha1VolumeAttachment = V1alpha1VolumeAttachment; +V1alpha1VolumeAttachment.discriminator = undefined; +V1alpha1VolumeAttachment.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1alpha1VolumeAttachmentSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1alpha1VolumeAttachmentStatus" + } +]; +//# sourceMappingURL=v1alpha1VolumeAttachment.js.map + +/***/ }), + +/***/ 65396: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1VolumeAttachmentList = void 0; +/** +* VolumeAttachmentList is a collection of VolumeAttachment objects. +*/ +class V1alpha1VolumeAttachmentList { + static getAttributeTypeMap() { + return V1alpha1VolumeAttachmentList.attributeTypeMap; + } +} +exports.V1alpha1VolumeAttachmentList = V1alpha1VolumeAttachmentList; +V1alpha1VolumeAttachmentList.discriminator = undefined; +V1alpha1VolumeAttachmentList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1alpha1VolumeAttachmentList.js.map + +/***/ }), + +/***/ 9575: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1VolumeAttachmentSource = void 0; +/** +* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. +*/ +class V1alpha1VolumeAttachmentSource { + static getAttributeTypeMap() { + return V1alpha1VolumeAttachmentSource.attributeTypeMap; + } +} +exports.V1alpha1VolumeAttachmentSource = V1alpha1VolumeAttachmentSource; +V1alpha1VolumeAttachmentSource.discriminator = undefined; +V1alpha1VolumeAttachmentSource.attributeTypeMap = [ + { + "name": "inlineVolumeSpec", + "baseName": "inlineVolumeSpec", + "type": "V1PersistentVolumeSpec" + }, + { + "name": "persistentVolumeName", + "baseName": "persistentVolumeName", + "type": "string" + } +]; +//# sourceMappingURL=v1alpha1VolumeAttachmentSource.js.map + +/***/ }), + +/***/ 63761: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1VolumeAttachmentSpec = void 0; +/** +* VolumeAttachmentSpec is the specification of a VolumeAttachment request. +*/ +class V1alpha1VolumeAttachmentSpec { + static getAttributeTypeMap() { + return V1alpha1VolumeAttachmentSpec.attributeTypeMap; + } +} +exports.V1alpha1VolumeAttachmentSpec = V1alpha1VolumeAttachmentSpec; +V1alpha1VolumeAttachmentSpec.discriminator = undefined; +V1alpha1VolumeAttachmentSpec.attributeTypeMap = [ + { + "name": "attacher", + "baseName": "attacher", + "type": "string" + }, + { + "name": "nodeName", + "baseName": "nodeName", + "type": "string" + }, + { + "name": "source", + "baseName": "source", + "type": "V1alpha1VolumeAttachmentSource" + } +]; +//# sourceMappingURL=v1alpha1VolumeAttachmentSpec.js.map + +/***/ }), + +/***/ 85487: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1VolumeAttachmentStatus = void 0; +/** +* VolumeAttachmentStatus is the status of a VolumeAttachment request. +*/ +class V1alpha1VolumeAttachmentStatus { + static getAttributeTypeMap() { + return V1alpha1VolumeAttachmentStatus.attributeTypeMap; + } +} +exports.V1alpha1VolumeAttachmentStatus = V1alpha1VolumeAttachmentStatus; +V1alpha1VolumeAttachmentStatus.discriminator = undefined; +V1alpha1VolumeAttachmentStatus.attributeTypeMap = [ + { + "name": "attachError", + "baseName": "attachError", + "type": "V1alpha1VolumeError" + }, + { + "name": "attached", + "baseName": "attached", + "type": "boolean" + }, + { + "name": "attachmentMetadata", + "baseName": "attachmentMetadata", + "type": "{ [key: string]: string; }" + }, + { + "name": "detachError", + "baseName": "detachError", + "type": "V1alpha1VolumeError" + } +]; +//# sourceMappingURL=v1alpha1VolumeAttachmentStatus.js.map + +/***/ }), + +/***/ 69725: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1alpha1VolumeError = void 0; +/** +* VolumeError captures an error encountered during a volume operation. +*/ +class V1alpha1VolumeError { + static getAttributeTypeMap() { + return V1alpha1VolumeError.attributeTypeMap; + } +} +exports.V1alpha1VolumeError = V1alpha1VolumeError; +V1alpha1VolumeError.discriminator = undefined; +V1alpha1VolumeError.attributeTypeMap = [ + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "time", + "baseName": "time", + "type": "Date" + } +]; +//# sourceMappingURL=v1alpha1VolumeError.js.map + +/***/ }), + +/***/ 43299: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1APIService = void 0; +/** +* APIService represents a server for a particular GroupVersion. Name must be \"version.group\". +*/ +class V1beta1APIService { + static getAttributeTypeMap() { + return V1beta1APIService.attributeTypeMap; + } +} +exports.V1beta1APIService = V1beta1APIService; +V1beta1APIService.discriminator = undefined; +V1beta1APIService.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1APIServiceSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1APIServiceStatus" + } +]; +//# sourceMappingURL=v1beta1APIService.js.map + +/***/ }), + +/***/ 39417: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1APIServiceCondition = void 0; +/** +* APIServiceCondition describes the state of an APIService at a particular point +*/ +class V1beta1APIServiceCondition { + static getAttributeTypeMap() { + return V1beta1APIServiceCondition.attributeTypeMap; + } +} +exports.V1beta1APIServiceCondition = V1beta1APIServiceCondition; +V1beta1APIServiceCondition.discriminator = undefined; +V1beta1APIServiceCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1APIServiceCondition.js.map + +/***/ }), + +/***/ 18308: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1APIServiceList = void 0; +/** +* APIServiceList is a list of APIService objects. +*/ +class V1beta1APIServiceList { + static getAttributeTypeMap() { + return V1beta1APIServiceList.attributeTypeMap; + } +} +exports.V1beta1APIServiceList = V1beta1APIServiceList; +V1beta1APIServiceList.discriminator = undefined; +V1beta1APIServiceList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1APIServiceList.js.map + +/***/ }), + +/***/ 79606: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1APIServiceSpec = void 0; +/** +* APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. +*/ +class V1beta1APIServiceSpec { + static getAttributeTypeMap() { + return V1beta1APIServiceSpec.attributeTypeMap; + } +} +exports.V1beta1APIServiceSpec = V1beta1APIServiceSpec; +V1beta1APIServiceSpec.discriminator = undefined; +V1beta1APIServiceSpec.attributeTypeMap = [ + { + "name": "caBundle", + "baseName": "caBundle", + "type": "string" + }, + { + "name": "group", + "baseName": "group", + "type": "string" + }, + { + "name": "groupPriorityMinimum", + "baseName": "groupPriorityMinimum", + "type": "number" + }, + { + "name": "insecureSkipTLSVerify", + "baseName": "insecureSkipTLSVerify", + "type": "boolean" + }, + { + "name": "service", + "baseName": "service", + "type": "ApiregistrationV1beta1ServiceReference" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + }, + { + "name": "versionPriority", + "baseName": "versionPriority", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1APIServiceSpec.js.map + +/***/ }), + +/***/ 80723: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1APIServiceStatus = void 0; +/** +* APIServiceStatus contains derived information about an API server +*/ +class V1beta1APIServiceStatus { + static getAttributeTypeMap() { + return V1beta1APIServiceStatus.attributeTypeMap; + } +} +exports.V1beta1APIServiceStatus = V1beta1APIServiceStatus; +V1beta1APIServiceStatus.discriminator = undefined; +V1beta1APIServiceStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1APIServiceStatus.js.map + +/***/ }), + +/***/ 92202: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1AggregationRule = void 0; +/** +* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole +*/ +class V1beta1AggregationRule { + static getAttributeTypeMap() { + return V1beta1AggregationRule.attributeTypeMap; + } +} +exports.V1beta1AggregationRule = V1beta1AggregationRule; +V1beta1AggregationRule.discriminator = undefined; +V1beta1AggregationRule.attributeTypeMap = [ + { + "name": "clusterRoleSelectors", + "baseName": "clusterRoleSelectors", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1AggregationRule.js.map + +/***/ }), + +/***/ 54187: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1AllowedCSIDriver = void 0; +/** +* AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used. +*/ +class V1beta1AllowedCSIDriver { + static getAttributeTypeMap() { + return V1beta1AllowedCSIDriver.attributeTypeMap; + } +} +exports.V1beta1AllowedCSIDriver = V1beta1AllowedCSIDriver; +V1beta1AllowedCSIDriver.discriminator = undefined; +V1beta1AllowedCSIDriver.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1AllowedCSIDriver.js.map + +/***/ }), + +/***/ 59116: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1AllowedFlexVolume = void 0; +/** +* AllowedFlexVolume represents a single Flexvolume that is allowed to be used. +*/ +class V1beta1AllowedFlexVolume { + static getAttributeTypeMap() { + return V1beta1AllowedFlexVolume.attributeTypeMap; + } +} +exports.V1beta1AllowedFlexVolume = V1beta1AllowedFlexVolume; +V1beta1AllowedFlexVolume.discriminator = undefined; +V1beta1AllowedFlexVolume.attributeTypeMap = [ + { + "name": "driver", + "baseName": "driver", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1AllowedFlexVolume.js.map + +/***/ }), + +/***/ 45746: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1AllowedHostPath = void 0; +/** +* AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. +*/ +class V1beta1AllowedHostPath { + static getAttributeTypeMap() { + return V1beta1AllowedHostPath.attributeTypeMap; + } +} +exports.V1beta1AllowedHostPath = V1beta1AllowedHostPath; +V1beta1AllowedHostPath.discriminator = undefined; +V1beta1AllowedHostPath.attributeTypeMap = [ + { + "name": "pathPrefix", + "baseName": "pathPrefix", + "type": "string" + }, + { + "name": "readOnly", + "baseName": "readOnly", + "type": "boolean" + } +]; +//# sourceMappingURL=v1beta1AllowedHostPath.js.map + +/***/ }), + +/***/ 9571: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CSIDriver = void 0; +/** +* CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced. +*/ +class V1beta1CSIDriver { + static getAttributeTypeMap() { + return V1beta1CSIDriver.attributeTypeMap; + } +} +exports.V1beta1CSIDriver = V1beta1CSIDriver; +V1beta1CSIDriver.discriminator = undefined; +V1beta1CSIDriver.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1CSIDriverSpec" + } +]; +//# sourceMappingURL=v1beta1CSIDriver.js.map + +/***/ }), + +/***/ 63279: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CSIDriverList = void 0; +/** +* CSIDriverList is a collection of CSIDriver objects. +*/ +class V1beta1CSIDriverList { + static getAttributeTypeMap() { + return V1beta1CSIDriverList.attributeTypeMap; + } +} +exports.V1beta1CSIDriverList = V1beta1CSIDriverList; +V1beta1CSIDriverList.discriminator = undefined; +V1beta1CSIDriverList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1CSIDriverList.js.map + +/***/ }), + +/***/ 74978: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CSIDriverSpec = void 0; +/** +* CSIDriverSpec is the specification of a CSIDriver. +*/ +class V1beta1CSIDriverSpec { + static getAttributeTypeMap() { + return V1beta1CSIDriverSpec.attributeTypeMap; + } +} +exports.V1beta1CSIDriverSpec = V1beta1CSIDriverSpec; +V1beta1CSIDriverSpec.discriminator = undefined; +V1beta1CSIDriverSpec.attributeTypeMap = [ + { + "name": "attachRequired", + "baseName": "attachRequired", + "type": "boolean" + }, + { + "name": "fsGroupPolicy", + "baseName": "fsGroupPolicy", + "type": "string" + }, + { + "name": "podInfoOnMount", + "baseName": "podInfoOnMount", + "type": "boolean" + }, + { + "name": "requiresRepublish", + "baseName": "requiresRepublish", + "type": "boolean" + }, + { + "name": "storageCapacity", + "baseName": "storageCapacity", + "type": "boolean" + }, + { + "name": "tokenRequests", + "baseName": "tokenRequests", + "type": "Array" + }, + { + "name": "volumeLifecycleModes", + "baseName": "volumeLifecycleModes", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1CSIDriverSpec.js.map + +/***/ }), + +/***/ 83387: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CSINode = void 0; +/** +* DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. See the release notes for more information. CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn\'t create this object. CSINode has an OwnerReference that points to the corresponding node object. +*/ +class V1beta1CSINode { + static getAttributeTypeMap() { + return V1beta1CSINode.attributeTypeMap; + } +} +exports.V1beta1CSINode = V1beta1CSINode; +V1beta1CSINode.discriminator = undefined; +V1beta1CSINode.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1CSINodeSpec" + } +]; +//# sourceMappingURL=v1beta1CSINode.js.map + +/***/ }), + +/***/ 21043: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CSINodeDriver = void 0; +/** +* CSINodeDriver holds information about the specification of one CSI driver installed on a node +*/ +class V1beta1CSINodeDriver { + static getAttributeTypeMap() { + return V1beta1CSINodeDriver.attributeTypeMap; + } +} +exports.V1beta1CSINodeDriver = V1beta1CSINodeDriver; +V1beta1CSINodeDriver.discriminator = undefined; +V1beta1CSINodeDriver.attributeTypeMap = [ + { + "name": "allocatable", + "baseName": "allocatable", + "type": "V1beta1VolumeNodeResources" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "nodeID", + "baseName": "nodeID", + "type": "string" + }, + { + "name": "topologyKeys", + "baseName": "topologyKeys", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1CSINodeDriver.js.map + +/***/ }), + +/***/ 91886: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CSINodeList = void 0; +/** +* CSINodeList is a collection of CSINode objects. +*/ +class V1beta1CSINodeList { + static getAttributeTypeMap() { + return V1beta1CSINodeList.attributeTypeMap; + } +} +exports.V1beta1CSINodeList = V1beta1CSINodeList; +V1beta1CSINodeList.discriminator = undefined; +V1beta1CSINodeList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1CSINodeList.js.map + +/***/ }), + +/***/ 44389: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CSINodeSpec = void 0; +/** +* CSINodeSpec holds information about the specification of all CSI drivers installed on a node +*/ +class V1beta1CSINodeSpec { + static getAttributeTypeMap() { + return V1beta1CSINodeSpec.attributeTypeMap; + } +} +exports.V1beta1CSINodeSpec = V1beta1CSINodeSpec; +V1beta1CSINodeSpec.discriminator = undefined; +V1beta1CSINodeSpec.attributeTypeMap = [ + { + "name": "drivers", + "baseName": "drivers", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1CSINodeSpec.js.map + +/***/ }), + +/***/ 49500: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CSIStorageCapacity = void 0; +/** +* CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. For example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\" The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero The producer of these objects can decide which approach is more suitable. They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +*/ +class V1beta1CSIStorageCapacity { + static getAttributeTypeMap() { + return V1beta1CSIStorageCapacity.attributeTypeMap; + } +} +exports.V1beta1CSIStorageCapacity = V1beta1CSIStorageCapacity; +V1beta1CSIStorageCapacity.discriminator = undefined; +V1beta1CSIStorageCapacity.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "capacity", + "baseName": "capacity", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "maximumVolumeSize", + "baseName": "maximumVolumeSize", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "nodeTopology", + "baseName": "nodeTopology", + "type": "V1LabelSelector" + }, + { + "name": "storageClassName", + "baseName": "storageClassName", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1CSIStorageCapacity.js.map + +/***/ }), + +/***/ 48111: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CSIStorageCapacityList = void 0; +/** +* CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +*/ +class V1beta1CSIStorageCapacityList { + static getAttributeTypeMap() { + return V1beta1CSIStorageCapacityList.attributeTypeMap; + } +} +exports.V1beta1CSIStorageCapacityList = V1beta1CSIStorageCapacityList; +V1beta1CSIStorageCapacityList.discriminator = undefined; +V1beta1CSIStorageCapacityList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1CSIStorageCapacityList.js.map + +/***/ }), + +/***/ 17395: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CertificateSigningRequest = void 0; +/** +* Describes a certificate signing request +*/ +class V1beta1CertificateSigningRequest { + static getAttributeTypeMap() { + return V1beta1CertificateSigningRequest.attributeTypeMap; + } +} +exports.V1beta1CertificateSigningRequest = V1beta1CertificateSigningRequest; +V1beta1CertificateSigningRequest.discriminator = undefined; +V1beta1CertificateSigningRequest.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1CertificateSigningRequestSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1CertificateSigningRequestStatus" + } +]; +//# sourceMappingURL=v1beta1CertificateSigningRequest.js.map + +/***/ }), + +/***/ 66655: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CertificateSigningRequestCondition = void 0; +class V1beta1CertificateSigningRequestCondition { + static getAttributeTypeMap() { + return V1beta1CertificateSigningRequestCondition.attributeTypeMap; + } +} +exports.V1beta1CertificateSigningRequestCondition = V1beta1CertificateSigningRequestCondition; +V1beta1CertificateSigningRequestCondition.discriminator = undefined; +V1beta1CertificateSigningRequestCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "lastUpdateTime", + "baseName": "lastUpdateTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1CertificateSigningRequestCondition.js.map + +/***/ }), + +/***/ 26172: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CertificateSigningRequestList = void 0; +class V1beta1CertificateSigningRequestList { + static getAttributeTypeMap() { + return V1beta1CertificateSigningRequestList.attributeTypeMap; + } +} +exports.V1beta1CertificateSigningRequestList = V1beta1CertificateSigningRequestList; +V1beta1CertificateSigningRequestList.discriminator = undefined; +V1beta1CertificateSigningRequestList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1CertificateSigningRequestList.js.map + +/***/ }), + +/***/ 48763: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CertificateSigningRequestSpec = void 0; +/** +* This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users. +*/ +class V1beta1CertificateSigningRequestSpec { + static getAttributeTypeMap() { + return V1beta1CertificateSigningRequestSpec.attributeTypeMap; + } +} +exports.V1beta1CertificateSigningRequestSpec = V1beta1CertificateSigningRequestSpec; +V1beta1CertificateSigningRequestSpec.discriminator = undefined; +V1beta1CertificateSigningRequestSpec.attributeTypeMap = [ + { + "name": "extra", + "baseName": "extra", + "type": "{ [key: string]: Array; }" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array" + }, + { + "name": "request", + "baseName": "request", + "type": "string" + }, + { + "name": "signerName", + "baseName": "signerName", + "type": "string" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + }, + { + "name": "usages", + "baseName": "usages", + "type": "Array" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1CertificateSigningRequestSpec.js.map + +/***/ }), + +/***/ 44621: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CertificateSigningRequestStatus = void 0; +class V1beta1CertificateSigningRequestStatus { + static getAttributeTypeMap() { + return V1beta1CertificateSigningRequestStatus.attributeTypeMap; + } +} +exports.V1beta1CertificateSigningRequestStatus = V1beta1CertificateSigningRequestStatus; +V1beta1CertificateSigningRequestStatus.discriminator = undefined; +V1beta1CertificateSigningRequestStatus.attributeTypeMap = [ + { + "name": "certificate", + "baseName": "certificate", + "type": "string" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1CertificateSigningRequestStatus.js.map + +/***/ }), + +/***/ 93022: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ClusterRole = void 0; +/** +* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. +*/ +class V1beta1ClusterRole { + static getAttributeTypeMap() { + return V1beta1ClusterRole.attributeTypeMap; + } +} +exports.V1beta1ClusterRole = V1beta1ClusterRole; +V1beta1ClusterRole.discriminator = undefined; +V1beta1ClusterRole.attributeTypeMap = [ + { + "name": "aggregationRule", + "baseName": "aggregationRule", + "type": "V1beta1AggregationRule" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1ClusterRole.js.map + +/***/ }), + +/***/ 58181: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ClusterRoleBinding = void 0; +/** +* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. +*/ +class V1beta1ClusterRoleBinding { + static getAttributeTypeMap() { + return V1beta1ClusterRoleBinding.attributeTypeMap; + } +} +exports.V1beta1ClusterRoleBinding = V1beta1ClusterRoleBinding; +V1beta1ClusterRoleBinding.discriminator = undefined; +V1beta1ClusterRoleBinding.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "roleRef", + "baseName": "roleRef", + "type": "V1beta1RoleRef" + }, + { + "name": "subjects", + "baseName": "subjects", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1ClusterRoleBinding.js.map + +/***/ }), + +/***/ 22644: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ClusterRoleBindingList = void 0; +/** +* ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.22. +*/ +class V1beta1ClusterRoleBindingList { + static getAttributeTypeMap() { + return V1beta1ClusterRoleBindingList.attributeTypeMap; + } +} +exports.V1beta1ClusterRoleBindingList = V1beta1ClusterRoleBindingList; +V1beta1ClusterRoleBindingList.discriminator = undefined; +V1beta1ClusterRoleBindingList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1ClusterRoleBindingList.js.map + +/***/ }), + +/***/ 46066: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ClusterRoleList = void 0; +/** +* ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22. +*/ +class V1beta1ClusterRoleList { + static getAttributeTypeMap() { + return V1beta1ClusterRoleList.attributeTypeMap; + } +} +exports.V1beta1ClusterRoleList = V1beta1ClusterRoleList; +V1beta1ClusterRoleList.discriminator = undefined; +V1beta1ClusterRoleList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1ClusterRoleList.js.map + +/***/ }), + +/***/ 42702: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CronJob = void 0; +/** +* CronJob represents the configuration of a single cron job. +*/ +class V1beta1CronJob { + static getAttributeTypeMap() { + return V1beta1CronJob.attributeTypeMap; + } +} +exports.V1beta1CronJob = V1beta1CronJob; +V1beta1CronJob.discriminator = undefined; +V1beta1CronJob.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1CronJobSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1CronJobStatus" + } +]; +//# sourceMappingURL=v1beta1CronJob.js.map + +/***/ }), + +/***/ 20752: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CronJobList = void 0; +/** +* CronJobList is a collection of cron jobs. +*/ +class V1beta1CronJobList { + static getAttributeTypeMap() { + return V1beta1CronJobList.attributeTypeMap; + } +} +exports.V1beta1CronJobList = V1beta1CronJobList; +V1beta1CronJobList.discriminator = undefined; +V1beta1CronJobList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1CronJobList.js.map + +/***/ }), + +/***/ 47584: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CronJobSpec = void 0; +/** +* CronJobSpec describes how the job execution will look like and when it will actually run. +*/ +class V1beta1CronJobSpec { + static getAttributeTypeMap() { + return V1beta1CronJobSpec.attributeTypeMap; + } +} +exports.V1beta1CronJobSpec = V1beta1CronJobSpec; +V1beta1CronJobSpec.discriminator = undefined; +V1beta1CronJobSpec.attributeTypeMap = [ + { + "name": "concurrencyPolicy", + "baseName": "concurrencyPolicy", + "type": "string" + }, + { + "name": "failedJobsHistoryLimit", + "baseName": "failedJobsHistoryLimit", + "type": "number" + }, + { + "name": "jobTemplate", + "baseName": "jobTemplate", + "type": "V1beta1JobTemplateSpec" + }, + { + "name": "schedule", + "baseName": "schedule", + "type": "string" + }, + { + "name": "startingDeadlineSeconds", + "baseName": "startingDeadlineSeconds", + "type": "number" + }, + { + "name": "successfulJobsHistoryLimit", + "baseName": "successfulJobsHistoryLimit", + "type": "number" + }, + { + "name": "suspend", + "baseName": "suspend", + "type": "boolean" + } +]; +//# sourceMappingURL=v1beta1CronJobSpec.js.map + +/***/ }), + +/***/ 11172: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CronJobStatus = void 0; +/** +* CronJobStatus represents the current state of a cron job. +*/ +class V1beta1CronJobStatus { + static getAttributeTypeMap() { + return V1beta1CronJobStatus.attributeTypeMap; + } +} +exports.V1beta1CronJobStatus = V1beta1CronJobStatus; +V1beta1CronJobStatus.discriminator = undefined; +V1beta1CronJobStatus.attributeTypeMap = [ + { + "name": "active", + "baseName": "active", + "type": "Array" + }, + { + "name": "lastScheduleTime", + "baseName": "lastScheduleTime", + "type": "Date" + }, + { + "name": "lastSuccessfulTime", + "baseName": "lastSuccessfulTime", + "type": "Date" + } +]; +//# sourceMappingURL=v1beta1CronJobStatus.js.map + +/***/ }), + +/***/ 301: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceColumnDefinition = void 0; +/** +* CustomResourceColumnDefinition specifies a column for server side printing. +*/ +class V1beta1CustomResourceColumnDefinition { + static getAttributeTypeMap() { + return V1beta1CustomResourceColumnDefinition.attributeTypeMap; + } +} +exports.V1beta1CustomResourceColumnDefinition = V1beta1CustomResourceColumnDefinition; +V1beta1CustomResourceColumnDefinition.discriminator = undefined; +V1beta1CustomResourceColumnDefinition.attributeTypeMap = [ + { + "name": "JSONPath", + "baseName": "JSONPath", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "format", + "baseName": "format", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1CustomResourceColumnDefinition.js.map + +/***/ }), + +/***/ 33037: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceConversion = void 0; +/** +* CustomResourceConversion describes how to convert different versions of a CR. +*/ +class V1beta1CustomResourceConversion { + static getAttributeTypeMap() { + return V1beta1CustomResourceConversion.attributeTypeMap; + } +} +exports.V1beta1CustomResourceConversion = V1beta1CustomResourceConversion; +V1beta1CustomResourceConversion.discriminator = undefined; +V1beta1CustomResourceConversion.attributeTypeMap = [ + { + "name": "conversionReviewVersions", + "baseName": "conversionReviewVersions", + "type": "Array" + }, + { + "name": "strategy", + "baseName": "strategy", + "type": "string" + }, + { + "name": "webhookClientConfig", + "baseName": "webhookClientConfig", + "type": "ApiextensionsV1beta1WebhookClientConfig" + } +]; +//# sourceMappingURL=v1beta1CustomResourceConversion.js.map + +/***/ }), + +/***/ 68993: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceDefinition = void 0; +/** +* CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. +*/ +class V1beta1CustomResourceDefinition { + static getAttributeTypeMap() { + return V1beta1CustomResourceDefinition.attributeTypeMap; + } +} +exports.V1beta1CustomResourceDefinition = V1beta1CustomResourceDefinition; +V1beta1CustomResourceDefinition.discriminator = undefined; +V1beta1CustomResourceDefinition.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1CustomResourceDefinitionSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1CustomResourceDefinitionStatus" + } +]; +//# sourceMappingURL=v1beta1CustomResourceDefinition.js.map + +/***/ }), + +/***/ 96530: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceDefinitionCondition = void 0; +/** +* CustomResourceDefinitionCondition contains details for the current condition of this pod. +*/ +class V1beta1CustomResourceDefinitionCondition { + static getAttributeTypeMap() { + return V1beta1CustomResourceDefinitionCondition.attributeTypeMap; + } +} +exports.V1beta1CustomResourceDefinitionCondition = V1beta1CustomResourceDefinitionCondition; +V1beta1CustomResourceDefinitionCondition.discriminator = undefined; +V1beta1CustomResourceDefinitionCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1CustomResourceDefinitionCondition.js.map + +/***/ }), + +/***/ 30273: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceDefinitionList = void 0; +/** +* CustomResourceDefinitionList is a list of CustomResourceDefinition objects. +*/ +class V1beta1CustomResourceDefinitionList { + static getAttributeTypeMap() { + return V1beta1CustomResourceDefinitionList.attributeTypeMap; + } +} +exports.V1beta1CustomResourceDefinitionList = V1beta1CustomResourceDefinitionList; +V1beta1CustomResourceDefinitionList.discriminator = undefined; +V1beta1CustomResourceDefinitionList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1CustomResourceDefinitionList.js.map + +/***/ }), + +/***/ 80906: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceDefinitionNames = void 0; +/** +* CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition +*/ +class V1beta1CustomResourceDefinitionNames { + static getAttributeTypeMap() { + return V1beta1CustomResourceDefinitionNames.attributeTypeMap; + } +} +exports.V1beta1CustomResourceDefinitionNames = V1beta1CustomResourceDefinitionNames; +V1beta1CustomResourceDefinitionNames.discriminator = undefined; +V1beta1CustomResourceDefinitionNames.attributeTypeMap = [ + { + "name": "categories", + "baseName": "categories", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "listKind", + "baseName": "listKind", + "type": "string" + }, + { + "name": "plural", + "baseName": "plural", + "type": "string" + }, + { + "name": "shortNames", + "baseName": "shortNames", + "type": "Array" + }, + { + "name": "singular", + "baseName": "singular", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1CustomResourceDefinitionNames.js.map + +/***/ }), + +/***/ 20882: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceDefinitionSpec = void 0; +/** +* CustomResourceDefinitionSpec describes how a user wants their resource to appear +*/ +class V1beta1CustomResourceDefinitionSpec { + static getAttributeTypeMap() { + return V1beta1CustomResourceDefinitionSpec.attributeTypeMap; + } +} +exports.V1beta1CustomResourceDefinitionSpec = V1beta1CustomResourceDefinitionSpec; +V1beta1CustomResourceDefinitionSpec.discriminator = undefined; +V1beta1CustomResourceDefinitionSpec.attributeTypeMap = [ + { + "name": "additionalPrinterColumns", + "baseName": "additionalPrinterColumns", + "type": "Array" + }, + { + "name": "conversion", + "baseName": "conversion", + "type": "V1beta1CustomResourceConversion" + }, + { + "name": "group", + "baseName": "group", + "type": "string" + }, + { + "name": "names", + "baseName": "names", + "type": "V1beta1CustomResourceDefinitionNames" + }, + { + "name": "preserveUnknownFields", + "baseName": "preserveUnknownFields", + "type": "boolean" + }, + { + "name": "scope", + "baseName": "scope", + "type": "string" + }, + { + "name": "subresources", + "baseName": "subresources", + "type": "V1beta1CustomResourceSubresources" + }, + { + "name": "validation", + "baseName": "validation", + "type": "V1beta1CustomResourceValidation" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + }, + { + "name": "versions", + "baseName": "versions", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1CustomResourceDefinitionSpec.js.map + +/***/ }), + +/***/ 19163: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceDefinitionStatus = void 0; +/** +* CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition +*/ +class V1beta1CustomResourceDefinitionStatus { + static getAttributeTypeMap() { + return V1beta1CustomResourceDefinitionStatus.attributeTypeMap; + } +} +exports.V1beta1CustomResourceDefinitionStatus = V1beta1CustomResourceDefinitionStatus; +V1beta1CustomResourceDefinitionStatus.discriminator = undefined; +V1beta1CustomResourceDefinitionStatus.attributeTypeMap = [ + { + "name": "acceptedNames", + "baseName": "acceptedNames", + "type": "V1beta1CustomResourceDefinitionNames" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "storedVersions", + "baseName": "storedVersions", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1CustomResourceDefinitionStatus.js.map + +/***/ }), + +/***/ 89645: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceDefinitionVersion = void 0; +/** +* CustomResourceDefinitionVersion describes a version for CRD. +*/ +class V1beta1CustomResourceDefinitionVersion { + static getAttributeTypeMap() { + return V1beta1CustomResourceDefinitionVersion.attributeTypeMap; + } +} +exports.V1beta1CustomResourceDefinitionVersion = V1beta1CustomResourceDefinitionVersion; +V1beta1CustomResourceDefinitionVersion.discriminator = undefined; +V1beta1CustomResourceDefinitionVersion.attributeTypeMap = [ + { + "name": "additionalPrinterColumns", + "baseName": "additionalPrinterColumns", + "type": "Array" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean" + }, + { + "name": "deprecationWarning", + "baseName": "deprecationWarning", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "schema", + "baseName": "schema", + "type": "V1beta1CustomResourceValidation" + }, + { + "name": "served", + "baseName": "served", + "type": "boolean" + }, + { + "name": "storage", + "baseName": "storage", + "type": "boolean" + }, + { + "name": "subresources", + "baseName": "subresources", + "type": "V1beta1CustomResourceSubresources" + } +]; +//# sourceMappingURL=v1beta1CustomResourceDefinitionVersion.js.map + +/***/ }), + +/***/ 43381: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceSubresourceScale = void 0; +/** +* CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. +*/ +class V1beta1CustomResourceSubresourceScale { + static getAttributeTypeMap() { + return V1beta1CustomResourceSubresourceScale.attributeTypeMap; + } +} +exports.V1beta1CustomResourceSubresourceScale = V1beta1CustomResourceSubresourceScale; +V1beta1CustomResourceSubresourceScale.discriminator = undefined; +V1beta1CustomResourceSubresourceScale.attributeTypeMap = [ + { + "name": "labelSelectorPath", + "baseName": "labelSelectorPath", + "type": "string" + }, + { + "name": "specReplicasPath", + "baseName": "specReplicasPath", + "type": "string" + }, + { + "name": "statusReplicasPath", + "baseName": "statusReplicasPath", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1CustomResourceSubresourceScale.js.map + +/***/ }), + +/***/ 5156: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceSubresources = void 0; +/** +* CustomResourceSubresources defines the status and scale subresources for CustomResources. +*/ +class V1beta1CustomResourceSubresources { + static getAttributeTypeMap() { + return V1beta1CustomResourceSubresources.attributeTypeMap; + } +} +exports.V1beta1CustomResourceSubresources = V1beta1CustomResourceSubresources; +V1beta1CustomResourceSubresources.discriminator = undefined; +V1beta1CustomResourceSubresources.attributeTypeMap = [ + { + "name": "scale", + "baseName": "scale", + "type": "V1beta1CustomResourceSubresourceScale" + }, + { + "name": "status", + "baseName": "status", + "type": "object" + } +]; +//# sourceMappingURL=v1beta1CustomResourceSubresources.js.map + +/***/ }), + +/***/ 67132: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1CustomResourceValidation = void 0; +/** +* CustomResourceValidation is a list of validation methods for CustomResources. +*/ +class V1beta1CustomResourceValidation { + static getAttributeTypeMap() { + return V1beta1CustomResourceValidation.attributeTypeMap; + } +} +exports.V1beta1CustomResourceValidation = V1beta1CustomResourceValidation; +V1beta1CustomResourceValidation.discriminator = undefined; +V1beta1CustomResourceValidation.attributeTypeMap = [ + { + "name": "openAPIV3Schema", + "baseName": "openAPIV3Schema", + "type": "V1beta1JSONSchemaProps" + } +]; +//# sourceMappingURL=v1beta1CustomResourceValidation.js.map + +/***/ }), + +/***/ 80649: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1Endpoint = void 0; +/** +* Endpoint represents a single logical \"backend\" implementing a service. +*/ +class V1beta1Endpoint { + static getAttributeTypeMap() { + return V1beta1Endpoint.attributeTypeMap; + } +} +exports.V1beta1Endpoint = V1beta1Endpoint; +V1beta1Endpoint.discriminator = undefined; +V1beta1Endpoint.attributeTypeMap = [ + { + "name": "addresses", + "baseName": "addresses", + "type": "Array" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "V1beta1EndpointConditions" + }, + { + "name": "hints", + "baseName": "hints", + "type": "V1beta1EndpointHints" + }, + { + "name": "hostname", + "baseName": "hostname", + "type": "string" + }, + { + "name": "nodeName", + "baseName": "nodeName", + "type": "string" + }, + { + "name": "targetRef", + "baseName": "targetRef", + "type": "V1ObjectReference" + }, + { + "name": "topology", + "baseName": "topology", + "type": "{ [key: string]: string; }" + } +]; +//# sourceMappingURL=v1beta1Endpoint.js.map + +/***/ }), + +/***/ 22221: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1EndpointConditions = void 0; +/** +* EndpointConditions represents the current condition of an endpoint. +*/ +class V1beta1EndpointConditions { + static getAttributeTypeMap() { + return V1beta1EndpointConditions.attributeTypeMap; + } +} +exports.V1beta1EndpointConditions = V1beta1EndpointConditions; +V1beta1EndpointConditions.discriminator = undefined; +V1beta1EndpointConditions.attributeTypeMap = [ + { + "name": "ready", + "baseName": "ready", + "type": "boolean" + }, + { + "name": "serving", + "baseName": "serving", + "type": "boolean" + }, + { + "name": "terminating", + "baseName": "terminating", + "type": "boolean" + } +]; +//# sourceMappingURL=v1beta1EndpointConditions.js.map + +/***/ }), + +/***/ 78313: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1EndpointHints = void 0; +/** +* EndpointHints provides hints describing how an endpoint should be consumed. +*/ +class V1beta1EndpointHints { + static getAttributeTypeMap() { + return V1beta1EndpointHints.attributeTypeMap; + } +} +exports.V1beta1EndpointHints = V1beta1EndpointHints; +V1beta1EndpointHints.discriminator = undefined; +V1beta1EndpointHints.attributeTypeMap = [ + { + "name": "forZones", + "baseName": "forZones", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1EndpointHints.js.map + +/***/ }), + +/***/ 38750: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1EndpointPort = void 0; +/** +* EndpointPort represents a Port used by an EndpointSlice +*/ +class V1beta1EndpointPort { + static getAttributeTypeMap() { + return V1beta1EndpointPort.attributeTypeMap; + } +} +exports.V1beta1EndpointPort = V1beta1EndpointPort; +V1beta1EndpointPort.discriminator = undefined; +V1beta1EndpointPort.attributeTypeMap = [ + { + "name": "appProtocol", + "baseName": "appProtocol", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + }, + { + "name": "protocol", + "baseName": "protocol", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1EndpointPort.js.map + +/***/ }), + +/***/ 24976: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1EndpointSlice = void 0; +/** +* EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +*/ +class V1beta1EndpointSlice { + static getAttributeTypeMap() { + return V1beta1EndpointSlice.attributeTypeMap; + } +} +exports.V1beta1EndpointSlice = V1beta1EndpointSlice; +V1beta1EndpointSlice.discriminator = undefined; +V1beta1EndpointSlice.attributeTypeMap = [ + { + "name": "addressType", + "baseName": "addressType", + "type": "string" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "endpoints", + "baseName": "endpoints", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "ports", + "baseName": "ports", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1EndpointSlice.js.map + +/***/ }), + +/***/ 35869: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1EndpointSliceList = void 0; +/** +* EndpointSliceList represents a list of endpoint slices +*/ +class V1beta1EndpointSliceList { + static getAttributeTypeMap() { + return V1beta1EndpointSliceList.attributeTypeMap; + } +} +exports.V1beta1EndpointSliceList = V1beta1EndpointSliceList; +V1beta1EndpointSliceList.discriminator = undefined; +V1beta1EndpointSliceList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1EndpointSliceList.js.map + +/***/ }), + +/***/ 86653: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1Event = void 0; +/** +* Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. +*/ +class V1beta1Event { + static getAttributeTypeMap() { + return V1beta1Event.attributeTypeMap; + } +} +exports.V1beta1Event = V1beta1Event; +V1beta1Event.discriminator = undefined; +V1beta1Event.attributeTypeMap = [ + { + "name": "action", + "baseName": "action", + "type": "string" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "deprecatedCount", + "baseName": "deprecatedCount", + "type": "number" + }, + { + "name": "deprecatedFirstTimestamp", + "baseName": "deprecatedFirstTimestamp", + "type": "Date" + }, + { + "name": "deprecatedLastTimestamp", + "baseName": "deprecatedLastTimestamp", + "type": "Date" + }, + { + "name": "deprecatedSource", + "baseName": "deprecatedSource", + "type": "V1EventSource" + }, + { + "name": "eventTime", + "baseName": "eventTime", + "type": "Date" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "note", + "baseName": "note", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "regarding", + "baseName": "regarding", + "type": "V1ObjectReference" + }, + { + "name": "related", + "baseName": "related", + "type": "V1ObjectReference" + }, + { + "name": "reportingController", + "baseName": "reportingController", + "type": "string" + }, + { + "name": "reportingInstance", + "baseName": "reportingInstance", + "type": "string" + }, + { + "name": "series", + "baseName": "series", + "type": "V1beta1EventSeries" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1Event.js.map + +/***/ }), + +/***/ 97745: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1EventList = void 0; +/** +* EventList is a list of Event objects. +*/ +class V1beta1EventList { + static getAttributeTypeMap() { + return V1beta1EventList.attributeTypeMap; + } +} +exports.V1beta1EventList = V1beta1EventList; +V1beta1EventList.discriminator = undefined; +V1beta1EventList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1EventList.js.map + +/***/ }), + +/***/ 67482: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1EventSeries = void 0; +/** +* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. +*/ +class V1beta1EventSeries { + static getAttributeTypeMap() { + return V1beta1EventSeries.attributeTypeMap; + } +} +exports.V1beta1EventSeries = V1beta1EventSeries; +V1beta1EventSeries.discriminator = undefined; +V1beta1EventSeries.attributeTypeMap = [ + { + "name": "count", + "baseName": "count", + "type": "number" + }, + { + "name": "lastObservedTime", + "baseName": "lastObservedTime", + "type": "Date" + } +]; +//# sourceMappingURL=v1beta1EventSeries.js.map + +/***/ }), + +/***/ 83673: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1Eviction = void 0; +/** +* Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions. +*/ +class V1beta1Eviction { + static getAttributeTypeMap() { + return V1beta1Eviction.attributeTypeMap; + } +} +exports.V1beta1Eviction = V1beta1Eviction; +V1beta1Eviction.discriminator = undefined; +V1beta1Eviction.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "deleteOptions", + "baseName": "deleteOptions", + "type": "V1DeleteOptions" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + } +]; +//# sourceMappingURL=v1beta1Eviction.js.map + +/***/ }), + +/***/ 35101: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ExternalDocumentation = void 0; +/** +* ExternalDocumentation allows referencing an external resource for extended documentation. +*/ +class V1beta1ExternalDocumentation { + static getAttributeTypeMap() { + return V1beta1ExternalDocumentation.attributeTypeMap; + } +} +exports.V1beta1ExternalDocumentation = V1beta1ExternalDocumentation; +V1beta1ExternalDocumentation.discriminator = undefined; +V1beta1ExternalDocumentation.attributeTypeMap = [ + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1ExternalDocumentation.js.map + +/***/ }), + +/***/ 75172: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1FSGroupStrategyOptions = void 0; +/** +* FSGroupStrategyOptions defines the strategy type and options used to create the strategy. +*/ +class V1beta1FSGroupStrategyOptions { + static getAttributeTypeMap() { + return V1beta1FSGroupStrategyOptions.attributeTypeMap; + } +} +exports.V1beta1FSGroupStrategyOptions = V1beta1FSGroupStrategyOptions; +V1beta1FSGroupStrategyOptions.discriminator = undefined; +V1beta1FSGroupStrategyOptions.attributeTypeMap = [ + { + "name": "ranges", + "baseName": "ranges", + "type": "Array" + }, + { + "name": "rule", + "baseName": "rule", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1FSGroupStrategyOptions.js.map + +/***/ }), + +/***/ 89867: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1FlowDistinguisherMethod = void 0; +/** +* FlowDistinguisherMethod specifies the method of a flow distinguisher. +*/ +class V1beta1FlowDistinguisherMethod { + static getAttributeTypeMap() { + return V1beta1FlowDistinguisherMethod.attributeTypeMap; + } +} +exports.V1beta1FlowDistinguisherMethod = V1beta1FlowDistinguisherMethod; +V1beta1FlowDistinguisherMethod.discriminator = undefined; +V1beta1FlowDistinguisherMethod.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1FlowDistinguisherMethod.js.map + +/***/ }), + +/***/ 84879: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1FlowSchema = void 0; +/** +* FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\". +*/ +class V1beta1FlowSchema { + static getAttributeTypeMap() { + return V1beta1FlowSchema.attributeTypeMap; + } +} +exports.V1beta1FlowSchema = V1beta1FlowSchema; +V1beta1FlowSchema.discriminator = undefined; +V1beta1FlowSchema.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1FlowSchemaSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1FlowSchemaStatus" + } +]; +//# sourceMappingURL=v1beta1FlowSchema.js.map + +/***/ }), + +/***/ 64464: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1FlowSchemaCondition = void 0; +/** +* FlowSchemaCondition describes conditions for a FlowSchema. +*/ +class V1beta1FlowSchemaCondition { + static getAttributeTypeMap() { + return V1beta1FlowSchemaCondition.attributeTypeMap; + } +} +exports.V1beta1FlowSchemaCondition = V1beta1FlowSchemaCondition; +V1beta1FlowSchemaCondition.discriminator = undefined; +V1beta1FlowSchemaCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1FlowSchemaCondition.js.map + +/***/ }), + +/***/ 5667: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1FlowSchemaList = void 0; +/** +* FlowSchemaList is a list of FlowSchema objects. +*/ +class V1beta1FlowSchemaList { + static getAttributeTypeMap() { + return V1beta1FlowSchemaList.attributeTypeMap; + } +} +exports.V1beta1FlowSchemaList = V1beta1FlowSchemaList; +V1beta1FlowSchemaList.discriminator = undefined; +V1beta1FlowSchemaList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1FlowSchemaList.js.map + +/***/ }), + +/***/ 60619: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1FlowSchemaSpec = void 0; +/** +* FlowSchemaSpec describes how the FlowSchema\'s specification looks like. +*/ +class V1beta1FlowSchemaSpec { + static getAttributeTypeMap() { + return V1beta1FlowSchemaSpec.attributeTypeMap; + } +} +exports.V1beta1FlowSchemaSpec = V1beta1FlowSchemaSpec; +V1beta1FlowSchemaSpec.discriminator = undefined; +V1beta1FlowSchemaSpec.attributeTypeMap = [ + { + "name": "distinguisherMethod", + "baseName": "distinguisherMethod", + "type": "V1beta1FlowDistinguisherMethod" + }, + { + "name": "matchingPrecedence", + "baseName": "matchingPrecedence", + "type": "number" + }, + { + "name": "priorityLevelConfiguration", + "baseName": "priorityLevelConfiguration", + "type": "V1beta1PriorityLevelConfigurationReference" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1FlowSchemaSpec.js.map + +/***/ }), + +/***/ 55092: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1FlowSchemaStatus = void 0; +/** +* FlowSchemaStatus represents the current state of a FlowSchema. +*/ +class V1beta1FlowSchemaStatus { + static getAttributeTypeMap() { + return V1beta1FlowSchemaStatus.attributeTypeMap; + } +} +exports.V1beta1FlowSchemaStatus = V1beta1FlowSchemaStatus; +V1beta1FlowSchemaStatus.discriminator = undefined; +V1beta1FlowSchemaStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1FlowSchemaStatus.js.map + +/***/ }), + +/***/ 53311: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ForZone = void 0; +/** +* ForZone provides information about which zones should consume this endpoint. +*/ +class V1beta1ForZone { + static getAttributeTypeMap() { + return V1beta1ForZone.attributeTypeMap; + } +} +exports.V1beta1ForZone = V1beta1ForZone; +V1beta1ForZone.discriminator = undefined; +V1beta1ForZone.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1ForZone.js.map + +/***/ }), + +/***/ 9724: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1GroupSubject = void 0; +/** +* GroupSubject holds detailed information for group-kind subject. +*/ +class V1beta1GroupSubject { + static getAttributeTypeMap() { + return V1beta1GroupSubject.attributeTypeMap; + } +} +exports.V1beta1GroupSubject = V1beta1GroupSubject; +V1beta1GroupSubject.discriminator = undefined; +V1beta1GroupSubject.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1GroupSubject.js.map + +/***/ }), + +/***/ 72441: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1HostPortRange = void 0; +/** +* HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined. +*/ +class V1beta1HostPortRange { + static getAttributeTypeMap() { + return V1beta1HostPortRange.attributeTypeMap; + } +} +exports.V1beta1HostPortRange = V1beta1HostPortRange; +V1beta1HostPortRange.discriminator = undefined; +V1beta1HostPortRange.attributeTypeMap = [ + { + "name": "max", + "baseName": "max", + "type": "number" + }, + { + "name": "min", + "baseName": "min", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1HostPortRange.js.map + +/***/ }), + +/***/ 72216: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1IDRange = void 0; +/** +* IDRange provides a min/max of an allowed range of IDs. +*/ +class V1beta1IDRange { + static getAttributeTypeMap() { + return V1beta1IDRange.attributeTypeMap; + } +} +exports.V1beta1IDRange = V1beta1IDRange; +V1beta1IDRange.discriminator = undefined; +V1beta1IDRange.attributeTypeMap = [ + { + "name": "max", + "baseName": "max", + "type": "number" + }, + { + "name": "min", + "baseName": "min", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1IDRange.js.map + +/***/ }), + +/***/ 23422: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1IngressClass = void 0; +/** +* IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class. +*/ +class V1beta1IngressClass { + static getAttributeTypeMap() { + return V1beta1IngressClass.attributeTypeMap; + } +} +exports.V1beta1IngressClass = V1beta1IngressClass; +V1beta1IngressClass.discriminator = undefined; +V1beta1IngressClass.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1IngressClassSpec" + } +]; +//# sourceMappingURL=v1beta1IngressClass.js.map + +/***/ }), + +/***/ 46799: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1IngressClassList = void 0; +/** +* IngressClassList is a collection of IngressClasses. +*/ +class V1beta1IngressClassList { + static getAttributeTypeMap() { + return V1beta1IngressClassList.attributeTypeMap; + } +} +exports.V1beta1IngressClassList = V1beta1IngressClassList; +V1beta1IngressClassList.discriminator = undefined; +V1beta1IngressClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1IngressClassList.js.map + +/***/ }), + +/***/ 36341: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1IngressClassParametersReference = void 0; +/** +* IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. +*/ +class V1beta1IngressClassParametersReference { + static getAttributeTypeMap() { + return V1beta1IngressClassParametersReference.attributeTypeMap; + } +} +exports.V1beta1IngressClassParametersReference = V1beta1IngressClassParametersReference; +V1beta1IngressClassParametersReference.discriminator = undefined; +V1beta1IngressClassParametersReference.attributeTypeMap = [ + { + "name": "apiGroup", + "baseName": "apiGroup", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "scope", + "baseName": "scope", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1IngressClassParametersReference.js.map + +/***/ }), + +/***/ 10700: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1IngressClassSpec = void 0; +/** +* IngressClassSpec provides information about the class of an Ingress. +*/ +class V1beta1IngressClassSpec { + static getAttributeTypeMap() { + return V1beta1IngressClassSpec.attributeTypeMap; + } +} +exports.V1beta1IngressClassSpec = V1beta1IngressClassSpec; +V1beta1IngressClassSpec.discriminator = undefined; +V1beta1IngressClassSpec.attributeTypeMap = [ + { + "name": "controller", + "baseName": "controller", + "type": "string" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "V1beta1IngressClassParametersReference" + } +]; +//# sourceMappingURL=v1beta1IngressClassSpec.js.map + +/***/ }), + +/***/ 14016: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1JSONSchemaProps = void 0; +/** +* JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). +*/ +class V1beta1JSONSchemaProps { + static getAttributeTypeMap() { + return V1beta1JSONSchemaProps.attributeTypeMap; + } +} +exports.V1beta1JSONSchemaProps = V1beta1JSONSchemaProps; +V1beta1JSONSchemaProps.discriminator = undefined; +V1beta1JSONSchemaProps.attributeTypeMap = [ + { + "name": "$ref", + "baseName": "$ref", + "type": "string" + }, + { + "name": "$schema", + "baseName": "$schema", + "type": "string" + }, + { + "name": "additionalItems", + "baseName": "additionalItems", + "type": "object" + }, + { + "name": "additionalProperties", + "baseName": "additionalProperties", + "type": "object" + }, + { + "name": "allOf", + "baseName": "allOf", + "type": "Array" + }, + { + "name": "anyOf", + "baseName": "anyOf", + "type": "Array" + }, + { + "name": "_default", + "baseName": "default", + "type": "object" + }, + { + "name": "definitions", + "baseName": "definitions", + "type": "{ [key: string]: V1beta1JSONSchemaProps; }" + }, + { + "name": "dependencies", + "baseName": "dependencies", + "type": "{ [key: string]: object; }" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "_enum", + "baseName": "enum", + "type": "Array" + }, + { + "name": "example", + "baseName": "example", + "type": "object" + }, + { + "name": "exclusiveMaximum", + "baseName": "exclusiveMaximum", + "type": "boolean" + }, + { + "name": "exclusiveMinimum", + "baseName": "exclusiveMinimum", + "type": "boolean" + }, + { + "name": "externalDocs", + "baseName": "externalDocs", + "type": "V1beta1ExternalDocumentation" + }, + { + "name": "format", + "baseName": "format", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "object" + }, + { + "name": "maxItems", + "baseName": "maxItems", + "type": "number" + }, + { + "name": "maxLength", + "baseName": "maxLength", + "type": "number" + }, + { + "name": "maxProperties", + "baseName": "maxProperties", + "type": "number" + }, + { + "name": "maximum", + "baseName": "maximum", + "type": "number" + }, + { + "name": "minItems", + "baseName": "minItems", + "type": "number" + }, + { + "name": "minLength", + "baseName": "minLength", + "type": "number" + }, + { + "name": "minProperties", + "baseName": "minProperties", + "type": "number" + }, + { + "name": "minimum", + "baseName": "minimum", + "type": "number" + }, + { + "name": "multipleOf", + "baseName": "multipleOf", + "type": "number" + }, + { + "name": "not", + "baseName": "not", + "type": "V1beta1JSONSchemaProps" + }, + { + "name": "nullable", + "baseName": "nullable", + "type": "boolean" + }, + { + "name": "oneOf", + "baseName": "oneOf", + "type": "Array" + }, + { + "name": "pattern", + "baseName": "pattern", + "type": "string" + }, + { + "name": "patternProperties", + "baseName": "patternProperties", + "type": "{ [key: string]: V1beta1JSONSchemaProps; }" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: V1beta1JSONSchemaProps; }" + }, + { + "name": "required", + "baseName": "required", + "type": "Array" + }, + { + "name": "title", + "baseName": "title", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "uniqueItems", + "baseName": "uniqueItems", + "type": "boolean" + }, + { + "name": "x_kubernetes_embedded_resource", + "baseName": "x-kubernetes-embedded-resource", + "type": "boolean" + }, + { + "name": "x_kubernetes_int_or_string", + "baseName": "x-kubernetes-int-or-string", + "type": "boolean" + }, + { + "name": "x_kubernetes_list_map_keys", + "baseName": "x-kubernetes-list-map-keys", + "type": "Array" + }, + { + "name": "x_kubernetes_list_type", + "baseName": "x-kubernetes-list-type", + "type": "string" + }, + { + "name": "x_kubernetes_map_type", + "baseName": "x-kubernetes-map-type", + "type": "string" + }, + { + "name": "x_kubernetes_preserve_unknown_fields", + "baseName": "x-kubernetes-preserve-unknown-fields", + "type": "boolean" + } +]; +//# sourceMappingURL=v1beta1JSONSchemaProps.js.map + +/***/ }), + +/***/ 6910: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1JobTemplateSpec = void 0; +/** +* JobTemplateSpec describes the data a Job should have when created from a template +*/ +class V1beta1JobTemplateSpec { + static getAttributeTypeMap() { + return V1beta1JobTemplateSpec.attributeTypeMap; + } +} +exports.V1beta1JobTemplateSpec = V1beta1JobTemplateSpec; +V1beta1JobTemplateSpec.discriminator = undefined; +V1beta1JobTemplateSpec.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1JobSpec" + } +]; +//# sourceMappingURL=v1beta1JobTemplateSpec.js.map + +/***/ }), + +/***/ 4887: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1Lease = void 0; +/** +* Lease defines a lease concept. +*/ +class V1beta1Lease { + static getAttributeTypeMap() { + return V1beta1Lease.attributeTypeMap; + } +} +exports.V1beta1Lease = V1beta1Lease; +V1beta1Lease.discriminator = undefined; +V1beta1Lease.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1LeaseSpec" + } +]; +//# sourceMappingURL=v1beta1Lease.js.map + +/***/ }), + +/***/ 45684: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1LeaseList = void 0; +/** +* LeaseList is a list of Lease objects. +*/ +class V1beta1LeaseList { + static getAttributeTypeMap() { + return V1beta1LeaseList.attributeTypeMap; + } +} +exports.V1beta1LeaseList = V1beta1LeaseList; +V1beta1LeaseList.discriminator = undefined; +V1beta1LeaseList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1LeaseList.js.map + +/***/ }), + +/***/ 13807: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1LeaseSpec = void 0; +/** +* LeaseSpec is a specification of a Lease. +*/ +class V1beta1LeaseSpec { + static getAttributeTypeMap() { + return V1beta1LeaseSpec.attributeTypeMap; + } +} +exports.V1beta1LeaseSpec = V1beta1LeaseSpec; +V1beta1LeaseSpec.discriminator = undefined; +V1beta1LeaseSpec.attributeTypeMap = [ + { + "name": "acquireTime", + "baseName": "acquireTime", + "type": "Date" + }, + { + "name": "holderIdentity", + "baseName": "holderIdentity", + "type": "string" + }, + { + "name": "leaseDurationSeconds", + "baseName": "leaseDurationSeconds", + "type": "number" + }, + { + "name": "leaseTransitions", + "baseName": "leaseTransitions", + "type": "number" + }, + { + "name": "renewTime", + "baseName": "renewTime", + "type": "Date" + } +]; +//# sourceMappingURL=v1beta1LeaseSpec.js.map + +/***/ }), + +/***/ 8549: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1LimitResponse = void 0; +/** +* LimitResponse defines how to handle requests that can not be executed right now. +*/ +class V1beta1LimitResponse { + static getAttributeTypeMap() { + return V1beta1LimitResponse.attributeTypeMap; + } +} +exports.V1beta1LimitResponse = V1beta1LimitResponse; +V1beta1LimitResponse.discriminator = undefined; +V1beta1LimitResponse.attributeTypeMap = [ + { + "name": "queuing", + "baseName": "queuing", + "type": "V1beta1QueuingConfiguration" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1LimitResponse.js.map + +/***/ }), + +/***/ 14647: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1LimitedPriorityLevelConfiguration = void 0; +/** +* LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues: * How are requests for this priority level limited? * What should be done with requests that exceed the limit? +*/ +class V1beta1LimitedPriorityLevelConfiguration { + static getAttributeTypeMap() { + return V1beta1LimitedPriorityLevelConfiguration.attributeTypeMap; + } +} +exports.V1beta1LimitedPriorityLevelConfiguration = V1beta1LimitedPriorityLevelConfiguration; +V1beta1LimitedPriorityLevelConfiguration.discriminator = undefined; +V1beta1LimitedPriorityLevelConfiguration.attributeTypeMap = [ + { + "name": "assuredConcurrencyShares", + "baseName": "assuredConcurrencyShares", + "type": "number" + }, + { + "name": "limitResponse", + "baseName": "limitResponse", + "type": "V1beta1LimitResponse" + } +]; +//# sourceMappingURL=v1beta1LimitedPriorityLevelConfiguration.js.map + +/***/ }), + +/***/ 69966: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1LocalSubjectAccessReview = void 0; +/** +* LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking. +*/ +class V1beta1LocalSubjectAccessReview { + static getAttributeTypeMap() { + return V1beta1LocalSubjectAccessReview.attributeTypeMap; + } +} +exports.V1beta1LocalSubjectAccessReview = V1beta1LocalSubjectAccessReview; +V1beta1LocalSubjectAccessReview.discriminator = undefined; +V1beta1LocalSubjectAccessReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1SubjectAccessReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1SubjectAccessReviewStatus" + } +]; +//# sourceMappingURL=v1beta1LocalSubjectAccessReview.js.map + +/***/ }), + +/***/ 90124: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1MutatingWebhook = void 0; +/** +* MutatingWebhook describes an admission webhook and the resources and operations it applies to. +*/ +class V1beta1MutatingWebhook { + static getAttributeTypeMap() { + return V1beta1MutatingWebhook.attributeTypeMap; + } +} +exports.V1beta1MutatingWebhook = V1beta1MutatingWebhook; +V1beta1MutatingWebhook.discriminator = undefined; +V1beta1MutatingWebhook.attributeTypeMap = [ + { + "name": "admissionReviewVersions", + "baseName": "admissionReviewVersions", + "type": "Array" + }, + { + "name": "clientConfig", + "baseName": "clientConfig", + "type": "AdmissionregistrationV1beta1WebhookClientConfig" + }, + { + "name": "failurePolicy", + "baseName": "failurePolicy", + "type": "string" + }, + { + "name": "matchPolicy", + "baseName": "matchPolicy", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespaceSelector", + "baseName": "namespaceSelector", + "type": "V1LabelSelector" + }, + { + "name": "objectSelector", + "baseName": "objectSelector", + "type": "V1LabelSelector" + }, + { + "name": "reinvocationPolicy", + "baseName": "reinvocationPolicy", + "type": "string" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + }, + { + "name": "sideEffects", + "baseName": "sideEffects", + "type": "string" + }, + { + "name": "timeoutSeconds", + "baseName": "timeoutSeconds", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1MutatingWebhook.js.map + +/***/ }), + +/***/ 68173: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1MutatingWebhookConfiguration = void 0; +/** +* MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead. +*/ +class V1beta1MutatingWebhookConfiguration { + static getAttributeTypeMap() { + return V1beta1MutatingWebhookConfiguration.attributeTypeMap; + } +} +exports.V1beta1MutatingWebhookConfiguration = V1beta1MutatingWebhookConfiguration; +V1beta1MutatingWebhookConfiguration.discriminator = undefined; +V1beta1MutatingWebhookConfiguration.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1MutatingWebhookConfiguration.js.map + +/***/ }), + +/***/ 71239: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1MutatingWebhookConfigurationList = void 0; +/** +* MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. +*/ +class V1beta1MutatingWebhookConfigurationList { + static getAttributeTypeMap() { + return V1beta1MutatingWebhookConfigurationList.attributeTypeMap; + } +} +exports.V1beta1MutatingWebhookConfigurationList = V1beta1MutatingWebhookConfigurationList; +V1beta1MutatingWebhookConfigurationList.discriminator = undefined; +V1beta1MutatingWebhookConfigurationList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1MutatingWebhookConfigurationList.js.map + +/***/ }), + +/***/ 62878: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1NonResourceAttributes = void 0; +/** +* NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface +*/ +class V1beta1NonResourceAttributes { + static getAttributeTypeMap() { + return V1beta1NonResourceAttributes.attributeTypeMap; + } +} +exports.V1beta1NonResourceAttributes = V1beta1NonResourceAttributes; +V1beta1NonResourceAttributes.discriminator = undefined; +V1beta1NonResourceAttributes.attributeTypeMap = [ + { + "name": "path", + "baseName": "path", + "type": "string" + }, + { + "name": "verb", + "baseName": "verb", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1NonResourceAttributes.js.map + +/***/ }), + +/***/ 14671: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1NonResourcePolicyRule = void 0; +/** +* NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. +*/ +class V1beta1NonResourcePolicyRule { + static getAttributeTypeMap() { + return V1beta1NonResourcePolicyRule.attributeTypeMap; + } +} +exports.V1beta1NonResourcePolicyRule = V1beta1NonResourcePolicyRule; +V1beta1NonResourcePolicyRule.discriminator = undefined; +V1beta1NonResourcePolicyRule.attributeTypeMap = [ + { + "name": "nonResourceURLs", + "baseName": "nonResourceURLs", + "type": "Array" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1NonResourcePolicyRule.js.map + +/***/ }), + +/***/ 41172: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1NonResourceRule = void 0; +/** +* NonResourceRule holds information that describes a rule for the non-resource +*/ +class V1beta1NonResourceRule { + static getAttributeTypeMap() { + return V1beta1NonResourceRule.attributeTypeMap; + } +} +exports.V1beta1NonResourceRule = V1beta1NonResourceRule; +V1beta1NonResourceRule.discriminator = undefined; +V1beta1NonResourceRule.attributeTypeMap = [ + { + "name": "nonResourceURLs", + "baseName": "nonResourceURLs", + "type": "Array" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1NonResourceRule.js.map + +/***/ }), + +/***/ 21826: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1Overhead = void 0; +/** +* Overhead structure represents the resource overhead associated with running a pod. +*/ +class V1beta1Overhead { + static getAttributeTypeMap() { + return V1beta1Overhead.attributeTypeMap; + } +} +exports.V1beta1Overhead = V1beta1Overhead; +V1beta1Overhead.discriminator = undefined; +V1beta1Overhead.attributeTypeMap = [ + { + "name": "podFixed", + "baseName": "podFixed", + "type": "{ [key: string]: string; }" + } +]; +//# sourceMappingURL=v1beta1Overhead.js.map + +/***/ }), + +/***/ 29355: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PodDisruptionBudget = void 0; +/** +* PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +*/ +class V1beta1PodDisruptionBudget { + static getAttributeTypeMap() { + return V1beta1PodDisruptionBudget.attributeTypeMap; + } +} +exports.V1beta1PodDisruptionBudget = V1beta1PodDisruptionBudget; +V1beta1PodDisruptionBudget.discriminator = undefined; +V1beta1PodDisruptionBudget.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1PodDisruptionBudgetSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1PodDisruptionBudgetStatus" + } +]; +//# sourceMappingURL=v1beta1PodDisruptionBudget.js.map + +/***/ }), + +/***/ 3582: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PodDisruptionBudgetList = void 0; +/** +* PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +*/ +class V1beta1PodDisruptionBudgetList { + static getAttributeTypeMap() { + return V1beta1PodDisruptionBudgetList.attributeTypeMap; + } +} +exports.V1beta1PodDisruptionBudgetList = V1beta1PodDisruptionBudgetList; +V1beta1PodDisruptionBudgetList.discriminator = undefined; +V1beta1PodDisruptionBudgetList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1PodDisruptionBudgetList.js.map + +/***/ }), + +/***/ 55143: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PodDisruptionBudgetSpec = void 0; +/** +* PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +*/ +class V1beta1PodDisruptionBudgetSpec { + static getAttributeTypeMap() { + return V1beta1PodDisruptionBudgetSpec.attributeTypeMap; + } +} +exports.V1beta1PodDisruptionBudgetSpec = V1beta1PodDisruptionBudgetSpec; +V1beta1PodDisruptionBudgetSpec.discriminator = undefined; +V1beta1PodDisruptionBudgetSpec.attributeTypeMap = [ + { + "name": "maxUnavailable", + "baseName": "maxUnavailable", + "type": "object" + }, + { + "name": "minAvailable", + "baseName": "minAvailable", + "type": "object" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + } +]; +//# sourceMappingURL=v1beta1PodDisruptionBudgetSpec.js.map + +/***/ }), + +/***/ 72221: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PodDisruptionBudgetStatus = void 0; +/** +* PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. +*/ +class V1beta1PodDisruptionBudgetStatus { + static getAttributeTypeMap() { + return V1beta1PodDisruptionBudgetStatus.attributeTypeMap; + } +} +exports.V1beta1PodDisruptionBudgetStatus = V1beta1PodDisruptionBudgetStatus; +V1beta1PodDisruptionBudgetStatus.discriminator = undefined; +V1beta1PodDisruptionBudgetStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "currentHealthy", + "baseName": "currentHealthy", + "type": "number" + }, + { + "name": "desiredHealthy", + "baseName": "desiredHealthy", + "type": "number" + }, + { + "name": "disruptedPods", + "baseName": "disruptedPods", + "type": "{ [key: string]: Date; }" + }, + { + "name": "disruptionsAllowed", + "baseName": "disruptionsAllowed", + "type": "number" + }, + { + "name": "expectedPods", + "baseName": "expectedPods", + "type": "number" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1PodDisruptionBudgetStatus.js.map + +/***/ }), + +/***/ 43774: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PodSecurityPolicy = void 0; +/** +* PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. +*/ +class V1beta1PodSecurityPolicy { + static getAttributeTypeMap() { + return V1beta1PodSecurityPolicy.attributeTypeMap; + } +} +exports.V1beta1PodSecurityPolicy = V1beta1PodSecurityPolicy; +V1beta1PodSecurityPolicy.discriminator = undefined; +V1beta1PodSecurityPolicy.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1PodSecurityPolicySpec" + } +]; +//# sourceMappingURL=v1beta1PodSecurityPolicy.js.map + +/***/ }), + +/***/ 18556: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PodSecurityPolicyList = void 0; +/** +* PodSecurityPolicyList is a list of PodSecurityPolicy objects. +*/ +class V1beta1PodSecurityPolicyList { + static getAttributeTypeMap() { + return V1beta1PodSecurityPolicyList.attributeTypeMap; + } +} +exports.V1beta1PodSecurityPolicyList = V1beta1PodSecurityPolicyList; +V1beta1PodSecurityPolicyList.discriminator = undefined; +V1beta1PodSecurityPolicyList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1PodSecurityPolicyList.js.map + +/***/ }), + +/***/ 49941: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PodSecurityPolicySpec = void 0; +/** +* PodSecurityPolicySpec defines the policy enforced. +*/ +class V1beta1PodSecurityPolicySpec { + static getAttributeTypeMap() { + return V1beta1PodSecurityPolicySpec.attributeTypeMap; + } +} +exports.V1beta1PodSecurityPolicySpec = V1beta1PodSecurityPolicySpec; +V1beta1PodSecurityPolicySpec.discriminator = undefined; +V1beta1PodSecurityPolicySpec.attributeTypeMap = [ + { + "name": "allowPrivilegeEscalation", + "baseName": "allowPrivilegeEscalation", + "type": "boolean" + }, + { + "name": "allowedCSIDrivers", + "baseName": "allowedCSIDrivers", + "type": "Array" + }, + { + "name": "allowedCapabilities", + "baseName": "allowedCapabilities", + "type": "Array" + }, + { + "name": "allowedFlexVolumes", + "baseName": "allowedFlexVolumes", + "type": "Array" + }, + { + "name": "allowedHostPaths", + "baseName": "allowedHostPaths", + "type": "Array" + }, + { + "name": "allowedProcMountTypes", + "baseName": "allowedProcMountTypes", + "type": "Array" + }, + { + "name": "allowedUnsafeSysctls", + "baseName": "allowedUnsafeSysctls", + "type": "Array" + }, + { + "name": "defaultAddCapabilities", + "baseName": "defaultAddCapabilities", + "type": "Array" + }, + { + "name": "defaultAllowPrivilegeEscalation", + "baseName": "defaultAllowPrivilegeEscalation", + "type": "boolean" + }, + { + "name": "forbiddenSysctls", + "baseName": "forbiddenSysctls", + "type": "Array" + }, + { + "name": "fsGroup", + "baseName": "fsGroup", + "type": "V1beta1FSGroupStrategyOptions" + }, + { + "name": "hostIPC", + "baseName": "hostIPC", + "type": "boolean" + }, + { + "name": "hostNetwork", + "baseName": "hostNetwork", + "type": "boolean" + }, + { + "name": "hostPID", + "baseName": "hostPID", + "type": "boolean" + }, + { + "name": "hostPorts", + "baseName": "hostPorts", + "type": "Array" + }, + { + "name": "privileged", + "baseName": "privileged", + "type": "boolean" + }, + { + "name": "readOnlyRootFilesystem", + "baseName": "readOnlyRootFilesystem", + "type": "boolean" + }, + { + "name": "requiredDropCapabilities", + "baseName": "requiredDropCapabilities", + "type": "Array" + }, + { + "name": "runAsGroup", + "baseName": "runAsGroup", + "type": "V1beta1RunAsGroupStrategyOptions" + }, + { + "name": "runAsUser", + "baseName": "runAsUser", + "type": "V1beta1RunAsUserStrategyOptions" + }, + { + "name": "runtimeClass", + "baseName": "runtimeClass", + "type": "V1beta1RuntimeClassStrategyOptions" + }, + { + "name": "seLinux", + "baseName": "seLinux", + "type": "V1beta1SELinuxStrategyOptions" + }, + { + "name": "supplementalGroups", + "baseName": "supplementalGroups", + "type": "V1beta1SupplementalGroupsStrategyOptions" + }, + { + "name": "volumes", + "baseName": "volumes", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1PodSecurityPolicySpec.js.map + +/***/ }), + +/***/ 83966: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PolicyRule = void 0; +/** +* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. +*/ +class V1beta1PolicyRule { + static getAttributeTypeMap() { + return V1beta1PolicyRule.attributeTypeMap; + } +} +exports.V1beta1PolicyRule = V1beta1PolicyRule; +V1beta1PolicyRule.discriminator = undefined; +V1beta1PolicyRule.attributeTypeMap = [ + { + "name": "apiGroups", + "baseName": "apiGroups", + "type": "Array" + }, + { + "name": "nonResourceURLs", + "baseName": "nonResourceURLs", + "type": "Array" + }, + { + "name": "resourceNames", + "baseName": "resourceNames", + "type": "Array" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1PolicyRule.js.map + +/***/ }), + +/***/ 6213: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PolicyRulesWithSubjects = void 0; +/** +* PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request. +*/ +class V1beta1PolicyRulesWithSubjects { + static getAttributeTypeMap() { + return V1beta1PolicyRulesWithSubjects.attributeTypeMap; + } +} +exports.V1beta1PolicyRulesWithSubjects = V1beta1PolicyRulesWithSubjects; +V1beta1PolicyRulesWithSubjects.discriminator = undefined; +V1beta1PolicyRulesWithSubjects.attributeTypeMap = [ + { + "name": "nonResourceRules", + "baseName": "nonResourceRules", + "type": "Array" + }, + { + "name": "resourceRules", + "baseName": "resourceRules", + "type": "Array" + }, + { + "name": "subjects", + "baseName": "subjects", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1PolicyRulesWithSubjects.js.map + +/***/ }), + +/***/ 75628: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PriorityClass = void 0; +/** +* DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. +*/ +class V1beta1PriorityClass { + static getAttributeTypeMap() { + return V1beta1PriorityClass.attributeTypeMap; + } +} +exports.V1beta1PriorityClass = V1beta1PriorityClass; +V1beta1PriorityClass.discriminator = undefined; +V1beta1PriorityClass.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "globalDefault", + "baseName": "globalDefault", + "type": "boolean" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "preemptionPolicy", + "baseName": "preemptionPolicy", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1PriorityClass.js.map + +/***/ }), + +/***/ 2448: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PriorityClassList = void 0; +/** +* PriorityClassList is a collection of priority classes. +*/ +class V1beta1PriorityClassList { + static getAttributeTypeMap() { + return V1beta1PriorityClassList.attributeTypeMap; + } +} +exports.V1beta1PriorityClassList = V1beta1PriorityClassList; +V1beta1PriorityClassList.discriminator = undefined; +V1beta1PriorityClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1PriorityClassList.js.map + +/***/ }), + +/***/ 44787: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PriorityLevelConfiguration = void 0; +/** +* PriorityLevelConfiguration represents the configuration of a priority level. +*/ +class V1beta1PriorityLevelConfiguration { + static getAttributeTypeMap() { + return V1beta1PriorityLevelConfiguration.attributeTypeMap; + } +} +exports.V1beta1PriorityLevelConfiguration = V1beta1PriorityLevelConfiguration; +V1beta1PriorityLevelConfiguration.discriminator = undefined; +V1beta1PriorityLevelConfiguration.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1PriorityLevelConfigurationSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1PriorityLevelConfigurationStatus" + } +]; +//# sourceMappingURL=v1beta1PriorityLevelConfiguration.js.map + +/***/ }), + +/***/ 12833: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PriorityLevelConfigurationCondition = void 0; +/** +* PriorityLevelConfigurationCondition defines the condition of priority level. +*/ +class V1beta1PriorityLevelConfigurationCondition { + static getAttributeTypeMap() { + return V1beta1PriorityLevelConfigurationCondition.attributeTypeMap; + } +} +exports.V1beta1PriorityLevelConfigurationCondition = V1beta1PriorityLevelConfigurationCondition; +V1beta1PriorityLevelConfigurationCondition.discriminator = undefined; +V1beta1PriorityLevelConfigurationCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1PriorityLevelConfigurationCondition.js.map + +/***/ }), + +/***/ 57721: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PriorityLevelConfigurationList = void 0; +/** +* PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. +*/ +class V1beta1PriorityLevelConfigurationList { + static getAttributeTypeMap() { + return V1beta1PriorityLevelConfigurationList.attributeTypeMap; + } +} +exports.V1beta1PriorityLevelConfigurationList = V1beta1PriorityLevelConfigurationList; +V1beta1PriorityLevelConfigurationList.discriminator = undefined; +V1beta1PriorityLevelConfigurationList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1PriorityLevelConfigurationList.js.map + +/***/ }), + +/***/ 32224: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PriorityLevelConfigurationReference = void 0; +/** +* PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. +*/ +class V1beta1PriorityLevelConfigurationReference { + static getAttributeTypeMap() { + return V1beta1PriorityLevelConfigurationReference.attributeTypeMap; + } +} +exports.V1beta1PriorityLevelConfigurationReference = V1beta1PriorityLevelConfigurationReference; +V1beta1PriorityLevelConfigurationReference.discriminator = undefined; +V1beta1PriorityLevelConfigurationReference.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1PriorityLevelConfigurationReference.js.map + +/***/ }), + +/***/ 90058: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PriorityLevelConfigurationSpec = void 0; +/** +* PriorityLevelConfigurationSpec specifies the configuration of a priority level. +*/ +class V1beta1PriorityLevelConfigurationSpec { + static getAttributeTypeMap() { + return V1beta1PriorityLevelConfigurationSpec.attributeTypeMap; + } +} +exports.V1beta1PriorityLevelConfigurationSpec = V1beta1PriorityLevelConfigurationSpec; +V1beta1PriorityLevelConfigurationSpec.discriminator = undefined; +V1beta1PriorityLevelConfigurationSpec.attributeTypeMap = [ + { + "name": "limited", + "baseName": "limited", + "type": "V1beta1LimitedPriorityLevelConfiguration" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1PriorityLevelConfigurationSpec.js.map + +/***/ }), + +/***/ 4641: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1PriorityLevelConfigurationStatus = void 0; +/** +* PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". +*/ +class V1beta1PriorityLevelConfigurationStatus { + static getAttributeTypeMap() { + return V1beta1PriorityLevelConfigurationStatus.attributeTypeMap; + } +} +exports.V1beta1PriorityLevelConfigurationStatus = V1beta1PriorityLevelConfigurationStatus; +V1beta1PriorityLevelConfigurationStatus.discriminator = undefined; +V1beta1PriorityLevelConfigurationStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1PriorityLevelConfigurationStatus.js.map + +/***/ }), + +/***/ 18090: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1QueuingConfiguration = void 0; +/** +* QueuingConfiguration holds the configuration parameters for queuing +*/ +class V1beta1QueuingConfiguration { + static getAttributeTypeMap() { + return V1beta1QueuingConfiguration.attributeTypeMap; + } +} +exports.V1beta1QueuingConfiguration = V1beta1QueuingConfiguration; +V1beta1QueuingConfiguration.discriminator = undefined; +V1beta1QueuingConfiguration.attributeTypeMap = [ + { + "name": "handSize", + "baseName": "handSize", + "type": "number" + }, + { + "name": "queueLengthLimit", + "baseName": "queueLengthLimit", + "type": "number" + }, + { + "name": "queues", + "baseName": "queues", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1QueuingConfiguration.js.map + +/***/ }), + +/***/ 78678: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ResourceAttributes = void 0; +/** +* ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface +*/ +class V1beta1ResourceAttributes { + static getAttributeTypeMap() { + return V1beta1ResourceAttributes.attributeTypeMap; + } +} +exports.V1beta1ResourceAttributes = V1beta1ResourceAttributes; +V1beta1ResourceAttributes.discriminator = undefined; +V1beta1ResourceAttributes.attributeTypeMap = [ + { + "name": "group", + "baseName": "group", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + }, + { + "name": "resource", + "baseName": "resource", + "type": "string" + }, + { + "name": "subresource", + "baseName": "subresource", + "type": "string" + }, + { + "name": "verb", + "baseName": "verb", + "type": "string" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1ResourceAttributes.js.map + +/***/ }), + +/***/ 58511: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ResourcePolicyRule = void 0; +/** +* ResourcePolicyRule is a predicate that matches some resource requests, testing the request\'s verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) least one member of namespaces matches the request. +*/ +class V1beta1ResourcePolicyRule { + static getAttributeTypeMap() { + return V1beta1ResourcePolicyRule.attributeTypeMap; + } +} +exports.V1beta1ResourcePolicyRule = V1beta1ResourcePolicyRule; +V1beta1ResourcePolicyRule.discriminator = undefined; +V1beta1ResourcePolicyRule.attributeTypeMap = [ + { + "name": "apiGroups", + "baseName": "apiGroups", + "type": "Array" + }, + { + "name": "clusterScope", + "baseName": "clusterScope", + "type": "boolean" + }, + { + "name": "namespaces", + "baseName": "namespaces", + "type": "Array" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1ResourcePolicyRule.js.map + +/***/ }), + +/***/ 21028: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ResourceRule = void 0; +/** +* ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn\'t significant, may contain duplicates, and possibly be incomplete. +*/ +class V1beta1ResourceRule { + static getAttributeTypeMap() { + return V1beta1ResourceRule.attributeTypeMap; + } +} +exports.V1beta1ResourceRule = V1beta1ResourceRule; +V1beta1ResourceRule.discriminator = undefined; +V1beta1ResourceRule.attributeTypeMap = [ + { + "name": "apiGroups", + "baseName": "apiGroups", + "type": "Array" + }, + { + "name": "resourceNames", + "baseName": "resourceNames", + "type": "Array" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + }, + { + "name": "verbs", + "baseName": "verbs", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1ResourceRule.js.map + +/***/ }), + +/***/ 92494: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1Role = void 0; +/** +* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. +*/ +class V1beta1Role { + static getAttributeTypeMap() { + return V1beta1Role.attributeTypeMap; + } +} +exports.V1beta1Role = V1beta1Role; +V1beta1Role.discriminator = undefined; +V1beta1Role.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1Role.js.map + +/***/ }), + +/***/ 19582: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RoleBinding = void 0; +/** +* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. +*/ +class V1beta1RoleBinding { + static getAttributeTypeMap() { + return V1beta1RoleBinding.attributeTypeMap; + } +} +exports.V1beta1RoleBinding = V1beta1RoleBinding; +V1beta1RoleBinding.discriminator = undefined; +V1beta1RoleBinding.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "roleRef", + "baseName": "roleRef", + "type": "V1beta1RoleRef" + }, + { + "name": "subjects", + "baseName": "subjects", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1RoleBinding.js.map + +/***/ }), + +/***/ 68085: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RoleBindingList = void 0; +/** +* RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22. +*/ +class V1beta1RoleBindingList { + static getAttributeTypeMap() { + return V1beta1RoleBindingList.attributeTypeMap; + } +} +exports.V1beta1RoleBindingList = V1beta1RoleBindingList; +V1beta1RoleBindingList.discriminator = undefined; +V1beta1RoleBindingList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1RoleBindingList.js.map + +/***/ }), + +/***/ 97239: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RoleList = void 0; +/** +* RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22. +*/ +class V1beta1RoleList { + static getAttributeTypeMap() { + return V1beta1RoleList.attributeTypeMap; + } +} +exports.V1beta1RoleList = V1beta1RoleList; +V1beta1RoleList.discriminator = undefined; +V1beta1RoleList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1RoleList.js.map + +/***/ }), + +/***/ 34021: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RoleRef = void 0; +/** +* RoleRef contains information that points to the role being used +*/ +class V1beta1RoleRef { + static getAttributeTypeMap() { + return V1beta1RoleRef.attributeTypeMap; + } +} +exports.V1beta1RoleRef = V1beta1RoleRef; +V1beta1RoleRef.discriminator = undefined; +V1beta1RoleRef.attributeTypeMap = [ + { + "name": "apiGroup", + "baseName": "apiGroup", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1RoleRef.js.map + +/***/ }), + +/***/ 67315: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RuleWithOperations = void 0; +/** +* RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. +*/ +class V1beta1RuleWithOperations { + static getAttributeTypeMap() { + return V1beta1RuleWithOperations.attributeTypeMap; + } +} +exports.V1beta1RuleWithOperations = V1beta1RuleWithOperations; +V1beta1RuleWithOperations.discriminator = undefined; +V1beta1RuleWithOperations.attributeTypeMap = [ + { + "name": "apiGroups", + "baseName": "apiGroups", + "type": "Array" + }, + { + "name": "apiVersions", + "baseName": "apiVersions", + "type": "Array" + }, + { + "name": "operations", + "baseName": "operations", + "type": "Array" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + }, + { + "name": "scope", + "baseName": "scope", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1RuleWithOperations.js.map + +/***/ }), + +/***/ 74178: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RunAsGroupStrategyOptions = void 0; +/** +* RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. +*/ +class V1beta1RunAsGroupStrategyOptions { + static getAttributeTypeMap() { + return V1beta1RunAsGroupStrategyOptions.attributeTypeMap; + } +} +exports.V1beta1RunAsGroupStrategyOptions = V1beta1RunAsGroupStrategyOptions; +V1beta1RunAsGroupStrategyOptions.discriminator = undefined; +V1beta1RunAsGroupStrategyOptions.attributeTypeMap = [ + { + "name": "ranges", + "baseName": "ranges", + "type": "Array" + }, + { + "name": "rule", + "baseName": "rule", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1RunAsGroupStrategyOptions.js.map + +/***/ }), + +/***/ 77258: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RunAsUserStrategyOptions = void 0; +/** +* RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. +*/ +class V1beta1RunAsUserStrategyOptions { + static getAttributeTypeMap() { + return V1beta1RunAsUserStrategyOptions.attributeTypeMap; + } +} +exports.V1beta1RunAsUserStrategyOptions = V1beta1RunAsUserStrategyOptions; +V1beta1RunAsUserStrategyOptions.discriminator = undefined; +V1beta1RunAsUserStrategyOptions.attributeTypeMap = [ + { + "name": "ranges", + "baseName": "ranges", + "type": "Array" + }, + { + "name": "rule", + "baseName": "rule", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1RunAsUserStrategyOptions.js.map + +/***/ }), + +/***/ 65466: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RuntimeClass = void 0; +/** +* RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md +*/ +class V1beta1RuntimeClass { + static getAttributeTypeMap() { + return V1beta1RuntimeClass.attributeTypeMap; + } +} +exports.V1beta1RuntimeClass = V1beta1RuntimeClass; +V1beta1RuntimeClass.discriminator = undefined; +V1beta1RuntimeClass.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "handler", + "baseName": "handler", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "overhead", + "baseName": "overhead", + "type": "V1beta1Overhead" + }, + { + "name": "scheduling", + "baseName": "scheduling", + "type": "V1beta1Scheduling" + } +]; +//# sourceMappingURL=v1beta1RuntimeClass.js.map + +/***/ }), + +/***/ 89177: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RuntimeClassList = void 0; +/** +* RuntimeClassList is a list of RuntimeClass objects. +*/ +class V1beta1RuntimeClassList { + static getAttributeTypeMap() { + return V1beta1RuntimeClassList.attributeTypeMap; + } +} +exports.V1beta1RuntimeClassList = V1beta1RuntimeClassList; +V1beta1RuntimeClassList.discriminator = undefined; +V1beta1RuntimeClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1RuntimeClassList.js.map + +/***/ }), + +/***/ 96835: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1RuntimeClassStrategyOptions = void 0; +/** +* RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod. +*/ +class V1beta1RuntimeClassStrategyOptions { + static getAttributeTypeMap() { + return V1beta1RuntimeClassStrategyOptions.attributeTypeMap; + } +} +exports.V1beta1RuntimeClassStrategyOptions = V1beta1RuntimeClassStrategyOptions; +V1beta1RuntimeClassStrategyOptions.discriminator = undefined; +V1beta1RuntimeClassStrategyOptions.attributeTypeMap = [ + { + "name": "allowedRuntimeClassNames", + "baseName": "allowedRuntimeClassNames", + "type": "Array" + }, + { + "name": "defaultRuntimeClassName", + "baseName": "defaultRuntimeClassName", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1RuntimeClassStrategyOptions.js.map + +/***/ }), + +/***/ 87047: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SELinuxStrategyOptions = void 0; +/** +* SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. +*/ +class V1beta1SELinuxStrategyOptions { + static getAttributeTypeMap() { + return V1beta1SELinuxStrategyOptions.attributeTypeMap; + } +} +exports.V1beta1SELinuxStrategyOptions = V1beta1SELinuxStrategyOptions; +V1beta1SELinuxStrategyOptions.discriminator = undefined; +V1beta1SELinuxStrategyOptions.attributeTypeMap = [ + { + "name": "rule", + "baseName": "rule", + "type": "string" + }, + { + "name": "seLinuxOptions", + "baseName": "seLinuxOptions", + "type": "V1SELinuxOptions" + } +]; +//# sourceMappingURL=v1beta1SELinuxStrategyOptions.js.map + +/***/ }), + +/***/ 32498: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1Scheduling = void 0; +/** +* Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. +*/ +class V1beta1Scheduling { + static getAttributeTypeMap() { + return V1beta1Scheduling.attributeTypeMap; + } +} +exports.V1beta1Scheduling = V1beta1Scheduling; +V1beta1Scheduling.discriminator = undefined; +V1beta1Scheduling.attributeTypeMap = [ + { + "name": "nodeSelector", + "baseName": "nodeSelector", + "type": "{ [key: string]: string; }" + }, + { + "name": "tolerations", + "baseName": "tolerations", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1Scheduling.js.map + +/***/ }), + +/***/ 95373: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SelfSubjectAccessReview = void 0; +/** +* SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action +*/ +class V1beta1SelfSubjectAccessReview { + static getAttributeTypeMap() { + return V1beta1SelfSubjectAccessReview.attributeTypeMap; + } +} +exports.V1beta1SelfSubjectAccessReview = V1beta1SelfSubjectAccessReview; +V1beta1SelfSubjectAccessReview.discriminator = undefined; +V1beta1SelfSubjectAccessReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1SelfSubjectAccessReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1SubjectAccessReviewStatus" + } +]; +//# sourceMappingURL=v1beta1SelfSubjectAccessReview.js.map + +/***/ }), + +/***/ 13872: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SelfSubjectAccessReviewSpec = void 0; +/** +* SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set +*/ +class V1beta1SelfSubjectAccessReviewSpec { + static getAttributeTypeMap() { + return V1beta1SelfSubjectAccessReviewSpec.attributeTypeMap; + } +} +exports.V1beta1SelfSubjectAccessReviewSpec = V1beta1SelfSubjectAccessReviewSpec; +V1beta1SelfSubjectAccessReviewSpec.discriminator = undefined; +V1beta1SelfSubjectAccessReviewSpec.attributeTypeMap = [ + { + "name": "nonResourceAttributes", + "baseName": "nonResourceAttributes", + "type": "V1beta1NonResourceAttributes" + }, + { + "name": "resourceAttributes", + "baseName": "resourceAttributes", + "type": "V1beta1ResourceAttributes" + } +]; +//# sourceMappingURL=v1beta1SelfSubjectAccessReviewSpec.js.map + +/***/ }), + +/***/ 95993: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SelfSubjectRulesReview = void 0; +/** +* SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server\'s authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. +*/ +class V1beta1SelfSubjectRulesReview { + static getAttributeTypeMap() { + return V1beta1SelfSubjectRulesReview.attributeTypeMap; + } +} +exports.V1beta1SelfSubjectRulesReview = V1beta1SelfSubjectRulesReview; +V1beta1SelfSubjectRulesReview.discriminator = undefined; +V1beta1SelfSubjectRulesReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1SelfSubjectRulesReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1SubjectRulesReviewStatus" + } +]; +//# sourceMappingURL=v1beta1SelfSubjectRulesReview.js.map + +/***/ }), + +/***/ 94811: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SelfSubjectRulesReviewSpec = void 0; +class V1beta1SelfSubjectRulesReviewSpec { + static getAttributeTypeMap() { + return V1beta1SelfSubjectRulesReviewSpec.attributeTypeMap; + } +} +exports.V1beta1SelfSubjectRulesReviewSpec = V1beta1SelfSubjectRulesReviewSpec; +V1beta1SelfSubjectRulesReviewSpec.discriminator = undefined; +V1beta1SelfSubjectRulesReviewSpec.attributeTypeMap = [ + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1SelfSubjectRulesReviewSpec.js.map + +/***/ }), + +/***/ 9806: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ServiceAccountSubject = void 0; +/** +* ServiceAccountSubject holds detailed information for service-account-kind subject. +*/ +class V1beta1ServiceAccountSubject { + static getAttributeTypeMap() { + return V1beta1ServiceAccountSubject.attributeTypeMap; + } +} +exports.V1beta1ServiceAccountSubject = V1beta1ServiceAccountSubject; +V1beta1ServiceAccountSubject.discriminator = undefined; +V1beta1ServiceAccountSubject.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespace", + "baseName": "namespace", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1ServiceAccountSubject.js.map + +/***/ }), + +/***/ 59527: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1StorageClass = void 0; +/** +* StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name. +*/ +class V1beta1StorageClass { + static getAttributeTypeMap() { + return V1beta1StorageClass.attributeTypeMap; + } +} +exports.V1beta1StorageClass = V1beta1StorageClass; +V1beta1StorageClass.discriminator = undefined; +V1beta1StorageClass.attributeTypeMap = [ + { + "name": "allowVolumeExpansion", + "baseName": "allowVolumeExpansion", + "type": "boolean" + }, + { + "name": "allowedTopologies", + "baseName": "allowedTopologies", + "type": "Array" + }, + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "mountOptions", + "baseName": "mountOptions", + "type": "Array" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "{ [key: string]: string; }" + }, + { + "name": "provisioner", + "baseName": "provisioner", + "type": "string" + }, + { + "name": "reclaimPolicy", + "baseName": "reclaimPolicy", + "type": "string" + }, + { + "name": "volumeBindingMode", + "baseName": "volumeBindingMode", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1StorageClass.js.map + +/***/ }), + +/***/ 53104: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1StorageClassList = void 0; +/** +* StorageClassList is a collection of storage classes. +*/ +class V1beta1StorageClassList { + static getAttributeTypeMap() { + return V1beta1StorageClassList.attributeTypeMap; + } +} +exports.V1beta1StorageClassList = V1beta1StorageClassList; +V1beta1StorageClassList.discriminator = undefined; +V1beta1StorageClassList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1StorageClassList.js.map + +/***/ }), + +/***/ 42158: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SubjectAccessReview = void 0; +/** +* SubjectAccessReview checks whether or not a user or group can perform an action. +*/ +class V1beta1SubjectAccessReview { + static getAttributeTypeMap() { + return V1beta1SubjectAccessReview.attributeTypeMap; + } +} +exports.V1beta1SubjectAccessReview = V1beta1SubjectAccessReview; +V1beta1SubjectAccessReview.discriminator = undefined; +V1beta1SubjectAccessReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1SubjectAccessReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1SubjectAccessReviewStatus" + } +]; +//# sourceMappingURL=v1beta1SubjectAccessReview.js.map + +/***/ }), + +/***/ 99226: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SubjectAccessReviewSpec = void 0; +/** +* SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set +*/ +class V1beta1SubjectAccessReviewSpec { + static getAttributeTypeMap() { + return V1beta1SubjectAccessReviewSpec.attributeTypeMap; + } +} +exports.V1beta1SubjectAccessReviewSpec = V1beta1SubjectAccessReviewSpec; +V1beta1SubjectAccessReviewSpec.discriminator = undefined; +V1beta1SubjectAccessReviewSpec.attributeTypeMap = [ + { + "name": "extra", + "baseName": "extra", + "type": "{ [key: string]: Array; }" + }, + { + "name": "group", + "baseName": "group", + "type": "Array" + }, + { + "name": "nonResourceAttributes", + "baseName": "nonResourceAttributes", + "type": "V1beta1NonResourceAttributes" + }, + { + "name": "resourceAttributes", + "baseName": "resourceAttributes", + "type": "V1beta1ResourceAttributes" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + }, + { + "name": "user", + "baseName": "user", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1SubjectAccessReviewSpec.js.map + +/***/ }), + +/***/ 38415: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SubjectAccessReviewStatus = void 0; +/** +* SubjectAccessReviewStatus +*/ +class V1beta1SubjectAccessReviewStatus { + static getAttributeTypeMap() { + return V1beta1SubjectAccessReviewStatus.attributeTypeMap; + } +} +exports.V1beta1SubjectAccessReviewStatus = V1beta1SubjectAccessReviewStatus; +V1beta1SubjectAccessReviewStatus.discriminator = undefined; +V1beta1SubjectAccessReviewStatus.attributeTypeMap = [ + { + "name": "allowed", + "baseName": "allowed", + "type": "boolean" + }, + { + "name": "denied", + "baseName": "denied", + "type": "boolean" + }, + { + "name": "evaluationError", + "baseName": "evaluationError", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1SubjectAccessReviewStatus.js.map + +/***/ }), + +/***/ 23675: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SubjectRulesReviewStatus = void 0; +/** +* SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it\'s safe to assume the subject has that permission, even if that list is incomplete. +*/ +class V1beta1SubjectRulesReviewStatus { + static getAttributeTypeMap() { + return V1beta1SubjectRulesReviewStatus.attributeTypeMap; + } +} +exports.V1beta1SubjectRulesReviewStatus = V1beta1SubjectRulesReviewStatus; +V1beta1SubjectRulesReviewStatus.discriminator = undefined; +V1beta1SubjectRulesReviewStatus.attributeTypeMap = [ + { + "name": "evaluationError", + "baseName": "evaluationError", + "type": "string" + }, + { + "name": "incomplete", + "baseName": "incomplete", + "type": "boolean" + }, + { + "name": "nonResourceRules", + "baseName": "nonResourceRules", + "type": "Array" + }, + { + "name": "resourceRules", + "baseName": "resourceRules", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1SubjectRulesReviewStatus.js.map + +/***/ }), + +/***/ 42686: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1SupplementalGroupsStrategyOptions = void 0; +/** +* SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. +*/ +class V1beta1SupplementalGroupsStrategyOptions { + static getAttributeTypeMap() { + return V1beta1SupplementalGroupsStrategyOptions.attributeTypeMap; + } +} +exports.V1beta1SupplementalGroupsStrategyOptions = V1beta1SupplementalGroupsStrategyOptions; +V1beta1SupplementalGroupsStrategyOptions.discriminator = undefined; +V1beta1SupplementalGroupsStrategyOptions.attributeTypeMap = [ + { + "name": "ranges", + "baseName": "ranges", + "type": "Array" + }, + { + "name": "rule", + "baseName": "rule", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1SupplementalGroupsStrategyOptions.js.map + +/***/ }), + +/***/ 94406: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1TokenRequest = void 0; +/** +* TokenRequest contains parameters of a service account token. +*/ +class V1beta1TokenRequest { + static getAttributeTypeMap() { + return V1beta1TokenRequest.attributeTypeMap; + } +} +exports.V1beta1TokenRequest = V1beta1TokenRequest; +V1beta1TokenRequest.discriminator = undefined; +V1beta1TokenRequest.attributeTypeMap = [ + { + "name": "audience", + "baseName": "audience", + "type": "string" + }, + { + "name": "expirationSeconds", + "baseName": "expirationSeconds", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1TokenRequest.js.map + +/***/ }), + +/***/ 63997: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1TokenReview = void 0; +/** +* TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver. +*/ +class V1beta1TokenReview { + static getAttributeTypeMap() { + return V1beta1TokenReview.attributeTypeMap; + } +} +exports.V1beta1TokenReview = V1beta1TokenReview; +V1beta1TokenReview.discriminator = undefined; +V1beta1TokenReview.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1TokenReviewSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1TokenReviewStatus" + } +]; +//# sourceMappingURL=v1beta1TokenReview.js.map + +/***/ }), + +/***/ 54015: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1TokenReviewSpec = void 0; +/** +* TokenReviewSpec is a description of the token authentication request. +*/ +class V1beta1TokenReviewSpec { + static getAttributeTypeMap() { + return V1beta1TokenReviewSpec.attributeTypeMap; + } +} +exports.V1beta1TokenReviewSpec = V1beta1TokenReviewSpec; +V1beta1TokenReviewSpec.discriminator = undefined; +V1beta1TokenReviewSpec.attributeTypeMap = [ + { + "name": "audiences", + "baseName": "audiences", + "type": "Array" + }, + { + "name": "token", + "baseName": "token", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1TokenReviewSpec.js.map + +/***/ }), + +/***/ 51195: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1TokenReviewStatus = void 0; +/** +* TokenReviewStatus is the result of the token authentication request. +*/ +class V1beta1TokenReviewStatus { + static getAttributeTypeMap() { + return V1beta1TokenReviewStatus.attributeTypeMap; + } +} +exports.V1beta1TokenReviewStatus = V1beta1TokenReviewStatus; +V1beta1TokenReviewStatus.discriminator = undefined; +V1beta1TokenReviewStatus.attributeTypeMap = [ + { + "name": "audiences", + "baseName": "audiences", + "type": "Array" + }, + { + "name": "authenticated", + "baseName": "authenticated", + "type": "boolean" + }, + { + "name": "error", + "baseName": "error", + "type": "string" + }, + { + "name": "user", + "baseName": "user", + "type": "V1beta1UserInfo" + } +]; +//# sourceMappingURL=v1beta1TokenReviewStatus.js.map + +/***/ }), + +/***/ 98901: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1UserInfo = void 0; +/** +* UserInfo holds the information about the user needed to implement the user.Info interface. +*/ +class V1beta1UserInfo { + static getAttributeTypeMap() { + return V1beta1UserInfo.attributeTypeMap; + } +} +exports.V1beta1UserInfo = V1beta1UserInfo; +V1beta1UserInfo.discriminator = undefined; +V1beta1UserInfo.attributeTypeMap = [ + { + "name": "extra", + "baseName": "extra", + "type": "{ [key: string]: Array; }" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array" + }, + { + "name": "uid", + "baseName": "uid", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1UserInfo.js.map + +/***/ }), + +/***/ 57664: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1UserSubject = void 0; +/** +* UserSubject holds detailed information for user-kind subject. +*/ +class V1beta1UserSubject { + static getAttributeTypeMap() { + return V1beta1UserSubject.attributeTypeMap; + } +} +exports.V1beta1UserSubject = V1beta1UserSubject; +V1beta1UserSubject.discriminator = undefined; +V1beta1UserSubject.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1UserSubject.js.map + +/***/ }), + +/***/ 91590: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ValidatingWebhook = void 0; +/** +* ValidatingWebhook describes an admission webhook and the resources and operations it applies to. +*/ +class V1beta1ValidatingWebhook { + static getAttributeTypeMap() { + return V1beta1ValidatingWebhook.attributeTypeMap; + } +} +exports.V1beta1ValidatingWebhook = V1beta1ValidatingWebhook; +V1beta1ValidatingWebhook.discriminator = undefined; +V1beta1ValidatingWebhook.attributeTypeMap = [ + { + "name": "admissionReviewVersions", + "baseName": "admissionReviewVersions", + "type": "Array" + }, + { + "name": "clientConfig", + "baseName": "clientConfig", + "type": "AdmissionregistrationV1beta1WebhookClientConfig" + }, + { + "name": "failurePolicy", + "baseName": "failurePolicy", + "type": "string" + }, + { + "name": "matchPolicy", + "baseName": "matchPolicy", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "namespaceSelector", + "baseName": "namespaceSelector", + "type": "V1LabelSelector" + }, + { + "name": "objectSelector", + "baseName": "objectSelector", + "type": "V1LabelSelector" + }, + { + "name": "rules", + "baseName": "rules", + "type": "Array" + }, + { + "name": "sideEffects", + "baseName": "sideEffects", + "type": "string" + }, + { + "name": "timeoutSeconds", + "baseName": "timeoutSeconds", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1ValidatingWebhook.js.map + +/***/ }), + +/***/ 87363: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ValidatingWebhookConfiguration = void 0; +/** +* ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead. +*/ +class V1beta1ValidatingWebhookConfiguration { + static getAttributeTypeMap() { + return V1beta1ValidatingWebhookConfiguration.attributeTypeMap; + } +} +exports.V1beta1ValidatingWebhookConfiguration = V1beta1ValidatingWebhookConfiguration; +V1beta1ValidatingWebhookConfiguration.discriminator = undefined; +V1beta1ValidatingWebhookConfiguration.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array" + } +]; +//# sourceMappingURL=v1beta1ValidatingWebhookConfiguration.js.map + +/***/ }), + +/***/ 47530: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1ValidatingWebhookConfigurationList = void 0; +/** +* ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. +*/ +class V1beta1ValidatingWebhookConfigurationList { + static getAttributeTypeMap() { + return V1beta1ValidatingWebhookConfigurationList.attributeTypeMap; + } +} +exports.V1beta1ValidatingWebhookConfigurationList = V1beta1ValidatingWebhookConfigurationList; +V1beta1ValidatingWebhookConfigurationList.discriminator = undefined; +V1beta1ValidatingWebhookConfigurationList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1ValidatingWebhookConfigurationList.js.map + +/***/ }), + +/***/ 71450: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1VolumeAttachment = void 0; +/** +* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced. +*/ +class V1beta1VolumeAttachment { + static getAttributeTypeMap() { + return V1beta1VolumeAttachment.attributeTypeMap; + } +} +exports.V1beta1VolumeAttachment = V1beta1VolumeAttachment; +V1beta1VolumeAttachment.discriminator = undefined; +V1beta1VolumeAttachment.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1beta1VolumeAttachmentSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V1beta1VolumeAttachmentStatus" + } +]; +//# sourceMappingURL=v1beta1VolumeAttachment.js.map + +/***/ }), + +/***/ 56970: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1VolumeAttachmentList = void 0; +/** +* VolumeAttachmentList is a collection of VolumeAttachment objects. +*/ +class V1beta1VolumeAttachmentList { + static getAttributeTypeMap() { + return V1beta1VolumeAttachmentList.attributeTypeMap; + } +} +exports.V1beta1VolumeAttachmentList = V1beta1VolumeAttachmentList; +V1beta1VolumeAttachmentList.discriminator = undefined; +V1beta1VolumeAttachmentList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v1beta1VolumeAttachmentList.js.map + +/***/ }), + +/***/ 15211: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1VolumeAttachmentSource = void 0; +/** +* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. +*/ +class V1beta1VolumeAttachmentSource { + static getAttributeTypeMap() { + return V1beta1VolumeAttachmentSource.attributeTypeMap; + } +} +exports.V1beta1VolumeAttachmentSource = V1beta1VolumeAttachmentSource; +V1beta1VolumeAttachmentSource.discriminator = undefined; +V1beta1VolumeAttachmentSource.attributeTypeMap = [ + { + "name": "inlineVolumeSpec", + "baseName": "inlineVolumeSpec", + "type": "V1PersistentVolumeSpec" + }, + { + "name": "persistentVolumeName", + "baseName": "persistentVolumeName", + "type": "string" + } +]; +//# sourceMappingURL=v1beta1VolumeAttachmentSource.js.map + +/***/ }), + +/***/ 98579: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1VolumeAttachmentSpec = void 0; +/** +* VolumeAttachmentSpec is the specification of a VolumeAttachment request. +*/ +class V1beta1VolumeAttachmentSpec { + static getAttributeTypeMap() { + return V1beta1VolumeAttachmentSpec.attributeTypeMap; + } +} +exports.V1beta1VolumeAttachmentSpec = V1beta1VolumeAttachmentSpec; +V1beta1VolumeAttachmentSpec.discriminator = undefined; +V1beta1VolumeAttachmentSpec.attributeTypeMap = [ + { + "name": "attacher", + "baseName": "attacher", + "type": "string" + }, + { + "name": "nodeName", + "baseName": "nodeName", + "type": "string" + }, + { + "name": "source", + "baseName": "source", + "type": "V1beta1VolumeAttachmentSource" + } +]; +//# sourceMappingURL=v1beta1VolumeAttachmentSpec.js.map + +/***/ }), + +/***/ 80522: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1VolumeAttachmentStatus = void 0; +/** +* VolumeAttachmentStatus is the status of a VolumeAttachment request. +*/ +class V1beta1VolumeAttachmentStatus { + static getAttributeTypeMap() { + return V1beta1VolumeAttachmentStatus.attributeTypeMap; + } +} +exports.V1beta1VolumeAttachmentStatus = V1beta1VolumeAttachmentStatus; +V1beta1VolumeAttachmentStatus.discriminator = undefined; +V1beta1VolumeAttachmentStatus.attributeTypeMap = [ + { + "name": "attachError", + "baseName": "attachError", + "type": "V1beta1VolumeError" + }, + { + "name": "attached", + "baseName": "attached", + "type": "boolean" + }, + { + "name": "attachmentMetadata", + "baseName": "attachmentMetadata", + "type": "{ [key: string]: string; }" + }, + { + "name": "detachError", + "baseName": "detachError", + "type": "V1beta1VolumeError" + } +]; +//# sourceMappingURL=v1beta1VolumeAttachmentStatus.js.map + +/***/ }), + +/***/ 1706: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1VolumeError = void 0; +/** +* VolumeError captures an error encountered during a volume operation. +*/ +class V1beta1VolumeError { + static getAttributeTypeMap() { + return V1beta1VolumeError.attributeTypeMap; + } +} +exports.V1beta1VolumeError = V1beta1VolumeError; +V1beta1VolumeError.discriminator = undefined; +V1beta1VolumeError.attributeTypeMap = [ + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "time", + "baseName": "time", + "type": "Date" + } +]; +//# sourceMappingURL=v1beta1VolumeError.js.map + +/***/ }), + +/***/ 14240: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V1beta1VolumeNodeResources = void 0; +/** +* VolumeNodeResources is a set of resource limits for scheduling of volumes. +*/ +class V1beta1VolumeNodeResources { + static getAttributeTypeMap() { + return V1beta1VolumeNodeResources.attributeTypeMap; + } +} +exports.V1beta1VolumeNodeResources = V1beta1VolumeNodeResources; +V1beta1VolumeNodeResources.discriminator = undefined; +V1beta1VolumeNodeResources.attributeTypeMap = [ + { + "name": "count", + "baseName": "count", + "type": "number" + } +]; +//# sourceMappingURL=v1beta1VolumeNodeResources.js.map + +/***/ }), + +/***/ 66922: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1ContainerResourceMetricSource = void 0; +/** +* ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set. +*/ +class V2beta1ContainerResourceMetricSource { + static getAttributeTypeMap() { + return V2beta1ContainerResourceMetricSource.attributeTypeMap; + } +} +exports.V2beta1ContainerResourceMetricSource = V2beta1ContainerResourceMetricSource; +V2beta1ContainerResourceMetricSource.discriminator = undefined; +V2beta1ContainerResourceMetricSource.attributeTypeMap = [ + { + "name": "container", + "baseName": "container", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "targetAverageUtilization", + "baseName": "targetAverageUtilization", + "type": "number" + }, + { + "name": "targetAverageValue", + "baseName": "targetAverageValue", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1ContainerResourceMetricSource.js.map + +/***/ }), + +/***/ 5608: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1ContainerResourceMetricStatus = void 0; +/** +* ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. +*/ +class V2beta1ContainerResourceMetricStatus { + static getAttributeTypeMap() { + return V2beta1ContainerResourceMetricStatus.attributeTypeMap; + } +} +exports.V2beta1ContainerResourceMetricStatus = V2beta1ContainerResourceMetricStatus; +V2beta1ContainerResourceMetricStatus.discriminator = undefined; +V2beta1ContainerResourceMetricStatus.attributeTypeMap = [ + { + "name": "container", + "baseName": "container", + "type": "string" + }, + { + "name": "currentAverageUtilization", + "baseName": "currentAverageUtilization", + "type": "number" + }, + { + "name": "currentAverageValue", + "baseName": "currentAverageValue", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1ContainerResourceMetricStatus.js.map + +/***/ }), + +/***/ 89681: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1CrossVersionObjectReference = void 0; +/** +* CrossVersionObjectReference contains enough information to let you identify the referred resource. +*/ +class V2beta1CrossVersionObjectReference { + static getAttributeTypeMap() { + return V2beta1CrossVersionObjectReference.attributeTypeMap; + } +} +exports.V2beta1CrossVersionObjectReference = V2beta1CrossVersionObjectReference; +V2beta1CrossVersionObjectReference.discriminator = undefined; +V2beta1CrossVersionObjectReference.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1CrossVersionObjectReference.js.map + +/***/ }), + +/***/ 33128: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1ExternalMetricSource = void 0; +/** +* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set. +*/ +class V2beta1ExternalMetricSource { + static getAttributeTypeMap() { + return V2beta1ExternalMetricSource.attributeTypeMap; + } +} +exports.V2beta1ExternalMetricSource = V2beta1ExternalMetricSource; +V2beta1ExternalMetricSource.discriminator = undefined; +V2beta1ExternalMetricSource.attributeTypeMap = [ + { + "name": "metricName", + "baseName": "metricName", + "type": "string" + }, + { + "name": "metricSelector", + "baseName": "metricSelector", + "type": "V1LabelSelector" + }, + { + "name": "targetAverageValue", + "baseName": "targetAverageValue", + "type": "string" + }, + { + "name": "targetValue", + "baseName": "targetValue", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1ExternalMetricSource.js.map + +/***/ }), + +/***/ 85775: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1ExternalMetricStatus = void 0; +/** +* ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. +*/ +class V2beta1ExternalMetricStatus { + static getAttributeTypeMap() { + return V2beta1ExternalMetricStatus.attributeTypeMap; + } +} +exports.V2beta1ExternalMetricStatus = V2beta1ExternalMetricStatus; +V2beta1ExternalMetricStatus.discriminator = undefined; +V2beta1ExternalMetricStatus.attributeTypeMap = [ + { + "name": "currentAverageValue", + "baseName": "currentAverageValue", + "type": "string" + }, + { + "name": "currentValue", + "baseName": "currentValue", + "type": "string" + }, + { + "name": "metricName", + "baseName": "metricName", + "type": "string" + }, + { + "name": "metricSelector", + "baseName": "metricSelector", + "type": "V1LabelSelector" + } +]; +//# sourceMappingURL=v2beta1ExternalMetricStatus.js.map + +/***/ }), + +/***/ 1023: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1HorizontalPodAutoscaler = void 0; +/** +* HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified. +*/ +class V2beta1HorizontalPodAutoscaler { + static getAttributeTypeMap() { + return V2beta1HorizontalPodAutoscaler.attributeTypeMap; + } +} +exports.V2beta1HorizontalPodAutoscaler = V2beta1HorizontalPodAutoscaler; +V2beta1HorizontalPodAutoscaler.discriminator = undefined; +V2beta1HorizontalPodAutoscaler.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V2beta1HorizontalPodAutoscalerSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V2beta1HorizontalPodAutoscalerStatus" + } +]; +//# sourceMappingURL=v2beta1HorizontalPodAutoscaler.js.map + +/***/ }), + +/***/ 84034: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1HorizontalPodAutoscalerCondition = void 0; +/** +* HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. +*/ +class V2beta1HorizontalPodAutoscalerCondition { + static getAttributeTypeMap() { + return V2beta1HorizontalPodAutoscalerCondition.attributeTypeMap; + } +} +exports.V2beta1HorizontalPodAutoscalerCondition = V2beta1HorizontalPodAutoscalerCondition; +V2beta1HorizontalPodAutoscalerCondition.discriminator = undefined; +V2beta1HorizontalPodAutoscalerCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1HorizontalPodAutoscalerCondition.js.map + +/***/ }), + +/***/ 57894: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1HorizontalPodAutoscalerList = void 0; +/** +* HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. +*/ +class V2beta1HorizontalPodAutoscalerList { + static getAttributeTypeMap() { + return V2beta1HorizontalPodAutoscalerList.attributeTypeMap; + } +} +exports.V2beta1HorizontalPodAutoscalerList = V2beta1HorizontalPodAutoscalerList; +V2beta1HorizontalPodAutoscalerList.discriminator = undefined; +V2beta1HorizontalPodAutoscalerList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v2beta1HorizontalPodAutoscalerList.js.map + +/***/ }), + +/***/ 3023: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1HorizontalPodAutoscalerSpec = void 0; +/** +* HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. +*/ +class V2beta1HorizontalPodAutoscalerSpec { + static getAttributeTypeMap() { + return V2beta1HorizontalPodAutoscalerSpec.attributeTypeMap; + } +} +exports.V2beta1HorizontalPodAutoscalerSpec = V2beta1HorizontalPodAutoscalerSpec; +V2beta1HorizontalPodAutoscalerSpec.discriminator = undefined; +V2beta1HorizontalPodAutoscalerSpec.attributeTypeMap = [ + { + "name": "maxReplicas", + "baseName": "maxReplicas", + "type": "number" + }, + { + "name": "metrics", + "baseName": "metrics", + "type": "Array" + }, + { + "name": "minReplicas", + "baseName": "minReplicas", + "type": "number" + }, + { + "name": "scaleTargetRef", + "baseName": "scaleTargetRef", + "type": "V2beta1CrossVersionObjectReference" + } +]; +//# sourceMappingURL=v2beta1HorizontalPodAutoscalerSpec.js.map + +/***/ }), + +/***/ 90870: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1HorizontalPodAutoscalerStatus = void 0; +/** +* HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. +*/ +class V2beta1HorizontalPodAutoscalerStatus { + static getAttributeTypeMap() { + return V2beta1HorizontalPodAutoscalerStatus.attributeTypeMap; + } +} +exports.V2beta1HorizontalPodAutoscalerStatus = V2beta1HorizontalPodAutoscalerStatus; +V2beta1HorizontalPodAutoscalerStatus.discriminator = undefined; +V2beta1HorizontalPodAutoscalerStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "currentMetrics", + "baseName": "currentMetrics", + "type": "Array" + }, + { + "name": "currentReplicas", + "baseName": "currentReplicas", + "type": "number" + }, + { + "name": "desiredReplicas", + "baseName": "desiredReplicas", + "type": "number" + }, + { + "name": "lastScaleTime", + "baseName": "lastScaleTime", + "type": "Date" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + } +]; +//# sourceMappingURL=v2beta1HorizontalPodAutoscalerStatus.js.map + +/***/ }), + +/***/ 54389: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1MetricSpec = void 0; +/** +* MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). +*/ +class V2beta1MetricSpec { + static getAttributeTypeMap() { + return V2beta1MetricSpec.attributeTypeMap; + } +} +exports.V2beta1MetricSpec = V2beta1MetricSpec; +V2beta1MetricSpec.discriminator = undefined; +V2beta1MetricSpec.attributeTypeMap = [ + { + "name": "containerResource", + "baseName": "containerResource", + "type": "V2beta1ContainerResourceMetricSource" + }, + { + "name": "external", + "baseName": "external", + "type": "V2beta1ExternalMetricSource" + }, + { + "name": "object", + "baseName": "object", + "type": "V2beta1ObjectMetricSource" + }, + { + "name": "pods", + "baseName": "pods", + "type": "V2beta1PodsMetricSource" + }, + { + "name": "resource", + "baseName": "resource", + "type": "V2beta1ResourceMetricSource" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1MetricSpec.js.map + +/***/ }), + +/***/ 79631: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1MetricStatus = void 0; +/** +* MetricStatus describes the last-read state of a single metric. +*/ +class V2beta1MetricStatus { + static getAttributeTypeMap() { + return V2beta1MetricStatus.attributeTypeMap; + } +} +exports.V2beta1MetricStatus = V2beta1MetricStatus; +V2beta1MetricStatus.discriminator = undefined; +V2beta1MetricStatus.attributeTypeMap = [ + { + "name": "containerResource", + "baseName": "containerResource", + "type": "V2beta1ContainerResourceMetricStatus" + }, + { + "name": "external", + "baseName": "external", + "type": "V2beta1ExternalMetricStatus" + }, + { + "name": "object", + "baseName": "object", + "type": "V2beta1ObjectMetricStatus" + }, + { + "name": "pods", + "baseName": "pods", + "type": "V2beta1PodsMetricStatus" + }, + { + "name": "resource", + "baseName": "resource", + "type": "V2beta1ResourceMetricStatus" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1MetricStatus.js.map + +/***/ }), + +/***/ 30995: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1ObjectMetricSource = void 0; +/** +* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). +*/ +class V2beta1ObjectMetricSource { + static getAttributeTypeMap() { + return V2beta1ObjectMetricSource.attributeTypeMap; + } +} +exports.V2beta1ObjectMetricSource = V2beta1ObjectMetricSource; +V2beta1ObjectMetricSource.discriminator = undefined; +V2beta1ObjectMetricSource.attributeTypeMap = [ + { + "name": "averageValue", + "baseName": "averageValue", + "type": "string" + }, + { + "name": "metricName", + "baseName": "metricName", + "type": "string" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + }, + { + "name": "target", + "baseName": "target", + "type": "V2beta1CrossVersionObjectReference" + }, + { + "name": "targetValue", + "baseName": "targetValue", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1ObjectMetricSource.js.map + +/***/ }), + +/***/ 93407: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1ObjectMetricStatus = void 0; +/** +* ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). +*/ +class V2beta1ObjectMetricStatus { + static getAttributeTypeMap() { + return V2beta1ObjectMetricStatus.attributeTypeMap; + } +} +exports.V2beta1ObjectMetricStatus = V2beta1ObjectMetricStatus; +V2beta1ObjectMetricStatus.discriminator = undefined; +V2beta1ObjectMetricStatus.attributeTypeMap = [ + { + "name": "averageValue", + "baseName": "averageValue", + "type": "string" + }, + { + "name": "currentValue", + "baseName": "currentValue", + "type": "string" + }, + { + "name": "metricName", + "baseName": "metricName", + "type": "string" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + }, + { + "name": "target", + "baseName": "target", + "type": "V2beta1CrossVersionObjectReference" + } +]; +//# sourceMappingURL=v2beta1ObjectMetricStatus.js.map + +/***/ }), + +/***/ 41159: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1PodsMetricSource = void 0; +/** +* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. +*/ +class V2beta1PodsMetricSource { + static getAttributeTypeMap() { + return V2beta1PodsMetricSource.attributeTypeMap; + } +} +exports.V2beta1PodsMetricSource = V2beta1PodsMetricSource; +V2beta1PodsMetricSource.discriminator = undefined; +V2beta1PodsMetricSource.attributeTypeMap = [ + { + "name": "metricName", + "baseName": "metricName", + "type": "string" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + }, + { + "name": "targetAverageValue", + "baseName": "targetAverageValue", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1PodsMetricSource.js.map + +/***/ }), + +/***/ 65988: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1PodsMetricStatus = void 0; +/** +* PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). +*/ +class V2beta1PodsMetricStatus { + static getAttributeTypeMap() { + return V2beta1PodsMetricStatus.attributeTypeMap; + } +} +exports.V2beta1PodsMetricStatus = V2beta1PodsMetricStatus; +V2beta1PodsMetricStatus.discriminator = undefined; +V2beta1PodsMetricStatus.attributeTypeMap = [ + { + "name": "currentAverageValue", + "baseName": "currentAverageValue", + "type": "string" + }, + { + "name": "metricName", + "baseName": "metricName", + "type": "string" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + } +]; +//# sourceMappingURL=v2beta1PodsMetricStatus.js.map + +/***/ }), + +/***/ 5762: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1ResourceMetricSource = void 0; +/** +* ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set. +*/ +class V2beta1ResourceMetricSource { + static getAttributeTypeMap() { + return V2beta1ResourceMetricSource.attributeTypeMap; + } +} +exports.V2beta1ResourceMetricSource = V2beta1ResourceMetricSource; +V2beta1ResourceMetricSource.discriminator = undefined; +V2beta1ResourceMetricSource.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "targetAverageUtilization", + "baseName": "targetAverageUtilization", + "type": "number" + }, + { + "name": "targetAverageValue", + "baseName": "targetAverageValue", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1ResourceMetricSource.js.map + +/***/ }), + +/***/ 7428: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta1ResourceMetricStatus = void 0; +/** +* ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. +*/ +class V2beta1ResourceMetricStatus { + static getAttributeTypeMap() { + return V2beta1ResourceMetricStatus.attributeTypeMap; + } +} +exports.V2beta1ResourceMetricStatus = V2beta1ResourceMetricStatus; +V2beta1ResourceMetricStatus.discriminator = undefined; +V2beta1ResourceMetricStatus.attributeTypeMap = [ + { + "name": "currentAverageUtilization", + "baseName": "currentAverageUtilization", + "type": "number" + }, + { + "name": "currentAverageValue", + "baseName": "currentAverageValue", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v2beta1ResourceMetricStatus.js.map + +/***/ }), + +/***/ 36047: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2ContainerResourceMetricSource = void 0; +/** +* ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set. +*/ +class V2beta2ContainerResourceMetricSource { + static getAttributeTypeMap() { + return V2beta2ContainerResourceMetricSource.attributeTypeMap; + } +} +exports.V2beta2ContainerResourceMetricSource = V2beta2ContainerResourceMetricSource; +V2beta2ContainerResourceMetricSource.discriminator = undefined; +V2beta2ContainerResourceMetricSource.attributeTypeMap = [ + { + "name": "container", + "baseName": "container", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "target", + "baseName": "target", + "type": "V2beta2MetricTarget" + } +]; +//# sourceMappingURL=v2beta2ContainerResourceMetricSource.js.map + +/***/ }), + +/***/ 19201: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2ContainerResourceMetricStatus = void 0; +/** +* ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. +*/ +class V2beta2ContainerResourceMetricStatus { + static getAttributeTypeMap() { + return V2beta2ContainerResourceMetricStatus.attributeTypeMap; + } +} +exports.V2beta2ContainerResourceMetricStatus = V2beta2ContainerResourceMetricStatus; +V2beta2ContainerResourceMetricStatus.discriminator = undefined; +V2beta2ContainerResourceMetricStatus.attributeTypeMap = [ + { + "name": "container", + "baseName": "container", + "type": "string" + }, + { + "name": "current", + "baseName": "current", + "type": "V2beta2MetricValueStatus" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v2beta2ContainerResourceMetricStatus.js.map + +/***/ }), + +/***/ 10397: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2CrossVersionObjectReference = void 0; +/** +* CrossVersionObjectReference contains enough information to let you identify the referred resource. +*/ +class V2beta2CrossVersionObjectReference { + static getAttributeTypeMap() { + return V2beta2CrossVersionObjectReference.attributeTypeMap; + } +} +exports.V2beta2CrossVersionObjectReference = V2beta2CrossVersionObjectReference; +V2beta2CrossVersionObjectReference.discriminator = undefined; +V2beta2CrossVersionObjectReference.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v2beta2CrossVersionObjectReference.js.map + +/***/ }), + +/***/ 56058: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2ExternalMetricSource = void 0; +/** +* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). +*/ +class V2beta2ExternalMetricSource { + static getAttributeTypeMap() { + return V2beta2ExternalMetricSource.attributeTypeMap; + } +} +exports.V2beta2ExternalMetricSource = V2beta2ExternalMetricSource; +V2beta2ExternalMetricSource.discriminator = undefined; +V2beta2ExternalMetricSource.attributeTypeMap = [ + { + "name": "metric", + "baseName": "metric", + "type": "V2beta2MetricIdentifier" + }, + { + "name": "target", + "baseName": "target", + "type": "V2beta2MetricTarget" + } +]; +//# sourceMappingURL=v2beta2ExternalMetricSource.js.map + +/***/ }), + +/***/ 25422: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2ExternalMetricStatus = void 0; +/** +* ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. +*/ +class V2beta2ExternalMetricStatus { + static getAttributeTypeMap() { + return V2beta2ExternalMetricStatus.attributeTypeMap; + } +} +exports.V2beta2ExternalMetricStatus = V2beta2ExternalMetricStatus; +V2beta2ExternalMetricStatus.discriminator = undefined; +V2beta2ExternalMetricStatus.attributeTypeMap = [ + { + "name": "current", + "baseName": "current", + "type": "V2beta2MetricValueStatus" + }, + { + "name": "metric", + "baseName": "metric", + "type": "V2beta2MetricIdentifier" + } +]; +//# sourceMappingURL=v2beta2ExternalMetricStatus.js.map + +/***/ }), + +/***/ 87223: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2HPAScalingPolicy = void 0; +/** +* HPAScalingPolicy is a single policy which must hold true for a specified past interval. +*/ +class V2beta2HPAScalingPolicy { + static getAttributeTypeMap() { + return V2beta2HPAScalingPolicy.attributeTypeMap; + } +} +exports.V2beta2HPAScalingPolicy = V2beta2HPAScalingPolicy; +V2beta2HPAScalingPolicy.discriminator = undefined; +V2beta2HPAScalingPolicy.attributeTypeMap = [ + { + "name": "periodSeconds", + "baseName": "periodSeconds", + "type": "number" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } +]; +//# sourceMappingURL=v2beta2HPAScalingPolicy.js.map + +/***/ }), + +/***/ 36770: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2HPAScalingRules = void 0; +/** +* HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen. +*/ +class V2beta2HPAScalingRules { + static getAttributeTypeMap() { + return V2beta2HPAScalingRules.attributeTypeMap; + } +} +exports.V2beta2HPAScalingRules = V2beta2HPAScalingRules; +V2beta2HPAScalingRules.discriminator = undefined; +V2beta2HPAScalingRules.attributeTypeMap = [ + { + "name": "policies", + "baseName": "policies", + "type": "Array" + }, + { + "name": "selectPolicy", + "baseName": "selectPolicy", + "type": "string" + }, + { + "name": "stabilizationWindowSeconds", + "baseName": "stabilizationWindowSeconds", + "type": "number" + } +]; +//# sourceMappingURL=v2beta2HPAScalingRules.js.map + +/***/ }), + +/***/ 76584: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2HorizontalPodAutoscaler = void 0; +/** +* HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified. +*/ +class V2beta2HorizontalPodAutoscaler { + static getAttributeTypeMap() { + return V2beta2HorizontalPodAutoscaler.attributeTypeMap; + } +} +exports.V2beta2HorizontalPodAutoscaler = V2beta2HorizontalPodAutoscaler; +V2beta2HorizontalPodAutoscaler.discriminator = undefined; +V2beta2HorizontalPodAutoscaler.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V2beta2HorizontalPodAutoscalerSpec" + }, + { + "name": "status", + "baseName": "status", + "type": "V2beta2HorizontalPodAutoscalerStatus" + } +]; +//# sourceMappingURL=v2beta2HorizontalPodAutoscaler.js.map + +/***/ }), + +/***/ 22053: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2HorizontalPodAutoscalerBehavior = void 0; +/** +* HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). +*/ +class V2beta2HorizontalPodAutoscalerBehavior { + static getAttributeTypeMap() { + return V2beta2HorizontalPodAutoscalerBehavior.attributeTypeMap; + } +} +exports.V2beta2HorizontalPodAutoscalerBehavior = V2beta2HorizontalPodAutoscalerBehavior; +V2beta2HorizontalPodAutoscalerBehavior.discriminator = undefined; +V2beta2HorizontalPodAutoscalerBehavior.attributeTypeMap = [ + { + "name": "scaleDown", + "baseName": "scaleDown", + "type": "V2beta2HPAScalingRules" + }, + { + "name": "scaleUp", + "baseName": "scaleUp", + "type": "V2beta2HPAScalingRules" + } +]; +//# sourceMappingURL=v2beta2HorizontalPodAutoscalerBehavior.js.map + +/***/ }), + +/***/ 5668: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2HorizontalPodAutoscalerCondition = void 0; +/** +* HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. +*/ +class V2beta2HorizontalPodAutoscalerCondition { + static getAttributeTypeMap() { + return V2beta2HorizontalPodAutoscalerCondition.attributeTypeMap; + } +} +exports.V2beta2HorizontalPodAutoscalerCondition = V2beta2HorizontalPodAutoscalerCondition; +V2beta2HorizontalPodAutoscalerCondition.discriminator = undefined; +V2beta2HorizontalPodAutoscalerCondition.attributeTypeMap = [ + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v2beta2HorizontalPodAutoscalerCondition.js.map + +/***/ }), + +/***/ 22138: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2HorizontalPodAutoscalerList = void 0; +/** +* HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. +*/ +class V2beta2HorizontalPodAutoscalerList { + static getAttributeTypeMap() { + return V2beta2HorizontalPodAutoscalerList.attributeTypeMap; + } +} +exports.V2beta2HorizontalPodAutoscalerList = V2beta2HorizontalPodAutoscalerList; +V2beta2HorizontalPodAutoscalerList.discriminator = undefined; +V2beta2HorizontalPodAutoscalerList.attributeTypeMap = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta" + } +]; +//# sourceMappingURL=v2beta2HorizontalPodAutoscalerList.js.map + +/***/ }), + +/***/ 78022: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2HorizontalPodAutoscalerSpec = void 0; +/** +* HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. +*/ +class V2beta2HorizontalPodAutoscalerSpec { + static getAttributeTypeMap() { + return V2beta2HorizontalPodAutoscalerSpec.attributeTypeMap; + } +} +exports.V2beta2HorizontalPodAutoscalerSpec = V2beta2HorizontalPodAutoscalerSpec; +V2beta2HorizontalPodAutoscalerSpec.discriminator = undefined; +V2beta2HorizontalPodAutoscalerSpec.attributeTypeMap = [ + { + "name": "behavior", + "baseName": "behavior", + "type": "V2beta2HorizontalPodAutoscalerBehavior" + }, + { + "name": "maxReplicas", + "baseName": "maxReplicas", + "type": "number" + }, + { + "name": "metrics", + "baseName": "metrics", + "type": "Array" + }, + { + "name": "minReplicas", + "baseName": "minReplicas", + "type": "number" + }, + { + "name": "scaleTargetRef", + "baseName": "scaleTargetRef", + "type": "V2beta2CrossVersionObjectReference" + } +]; +//# sourceMappingURL=v2beta2HorizontalPodAutoscalerSpec.js.map + +/***/ }), + +/***/ 43646: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2HorizontalPodAutoscalerStatus = void 0; +/** +* HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. +*/ +class V2beta2HorizontalPodAutoscalerStatus { + static getAttributeTypeMap() { + return V2beta2HorizontalPodAutoscalerStatus.attributeTypeMap; + } +} +exports.V2beta2HorizontalPodAutoscalerStatus = V2beta2HorizontalPodAutoscalerStatus; +V2beta2HorizontalPodAutoscalerStatus.discriminator = undefined; +V2beta2HorizontalPodAutoscalerStatus.attributeTypeMap = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array" + }, + { + "name": "currentMetrics", + "baseName": "currentMetrics", + "type": "Array" + }, + { + "name": "currentReplicas", + "baseName": "currentReplicas", + "type": "number" + }, + { + "name": "desiredReplicas", + "baseName": "desiredReplicas", + "type": "number" + }, + { + "name": "lastScaleTime", + "baseName": "lastScaleTime", + "type": "Date" + }, + { + "name": "observedGeneration", + "baseName": "observedGeneration", + "type": "number" + } +]; +//# sourceMappingURL=v2beta2HorizontalPodAutoscalerStatus.js.map + +/***/ }), + +/***/ 97447: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2MetricIdentifier = void 0; +/** +* MetricIdentifier defines the name and optionally selector for a metric +*/ +class V2beta2MetricIdentifier { + static getAttributeTypeMap() { + return V2beta2MetricIdentifier.attributeTypeMap; + } +} +exports.V2beta2MetricIdentifier = V2beta2MetricIdentifier; +V2beta2MetricIdentifier.discriminator = undefined; +V2beta2MetricIdentifier.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "selector", + "baseName": "selector", + "type": "V1LabelSelector" + } +]; +//# sourceMappingURL=v2beta2MetricIdentifier.js.map + +/***/ }), + +/***/ 71223: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2MetricSpec = void 0; +/** +* MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). +*/ +class V2beta2MetricSpec { + static getAttributeTypeMap() { + return V2beta2MetricSpec.attributeTypeMap; + } +} +exports.V2beta2MetricSpec = V2beta2MetricSpec; +V2beta2MetricSpec.discriminator = undefined; +V2beta2MetricSpec.attributeTypeMap = [ + { + "name": "containerResource", + "baseName": "containerResource", + "type": "V2beta2ContainerResourceMetricSource" + }, + { + "name": "external", + "baseName": "external", + "type": "V2beta2ExternalMetricSource" + }, + { + "name": "object", + "baseName": "object", + "type": "V2beta2ObjectMetricSource" + }, + { + "name": "pods", + "baseName": "pods", + "type": "V2beta2PodsMetricSource" + }, + { + "name": "resource", + "baseName": "resource", + "type": "V2beta2ResourceMetricSource" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v2beta2MetricSpec.js.map + +/***/ }), + +/***/ 19643: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2MetricStatus = void 0; +/** +* MetricStatus describes the last-read state of a single metric. +*/ +class V2beta2MetricStatus { + static getAttributeTypeMap() { + return V2beta2MetricStatus.attributeTypeMap; + } +} +exports.V2beta2MetricStatus = V2beta2MetricStatus; +V2beta2MetricStatus.discriminator = undefined; +V2beta2MetricStatus.attributeTypeMap = [ + { + "name": "containerResource", + "baseName": "containerResource", + "type": "V2beta2ContainerResourceMetricStatus" + }, + { + "name": "external", + "baseName": "external", + "type": "V2beta2ExternalMetricStatus" + }, + { + "name": "object", + "baseName": "object", + "type": "V2beta2ObjectMetricStatus" + }, + { + "name": "pods", + "baseName": "pods", + "type": "V2beta2PodsMetricStatus" + }, + { + "name": "resource", + "baseName": "resource", + "type": "V2beta2ResourceMetricStatus" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } +]; +//# sourceMappingURL=v2beta2MetricStatus.js.map + +/***/ }), + +/***/ 19640: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2MetricTarget = void 0; +/** +* MetricTarget defines the target value, average value, or average utilization of a specific metric +*/ +class V2beta2MetricTarget { + static getAttributeTypeMap() { + return V2beta2MetricTarget.attributeTypeMap; + } +} +exports.V2beta2MetricTarget = V2beta2MetricTarget; +V2beta2MetricTarget.discriminator = undefined; +V2beta2MetricTarget.attributeTypeMap = [ + { + "name": "averageUtilization", + "baseName": "averageUtilization", + "type": "number" + }, + { + "name": "averageValue", + "baseName": "averageValue", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } +]; +//# sourceMappingURL=v2beta2MetricTarget.js.map + +/***/ }), + +/***/ 75903: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2MetricValueStatus = void 0; +/** +* MetricValueStatus holds the current value for a metric +*/ +class V2beta2MetricValueStatus { + static getAttributeTypeMap() { + return V2beta2MetricValueStatus.attributeTypeMap; + } +} +exports.V2beta2MetricValueStatus = V2beta2MetricValueStatus; +V2beta2MetricValueStatus.discriminator = undefined; +V2beta2MetricValueStatus.attributeTypeMap = [ + { + "name": "averageUtilization", + "baseName": "averageUtilization", + "type": "number" + }, + { + "name": "averageValue", + "baseName": "averageValue", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } +]; +//# sourceMappingURL=v2beta2MetricValueStatus.js.map + +/***/ }), + +/***/ 33688: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2ObjectMetricSource = void 0; +/** +* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). +*/ +class V2beta2ObjectMetricSource { + static getAttributeTypeMap() { + return V2beta2ObjectMetricSource.attributeTypeMap; + } +} +exports.V2beta2ObjectMetricSource = V2beta2ObjectMetricSource; +V2beta2ObjectMetricSource.discriminator = undefined; +V2beta2ObjectMetricSource.attributeTypeMap = [ + { + "name": "describedObject", + "baseName": "describedObject", + "type": "V2beta2CrossVersionObjectReference" + }, + { + "name": "metric", + "baseName": "metric", + "type": "V2beta2MetricIdentifier" + }, + { + "name": "target", + "baseName": "target", + "type": "V2beta2MetricTarget" + } +]; +//# sourceMappingURL=v2beta2ObjectMetricSource.js.map + +/***/ }), + +/***/ 29610: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2ObjectMetricStatus = void 0; +/** +* ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). +*/ +class V2beta2ObjectMetricStatus { + static getAttributeTypeMap() { + return V2beta2ObjectMetricStatus.attributeTypeMap; + } +} +exports.V2beta2ObjectMetricStatus = V2beta2ObjectMetricStatus; +V2beta2ObjectMetricStatus.discriminator = undefined; +V2beta2ObjectMetricStatus.attributeTypeMap = [ + { + "name": "current", + "baseName": "current", + "type": "V2beta2MetricValueStatus" + }, + { + "name": "describedObject", + "baseName": "describedObject", + "type": "V2beta2CrossVersionObjectReference" + }, + { + "name": "metric", + "baseName": "metric", + "type": "V2beta2MetricIdentifier" + } +]; +//# sourceMappingURL=v2beta2ObjectMetricStatus.js.map + +/***/ }), + +/***/ 10783: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2PodsMetricSource = void 0; +/** +* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. +*/ +class V2beta2PodsMetricSource { + static getAttributeTypeMap() { + return V2beta2PodsMetricSource.attributeTypeMap; + } +} +exports.V2beta2PodsMetricSource = V2beta2PodsMetricSource; +V2beta2PodsMetricSource.discriminator = undefined; +V2beta2PodsMetricSource.attributeTypeMap = [ + { + "name": "metric", + "baseName": "metric", + "type": "V2beta2MetricIdentifier" + }, + { + "name": "target", + "baseName": "target", + "type": "V2beta2MetricTarget" + } +]; +//# sourceMappingURL=v2beta2PodsMetricSource.js.map + +/***/ }), + +/***/ 39981: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2PodsMetricStatus = void 0; +/** +* PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). +*/ +class V2beta2PodsMetricStatus { + static getAttributeTypeMap() { + return V2beta2PodsMetricStatus.attributeTypeMap; + } +} +exports.V2beta2PodsMetricStatus = V2beta2PodsMetricStatus; +V2beta2PodsMetricStatus.discriminator = undefined; +V2beta2PodsMetricStatus.attributeTypeMap = [ + { + "name": "current", + "baseName": "current", + "type": "V2beta2MetricValueStatus" + }, + { + "name": "metric", + "baseName": "metric", + "type": "V2beta2MetricIdentifier" + } +]; +//# sourceMappingURL=v2beta2PodsMetricStatus.js.map + +/***/ }), + +/***/ 78341: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2ResourceMetricSource = void 0; +/** +* ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set. +*/ +class V2beta2ResourceMetricSource { + static getAttributeTypeMap() { + return V2beta2ResourceMetricSource.attributeTypeMap; + } +} +exports.V2beta2ResourceMetricSource = V2beta2ResourceMetricSource; +V2beta2ResourceMetricSource.discriminator = undefined; +V2beta2ResourceMetricSource.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "target", + "baseName": "target", + "type": "V2beta2MetricTarget" + } +]; +//# sourceMappingURL=v2beta2ResourceMetricSource.js.map + +/***/ }), + +/***/ 77136: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.V2beta2ResourceMetricStatus = void 0; +/** +* ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. +*/ +class V2beta2ResourceMetricStatus { + static getAttributeTypeMap() { + return V2beta2ResourceMetricStatus.attributeTypeMap; + } +} +exports.V2beta2ResourceMetricStatus = V2beta2ResourceMetricStatus; +V2beta2ResourceMetricStatus.discriminator = undefined; +V2beta2ResourceMetricStatus.attributeTypeMap = [ + { + "name": "current", + "baseName": "current", + "type": "V2beta2MetricValueStatus" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } +]; +//# sourceMappingURL=v2beta2ResourceMetricStatus.js.map + +/***/ }), + +/***/ 13793: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.21.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VersionInfo = void 0; +/** +* Info contains versioning information. how we\'ll want to distribute that information. +*/ +class VersionInfo { + static getAttributeTypeMap() { + return VersionInfo.attributeTypeMap; + } +} +exports.VersionInfo = VersionInfo; +VersionInfo.discriminator = undefined; +VersionInfo.attributeTypeMap = [ + { + "name": "buildDate", + "baseName": "buildDate", + "type": "string" + }, + { + "name": "compiler", + "baseName": "compiler", + "type": "string" + }, + { + "name": "gitCommit", + "baseName": "gitCommit", + "type": "string" + }, + { + "name": "gitTreeState", + "baseName": "gitTreeState", + "type": "string" + }, + { + "name": "gitVersion", + "baseName": "gitVersion", + "type": "string" + }, + { + "name": "goVersion", + "baseName": "goVersion", + "type": "string" + }, + { + "name": "major", + "baseName": "major", + "type": "string" + }, + { + "name": "minor", + "baseName": "minor", + "type": "string" + }, + { + "name": "platform", + "baseName": "platform", + "type": "string" + } +]; +//# sourceMappingURL=versionInfo.js.map + +/***/ }), + +/***/ 38707: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(49109); +tslib_1.__exportStar(__nccwpck_require__(50276), exports); +tslib_1.__exportStar(__nccwpck_require__(13523), exports); +tslib_1.__exportStar(__nccwpck_require__(71918), exports); +tslib_1.__exportStar(__nccwpck_require__(48657), exports); +tslib_1.__exportStar(__nccwpck_require__(56324), exports); +tslib_1.__exportStar(__nccwpck_require__(73065), exports); +tslib_1.__exportStar(__nccwpck_require__(83480), exports); +tslib_1.__exportStar(__nccwpck_require__(85329), exports); +tslib_1.__exportStar(__nccwpck_require__(37817), exports); +tslib_1.__exportStar(__nccwpck_require__(77026), exports); +tslib_1.__exportStar(__nccwpck_require__(93864), exports); +tslib_1.__exportStar(__nccwpck_require__(95452), exports); +tslib_1.__exportStar(__nccwpck_require__(66690), exports); +tslib_1.__exportStar(__nccwpck_require__(78627), exports); +tslib_1.__exportStar(__nccwpck_require__(81997), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 93864: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.makeInformer = exports.ERROR = exports.CONNECT = exports.DELETE = exports.CHANGE = exports.UPDATE = exports.ADD = void 0; +const cache_1 = __nccwpck_require__(13523); +const watch_1 = __nccwpck_require__(56324); +// These are issued per object +exports.ADD = 'add'; +exports.UPDATE = 'update'; +exports.CHANGE = 'change'; +exports.DELETE = 'delete'; +// This is issued when a watch connects or reconnects +exports.CONNECT = 'connect'; +// This is issued when there is an error +exports.ERROR = 'error'; +function makeInformer(kubeconfig, path, listPromiseFn, labelSelector) { + const watch = new watch_1.Watch(kubeconfig); + return new cache_1.ListWatch(path, watch, listPromiseFn, false, labelSelector); +} +exports.makeInformer = makeInformer; +//# sourceMappingURL=informer.js.map + +/***/ }), + +/***/ 77026: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Log = void 0; +const request = __nccwpck_require__(32956); +const api_1 = __nccwpck_require__(34574); +class Log { + constructor(config) { + this.config = config; + } + async log(namespace, podName, containerName, stream, doneOrOptions, options) { + let done = () => undefined; + if (typeof doneOrOptions === 'function') { + done = doneOrOptions; + } + else { + options = doneOrOptions; + } + const path = `/api/v1/namespaces/${namespace}/pods/${podName}/log`; + const cluster = this.config.getCurrentCluster(); + if (!cluster) { + throw new Error('No currently active cluster'); + } + const url = cluster.server + path; + const requestOptions = { + method: 'GET', + qs: { + ...options, + container: containerName, + }, + uri: url, + }; + await this.config.applyToRequest(requestOptions); + return new Promise((resolve, reject) => { + const req = request(requestOptions, (error, response, body) => { + if (error) { + reject(error); + done(error); + } + else if (response.statusCode !== 200) { + const deserializedBody = api_1.ObjectSerializer.deserialize(JSON.parse(body), 'V1Status'); + reject(new api_1.HttpError(response, deserializedBody, response.statusCode)); + done(body); + } + else { + done(null); + } + }).on('response', (response) => { + if (response.statusCode === 200) { + req.pipe(stream); + resolve(req); + } + }); + }); + } +} +exports.Log = Log; +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 66690: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.KubernetesObjectApi = void 0; +const request = __nccwpck_require__(32956); +const api_1 = __nccwpck_require__(71918); +/** + * Valid Content-Type header values for patch operations. See + * https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/ + * for details. + */ +var KubernetesPatchStrategies; +(function (KubernetesPatchStrategies) { + /** Diff-like JSON format. */ + KubernetesPatchStrategies["JsonPatch"] = "application/json-patch+json"; + /** Simple merge. */ + KubernetesPatchStrategies["MergePatch"] = "application/merge-patch+json"; + /** Merge with different strategies depending on field metadata. */ + KubernetesPatchStrategies["StrategicMergePatch"] = "application/strategic-merge-patch+json"; +})(KubernetesPatchStrategies || (KubernetesPatchStrategies = {})); +/** + * Dynamically construct Kubernetes API request URIs so client does not have to know what type of object it is acting + * on. + */ +class KubernetesObjectApi extends api_1.ApisApi { + constructor() { + super(...arguments); + /** Initialize the default namespace. May be overwritten by context. */ + this.defaultNamespace = 'default'; + /** Cache resource API response. */ + this.apiVersionResourceCache = {}; + } + /** + * Create a KubernetesObjectApi object from the provided KubeConfig. This method should be used rather than + * [[KubeConfig.makeApiClient]] so we can properly determine the default namespace if one is provided by the current + * context. + * + * @param kc Valid Kubernetes config + * @return Properly instantiated [[KubernetesObjectApi]] object + */ + static makeApiClient(kc) { + const client = kc.makeApiClient(KubernetesObjectApi); + client.setDefaultNamespace(kc); + return client; + } + /** + * Create any Kubernetes resource. + * @param spec Kubernetes resource spec. + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized + * dryRun directive will result in an error response and no further processing of the request. Valid values + * are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The + * value must be less than or 128 characters long, and only contain printable characters, as defined by + * https://golang.org/pkg/unicode/#IsPrint. + * @param options Optional headers to use in the request. + * @return Promise containing the request response and [[KubernetesObject]]. + */ + async create(spec, pretty, dryRun, fieldManager, options = { headers: {} }) { + // verify required parameter 'spec' is not null or undefined + if (spec === null || spec === undefined) { + throw new Error('Required parameter spec was null or undefined when calling create.'); + } + const localVarPath = await this.specUriPath(spec, 'create'); + const localVarQueryParameters = {}; + const localVarHeaderParams = this.generateHeaders(options.headers); + if (pretty !== undefined) { + localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); + } + if (dryRun !== undefined) { + localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string'); + } + if (fieldManager !== undefined) { + localVarQueryParameters.fieldManager = api_1.ObjectSerializer.serialize(fieldManager, 'string'); + } + const localVarRequestOptions = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: api_1.ObjectSerializer.serialize(spec, 'KubernetesObject'), + }; + return this.requestPromise(localVarRequestOptions); + } + /** + * Delete any Kubernetes resource. + * @param spec Kubernetes resource spec + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized + * dryRun directive will result in an error response and no further processing of the request. Valid values + * are: - All: all dry run stages will be processed + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative + * integer. The value zero indicates delete immediately. If this value is nil, the default grace period for + * the specified type will be used. Defaults to a per object value if not specified. zero means delete + * immediately. + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in + * 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be + * added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be + * set, but not both. + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or + * OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in + * the metadata.finalizers and the resource-specific default policy. Acceptable values are: + * \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete + * the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents + * in the foreground. + * @param body See [[V1DeleteOptions]]. + * @param options Optional headers to use in the request. + * @return Promise containing the request response and a Kubernetes [[V1Status]]. + */ + async delete(spec, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { + // verify required parameter 'spec' is not null or undefined + if (spec === null || spec === undefined) { + throw new Error('Required parameter spec was null or undefined when calling delete.'); + } + const localVarPath = await this.specUriPath(spec, 'delete'); + const localVarQueryParameters = {}; + const localVarHeaderParams = this.generateHeaders(options.headers); + if (pretty !== undefined) { + localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); + } + if (dryRun !== undefined) { + localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string'); + } + if (gracePeriodSeconds !== undefined) { + localVarQueryParameters.gracePeriodSeconds = api_1.ObjectSerializer.serialize(gracePeriodSeconds, 'number'); + } + if (orphanDependents !== undefined) { + localVarQueryParameters.orphanDependents = api_1.ObjectSerializer.serialize(orphanDependents, 'boolean'); + } + if (propagationPolicy !== undefined) { + localVarQueryParameters.propagationPolicy = api_1.ObjectSerializer.serialize(propagationPolicy, 'string'); + } + const localVarRequestOptions = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: api_1.ObjectSerializer.serialize(body, 'V1DeleteOptions'), + }; + return this.requestPromise(localVarRequestOptions, 'V1Status'); + } + /** + * Patch any Kubernetes resource. + * @param spec Kubernetes resource spec + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized + * dryRun directive will result in an error response and no further processing of the request. Valid values + * are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The + * value must be less than or 128 characters long, and only contain printable characters, as defined by + * https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests + * (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, + * StrategicMergePatch). + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting + * fields owned by other people. Force flag must be unset for non-apply patch requests. + * @param options Optional headers to use in the request. + * @return Promise containing the request response and [[KubernetesObject]]. + */ + async patch(spec, pretty, dryRun, fieldManager, force, options = { headers: {} }) { + // verify required parameter 'spec' is not null or undefined + if (spec === null || spec === undefined) { + throw new Error('Required parameter spec was null or undefined when calling patch.'); + } + const localVarPath = await this.specUriPath(spec, 'patch'); + const localVarQueryParameters = {}; + const localVarHeaderParams = this.generateHeaders(options.headers, 'PATCH'); + if (pretty !== undefined) { + localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); + } + if (dryRun !== undefined) { + localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string'); + } + if (fieldManager !== undefined) { + localVarQueryParameters.fieldManager = api_1.ObjectSerializer.serialize(fieldManager, 'string'); + } + if (force !== undefined) { + localVarQueryParameters.force = api_1.ObjectSerializer.serialize(force, 'boolean'); + } + const localVarRequestOptions = { + method: 'PATCH', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: api_1.ObjectSerializer.serialize(spec, 'object'), + }; + return this.requestPromise(localVarRequestOptions); + } + /** + * Read any Kubernetes resource. + * @param spec Kubernetes resource spec + * @param pretty If \'true\', then the output is pretty printed. + * @param exact Should the export be exact. Exact export maintains cluster-specific fields like + * \'Namespace\'. Deprecated. Planned for removal in 1.18. + * @param exportt Should this value be exported. Export strips fields that a user can not + * specify. Deprecated. Planned for removal in 1.18. + * @param options Optional headers to use in the request. + * @return Promise containing the request response and [[KubernetesObject]]. + */ + async read(spec, pretty, exact, exportt, options = { headers: {} }) { + // verify required parameter 'spec' is not null or undefined + if (spec === null || spec === undefined) { + throw new Error('Required parameter spec was null or undefined when calling read.'); + } + const localVarPath = await this.specUriPath(spec, 'read'); + const localVarQueryParameters = {}; + const localVarHeaderParams = this.generateHeaders(options.headers); + if (pretty !== undefined) { + localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); + } + if (exact !== undefined) { + localVarQueryParameters.exact = api_1.ObjectSerializer.serialize(exact, 'boolean'); + } + if (exportt !== undefined) { + localVarQueryParameters.export = api_1.ObjectSerializer.serialize(exportt, 'boolean'); + } + const localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + return this.requestPromise(localVarRequestOptions); + } + /** + * Replace any Kubernetes resource. + * @param spec Kubernetes resource spec + * @param pretty If \'true\', then the output is pretty printed. + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized + * dryRun directive will result in an error response and no further processing of the request. Valid values + * are: - All: all dry run stages will be processed + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The + * value must be less than or 128 characters long, and only contain printable characters, as defined by + * https://golang.org/pkg/unicode/#IsPrint. + * @param options Optional headers to use in the request. + * @return Promise containing the request response and [[KubernetesObject]]. + */ + async replace(spec, pretty, dryRun, fieldManager, options = { headers: {} }) { + // verify required parameter 'spec' is not null or undefined + if (spec === null || spec === undefined) { + throw new Error('Required parameter spec was null or undefined when calling replace.'); + } + const localVarPath = await this.specUriPath(spec, 'replace'); + const localVarQueryParameters = {}; + const localVarHeaderParams = this.generateHeaders(options.headers); + if (pretty !== undefined) { + localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); + } + if (dryRun !== undefined) { + localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string'); + } + if (fieldManager !== undefined) { + localVarQueryParameters.fieldManager = api_1.ObjectSerializer.serialize(fieldManager, 'string'); + } + const localVarRequestOptions = { + method: 'PUT', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: api_1.ObjectSerializer.serialize(spec, 'KubernetesObject'), + }; + return this.requestPromise(localVarRequestOptions); + } + /** Set default namespace from current context, if available. */ + setDefaultNamespace(kc) { + if (kc.currentContext) { + const currentContext = kc.getContextObject(kc.currentContext); + if (currentContext && currentContext.namespace) { + this.defaultNamespace = currentContext.namespace; + } + } + return this.defaultNamespace; + } + /** + * Use spec information to construct resource URI path. If any required information in not provided, an Error is + * thrown. If an `apiVersion` is not provided, 'v1' is used. If a `metadata.namespace` is not provided for a + * request that requires one, the context default is used, if available, if not, 'default' is used. + * + * @param spec Kubernetes resource spec which must define kind and apiVersion properties. + * @param action API action, see [[K8sApiAction]]. + * @return tail of resource-specific URI + */ + async specUriPath(spec, action) { + if (!spec.kind) { + throw new Error('Required spec property kind is not set'); + } + if (!spec.apiVersion) { + spec.apiVersion = 'v1'; + } + if (!spec.metadata) { + spec.metadata = {}; + } + const resource = await this.resource(spec.apiVersion, spec.kind); + if (!resource) { + throw new Error(`Unrecognized API version and kind: ${spec.apiVersion} ${spec.kind}`); + } + if (resource.namespaced && !spec.metadata.namespace) { + spec.metadata.namespace = this.defaultNamespace; + } + const parts = [this.apiVersionPath(spec.apiVersion)]; + if (resource.namespaced && spec.metadata.namespace) { + parts.push('namespaces', encodeURIComponent(String(spec.metadata.namespace))); + } + parts.push(resource.name); + if (action !== 'create') { + if (!spec.metadata.name) { + throw new Error('Required spec property name is not set'); + } + parts.push(encodeURIComponent(String(spec.metadata.name))); + } + return parts.join('/').toLowerCase(); + } + /** Return root of API path up to API version. */ + apiVersionPath(apiVersion) { + const api = apiVersion.includes('/') ? 'apis' : 'api'; + return [this.basePath, api, apiVersion].join('/'); + } + /** + * Merge default headers and provided headers, setting the 'Accept' header to 'application/json' and, if the + * `action` is 'PATCH', the 'Content-Type' header to [[KubernetesPatchStrategies.StrategicMergePatch]]. Both of + * these defaults can be overriden by values provided in `optionsHeaders`. + * + * @param optionHeaders Headers from method's options argument. + * @param action HTTP action headers are being generated for. + * @return Headers to use in request. + */ + generateHeaders(optionsHeaders, action = 'GET') { + const headers = Object.assign({}, this._defaultHeaders); + headers.accept = 'application/json'; + if (action === 'PATCH') { + headers['content-type'] = KubernetesPatchStrategies.StrategicMergePatch; + } + Object.assign(headers, optionsHeaders); + return headers; + } + /** + * Get metadata from Kubernetes API for resources described by `kind` and `apiVersion`. If it is unable to find the + * resource `kind` under the provided `apiVersion`, `undefined` is returned. + * + * This method caches responses from the Kubernetes API to use for future requests. If the cache for apiVersion + * exists but the kind is not found the request is attempted again. + * + * @param apiVersion Kubernetes API version, e.g., 'v1' or 'apps/v1'. + * @param kind Kubernetes resource kind, e.g., 'Pod' or 'Namespace'. + * @return Promise of the resource metadata or `undefined` if the resource is not found. + */ + async resource(apiVersion, kind) { + // verify required parameter 'apiVersion' is not null or undefined + if (apiVersion === null || apiVersion === undefined) { + throw new Error('Required parameter apiVersion was null or undefined when calling resource'); + } + // verify required parameter 'kind' is not null or undefined + if (kind === null || kind === undefined) { + throw new Error('Required parameter kind was null or undefined when calling resource'); + } + if (this.apiVersionResourceCache[apiVersion]) { + const resource = this.apiVersionResourceCache[apiVersion].resources.find((r) => r.kind === kind); + if (resource) { + return resource; + } + } + const localVarPath = this.apiVersionPath(apiVersion); + const localVarQueryParameters = {}; + const localVarHeaderParams = this.generateHeaders({}); + const localVarRequestOptions = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + try { + const getApiResponse = await this.requestPromise(localVarRequestOptions, 'V1APIResourceList'); + this.apiVersionResourceCache[apiVersion] = getApiResponse.body; + return this.apiVersionResourceCache[apiVersion].resources.find((r) => r.kind === kind); + } + catch (e) { + e.message = `Failed to fetch resource metadata for ${apiVersion}/${kind}: ${e.message}`; + throw e; + } + } + /** + * Standard Kubernetes request wrapped in a Promise. + */ + async requestPromise(requestOptions, tipe = 'KubernetesObject') { + let authenticationPromise = Promise.resolve(); + if (this.authentications.BearerToken.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(requestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(requestOptions)); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(requestOptions)); + } + await interceptorPromise; + return new Promise((resolve, reject) => { + request(requestOptions, (error, response, body) => { + if (error) { + reject(error); + } + else { + body = api_1.ObjectSerializer.deserialize(body, tipe); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response, body }); + } + else { + reject(new api_1.HttpError(response, body, response.statusCode)); + } + } + }); + }); + } +} +exports.KubernetesObjectApi = KubernetesObjectApi; +//# sourceMappingURL=object.js.map + +/***/ }), + +/***/ 67117: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OpenIDConnectAuth = void 0; +const openid_client_1 = __nccwpck_require__(76091); +const rfc4648_1 = __nccwpck_require__(43674); +const util_1 = __nccwpck_require__(73837); +class OpenIDConnectAuth { + constructor() { + // public for testing purposes. + this.currentTokenExpiration = 0; + } + static decodeJWT(token) { + const parts = token.split('.'); + if (parts.length !== 3) { + return null; + } + const header = JSON.parse(new util_1.TextDecoder().decode(rfc4648_1.base64url.parse(parts[0], { loose: true }))); + const payload = JSON.parse(new util_1.TextDecoder().decode(rfc4648_1.base64url.parse(parts[1], { loose: true }))); + const signature = parts[2]; + return { + header, + payload, + signature, + }; + } + static expirationFromToken(token) { + const jwt = OpenIDConnectAuth.decodeJWT(token); + if (!jwt) { + return 0; + } + return jwt.payload.exp; + } + isAuthProvider(user) { + if (!user.authProvider) { + return false; + } + return user.authProvider.name === 'oidc'; + } + /** + * Setup the authentication header for oidc authed clients + * @param user user info + * @param opts request options + * @param overrideClient for testing, a preconfigured oidc client + */ + async applyAuthentication(user, opts, overrideClient) { + const token = await this.getToken(user, overrideClient); + if (token) { + opts.headers.Authorization = `Bearer ${token}`; + } + } + async getToken(user, overrideClient) { + if (!user.authProvider.config) { + return null; + } + if (!user.authProvider.config['client-secret']) { + user.authProvider.config['client-secret'] = ''; + } + if (!user.authProvider.config || !user.authProvider.config['id-token']) { + return null; + } + return this.refresh(user, overrideClient); + } + async refresh(user, overrideClient) { + if (this.currentTokenExpiration === 0) { + this.currentTokenExpiration = OpenIDConnectAuth.expirationFromToken(user.authProvider.config['id-token']); + } + if (Date.now() / 1000 > this.currentTokenExpiration) { + if (!user.authProvider.config['client-id'] || + !user.authProvider.config['refresh-token'] || + !user.authProvider.config['idp-issuer-url']) { + return null; + } + const client = overrideClient ? overrideClient : await this.getClient(user); + const newToken = await client.refresh(user.authProvider.config['refresh-token']); + user.authProvider.config['id-token'] = newToken.id_token; + user.authProvider.config['refresh-token'] = newToken.refresh_token; + this.currentTokenExpiration = newToken.expires_at || 0; + } + return user.authProvider.config['id-token']; + } + async getClient(user) { + const oidcIssuer = await openid_client_1.Issuer.discover(user.authProvider.config['idp-issuer-url']); + return new oidcIssuer.Client({ + client_id: user.authProvider.config['client-id'], + client_secret: user.authProvider.config['client-secret'], + }); + } +} +exports.OpenIDConnectAuth = OpenIDConnectAuth; +//# sourceMappingURL=oidc_auth.js.map + +/***/ }), + +/***/ 81997: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PatchUtils = void 0; +class PatchUtils { +} +exports.PatchUtils = PatchUtils; +PatchUtils.PATCH_FORMAT_JSON_PATCH = 'application/json-patch+json'; +PatchUtils.PATCH_FORMAT_JSON_MERGE_PATCH = 'application/merge-patch+json'; +PatchUtils.PATCH_FORMAT_STRATEGIC_MERGE_PATCH = 'application/strategic-merge-patch+json'; +PatchUtils.PATCH_FORMAT_APPLY_YAML = 'application/apply-patch+yaml'; +//# sourceMappingURL=patch.js.map + +/***/ }), + +/***/ 83480: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PortForward = void 0; +const querystring = __nccwpck_require__(63477); +const util_1 = __nccwpck_require__(73837); +const web_socket_handler_1 = __nccwpck_require__(11339); +class PortForward { + // handler is a parameter really only for injecting for testing. + constructor(config, disconnectOnErr, handler) { + this.handler = handler || new web_socket_handler_1.WebSocketHandler(config); + this.disconnectOnErr = util_1.isUndefined(disconnectOnErr) ? true : disconnectOnErr; + } + // TODO: support multiple ports for real... + async portForward(namespace, podName, targetPorts, output, err, input, retryCount = 0) { + if (targetPorts.length === 0) { + throw new Error('You must provide at least one port to forward to.'); + } + if (targetPorts.length > 1) { + throw new Error('Only one port is currently supported for port-forward'); + } + const query = { + ports: targetPorts[0], + }; + const queryStr = querystring.stringify(query); + const needsToReadPortNumber = []; + targetPorts.forEach((value, index) => { + needsToReadPortNumber[index * 2] = true; + needsToReadPortNumber[index * 2 + 1] = true; + }); + const path = `/api/v1/namespaces/${namespace}/pods/${podName}/portforward?${queryStr}`; + const createWebSocket = () => { + return this.handler.connect(path, null, (streamNum, buff) => { + if (streamNum >= targetPorts.length * 2) { + return !this.disconnectOnErr; + } + // First two bytes of each stream are the port number + if (needsToReadPortNumber[streamNum]) { + buff = buff.slice(2); + needsToReadPortNumber[streamNum] = false; + } + if (streamNum % 2 === 1) { + if (err) { + err.write(buff); + } + } + else { + output.write(buff); + } + return true; + }); + }; + if (retryCount < 1) { + const ws = await createWebSocket(); + web_socket_handler_1.WebSocketHandler.handleStandardInput(ws, input, 0); + return ws; + } + return web_socket_handler_1.WebSocketHandler.restartableHandleStandardInput(createWebSocket, input, 0, retryCount); + } +} +exports.PortForward = PortForward; +//# sourceMappingURL=portforward.js.map + +/***/ }), + +/***/ 94052: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isResizable = exports.TerminalSizeQueue = void 0; +const stream_1 = __nccwpck_require__(12781); +class TerminalSizeQueue extends stream_1.Readable { + constructor(opts = {}) { + super({ + ...opts, + // tslint:disable-next-line:no-empty + read() { }, + }); + } + handleResizes(writeStream) { + // Set initial size + this.resize(getTerminalSize(writeStream)); + // Handle future size updates + writeStream.on('resize', () => this.resize(getTerminalSize(writeStream))); + } + resize(size) { + this.push(JSON.stringify(size)); + } +} +exports.TerminalSizeQueue = TerminalSizeQueue; +function isResizable(stream) { + if (stream == null) { + return false; + } + const hasRows = 'rows' in stream; + const hasColumns = 'columns' in stream; + const hasOn = typeof stream.on === 'function'; + return hasRows && hasColumns && hasOn; +} +exports.isResizable = isResizable; +function getTerminalSize(writeStream) { + return { height: writeStream.rows, width: writeStream.columns }; +} +//# sourceMappingURL=terminal-size-queue.js.map + +/***/ }), + +/***/ 95452: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.topNodes = exports.NodeStatus = exports.ResourceUsage = void 0; +const util_1 = __nccwpck_require__(82026); +class ResourceUsage { + constructor(Capacity, RequestTotal, LimitTotal) { + this.Capacity = Capacity; + this.RequestTotal = RequestTotal; + this.LimitTotal = LimitTotal; + } +} +exports.ResourceUsage = ResourceUsage; +class NodeStatus { + constructor(Node, CPU, Memory) { + this.Node = Node; + this.CPU = CPU; + this.Memory = Memory; + } +} +exports.NodeStatus = NodeStatus; +async function topNodes(api) { + // TODO: Support metrics APIs in the client and this library + const nodes = await api.listNode(); + const result = []; + for (const node of nodes.body.items) { + const availableCPU = util_1.quantityToScalar(node.status.allocatable.cpu); + const availableMem = util_1.quantityToScalar(node.status.allocatable.memory); + let totalPodCPU = 0; + let totalPodCPULimit = 0; + let totalPodMem = 0; + let totalPodMemLimit = 0; + let pods = await util_1.podsForNode(api, node.metadata.name); + pods = pods.filter((pod) => pod.status.phase === 'Running'); + pods.forEach((pod) => { + const cpuTotal = util_1.totalCPU(pod); + totalPodCPU = util_1.add(totalPodCPU, cpuTotal.request); + totalPodCPULimit = util_1.add(totalPodCPULimit, cpuTotal.limit); + const memTotal = util_1.totalMemory(pod); + totalPodMem = util_1.add(totalPodMem, memTotal.request); + totalPodMemLimit = util_1.add(totalPodMemLimit, memTotal.limit); + }); + const cpuUsage = new ResourceUsage(availableCPU, totalPodCPU, totalPodCPULimit); + const memUsage = new ResourceUsage(availableMem, totalPodMem, totalPodMemLimit); + result.push(new NodeStatus(node, cpuUsage, memUsage)); + } + return result; +} +exports.topNodes = topNodes; +//# sourceMappingURL=top.js.map + +/***/ }), + +/***/ 85329: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=types.js.map + +/***/ }), + +/***/ 82026: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.totalForResource = exports.add = exports.totalMemory = exports.totalCPU = exports.ResourceStatus = exports.quantityToScalar = exports.findSuffix = exports.podsForNode = void 0; +const underscore_1 = __nccwpck_require__(57005); +async function podsForNode(api, nodeName) { + const allPods = await api.listPodForAllNamespaces(); + return allPods.body.items.filter((pod) => pod.spec.nodeName === nodeName); +} +exports.podsForNode = podsForNode; +function findSuffix(quantity) { + let ix = quantity.length - 1; + while (ix >= 0 && !/[\.0-9]/.test(quantity.charAt(ix))) { + ix--; + } + return ix === -1 ? '' : quantity.substring(ix + 1); +} +exports.findSuffix = findSuffix; +function quantityToScalar(quantity) { + if (!quantity) { + return 0; + } + const suffix = findSuffix(quantity); + if (suffix === '') { + const num = Number(quantity).valueOf(); + if (isNaN(num)) { + throw new Error('Unknown quantity ' + quantity); + } + return num; + } + switch (suffix) { + case 'm': + return Number(quantity.substr(0, quantity.length - 1)).valueOf() / 1000.0; + case 'Ki': + return BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024); + case 'Mi': + return BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024 * 1024); + case 'Gi': + return BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024 * 1024 * 1024); + case 'Ti': + return (BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024 * 1024 * 1024) * BigInt(1024)); + case 'Pi': + return (BigInt(quantity.substr(0, quantity.length - 2)) * + BigInt(1024 * 1024 * 1024) * + BigInt(1024 * 1024)); + case 'Ei': + return (BigInt(quantity.substr(0, quantity.length - 2)) * + BigInt(1024 * 1024 * 1024) * + BigInt(1024 * 1024 * 1024)); + default: + throw new Error(`Unknown suffix: ${suffix}`); + } +} +exports.quantityToScalar = quantityToScalar; +class ResourceStatus { + constructor(request, limit, resourceType) { + this.request = request; + this.limit = limit; + this.resourceType = resourceType; + } +} +exports.ResourceStatus = ResourceStatus; +function totalCPU(pod) { + return totalForResource(pod, 'cpu'); +} +exports.totalCPU = totalCPU; +function totalMemory(pod) { + return totalForResource(pod, 'memory'); +} +exports.totalMemory = totalMemory; +function add(n1, n2) { + if (underscore_1.isNumber(n1) && underscore_1.isNumber(n2)) { + return n1 + n2; + } + if (underscore_1.isNumber(n1)) { + return BigInt(Math.round(n1)) + n2; + } + else if (underscore_1.isNumber(n2)) { + return n1 + BigInt(Math.round(n2)); + } + return (n1 + n2); +} +exports.add = add; +function totalForResource(pod, resource) { + let reqTotal = 0; + let limitTotal = 0; + pod.spec.containers.forEach((container) => { + if (container.resources) { + if (container.resources.requests) { + reqTotal = add(reqTotal, quantityToScalar(container.resources.requests[resource])); + } + if (container.resources.limits) { + limitTotal = add(limitTotal, quantityToScalar(container.resources.limits[resource])); + } + } + }); + return new ResourceStatus(reqTotal, limitTotal, resource); +} +exports.totalForResource = totalForResource; +//# sourceMappingURL=util.js.map + +/***/ }), + +/***/ 56324: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Watch = exports.DefaultRequest = void 0; +const byline = __nccwpck_require__(38202); +const request = __nccwpck_require__(32956); +class DefaultRequest { + constructor(requestImpl) { + this.requestImpl = requestImpl ? requestImpl : request; + } + // Using request lib can be confusing when combining Stream- with Callback- + // style API. We avoid the callback and handle HTTP response errors, that + // would otherwise require a different error handling, in a transparent way + // to the user (see github issue request/request#647 for more info). + webRequest(opts) { + const req = this.requestImpl(opts); + // pause the stream until we get a response not to miss any bytes + req.pause(); + req.on('response', (resp) => { + if (resp.statusCode === 200) { + req.resume(); + } + else { + req.emit('error', new Error(resp.statusMessage)); + } + }); + return req; + } +} +exports.DefaultRequest = DefaultRequest; +class Watch { + constructor(config, requestImpl) { + this.config = config; + if (requestImpl) { + this.requestImpl = requestImpl; + } + else { + this.requestImpl = new DefaultRequest(); + } + } + // Watch the resource and call provided callback with parsed json object + // upon event received over the watcher connection. + // + // "done" callback is called either when connection is closed or when there + // is an error. In either case, watcher takes care of properly closing the + // underlaying connection so that it doesn't leak any resources. + async watch(path, queryParams, callback, done) { + const cluster = this.config.getCurrentCluster(); + if (!cluster) { + throw new Error('No currently active cluster'); + } + const url = cluster.server + path; + queryParams.watch = true; + const headerParams = {}; + const requestOptions = { + method: 'GET', + qs: queryParams, + headers: headerParams, + uri: url, + useQuerystring: true, + json: true, + pool: false, + }; + await this.config.applyToRequest(requestOptions); + let req; + let doneCalled = false; + const doneCallOnce = (err) => { + if (!doneCalled) { + req.abort(); + doneCalled = true; + done(err); + } + }; + req = this.requestImpl.webRequest(requestOptions); + const stream = byline.createStream(); + req.on('error', doneCallOnce); + req.on('socket', (socket) => { + socket.setTimeout(30000); + socket.setKeepAlive(true, 30000); + }); + stream.on('error', doneCallOnce); + stream.on('close', () => doneCallOnce(null)); + stream.on('data', (line) => { + try { + const data = JSON.parse(line); + callback(data.type, data.object, data); + } + catch (ignore) { + // ignore parse errors + } + }); + req.pipe(stream); + return req; + } +} +exports.Watch = Watch; +Watch.SERVER_SIDE_CLOSE = { error: 'Connection closed on server' }; +//# sourceMappingURL=watch.js.map + +/***/ }), + +/***/ 11339: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.WebSocketHandler = void 0; +const WebSocket = __nccwpck_require__(38474); +const protocols = ['v4.channel.k8s.io', 'v3.channel.k8s.io', 'v2.channel.k8s.io', 'channel.k8s.io']; +class WebSocketHandler { + // factory is really just for test injection + constructor(config, socketFactory) { + this.config = config; + this.socketFactory = socketFactory; + } + static handleStandardStreams(streamNum, buff, stdout, stderr) { + if (buff.length < 1) { + return null; + } + if (stdout && streamNum === WebSocketHandler.StdoutStream) { + stdout.write(buff); + } + else if (stderr && streamNum === WebSocketHandler.StderrStream) { + stderr.write(buff); + } + else if (streamNum === WebSocketHandler.StatusStream) { + // stream closing. + if (stdout && stdout !== process.stdout) { + stdout.end(); + } + if (stderr && stderr !== process.stderr) { + stderr.end(); + } + return JSON.parse(buff.toString('utf8')); + } + else { + throw new Error('Unknown stream: ' + streamNum); + } + return null; + } + static handleStandardInput(ws, stdin, streamNum = 0) { + stdin.on('data', (data) => { + const buff = Buffer.alloc(data.length + 1); + buff.writeInt8(streamNum, 0); + if (data instanceof Buffer) { + data.copy(buff, 1); + } + else { + buff.write(data, 1); + } + ws.send(buff); + }); + stdin.on('end', () => { + ws.close(); + }); + // Keep the stream open + return true; + } + static async processData(data, ws, createWS, streamNum = 0, retryCount = 3) { + const buff = Buffer.alloc(data.length + 1); + buff.writeInt8(streamNum, 0); + if (data instanceof Buffer) { + data.copy(buff, 1); + } + else { + buff.write(data, 1); + } + let i = 0; + for (; i < retryCount; ++i) { + if (ws !== null && ws.readyState === WebSocket.OPEN) { + ws.send(buff); + break; + } + else { + ws = await createWS(); + } + } + // This throw doesn't go anywhere. + // TODO: Figure out the right way to return an error. + if (i >= retryCount) { + throw new Error("can't send data to ws"); + } + return ws; + } + static restartableHandleStandardInput(createWS, stdin, streamNum = 0, retryCount = 3) { + if (retryCount < 0) { + throw new Error("retryCount can't be lower than 0."); + } + let queue = Promise.resolve(); + let ws = null; + stdin.on('data', (data) => { + queue = queue.then(async () => { + ws = await WebSocketHandler.processData(data, ws, createWS, streamNum, retryCount); + }); + }); + stdin.on('end', () => { + if (ws) { + ws.close(); + } + }); + return () => ws; + } + /** + * Connect to a web socket endpoint. + * @param path The HTTP Path to connect to on the server. + * @param textHandler Callback for text over the web socket. + * Returns true if the connection should be kept alive, false to disconnect. + * @param binaryHandler Callback for binary data over the web socket. + * Returns true if the connection should be kept alive, false to disconnect. + */ + async connect(path, textHandler, binaryHandler) { + const cluster = this.config.getCurrentCluster(); + if (!cluster) { + throw new Error('No cluster is defined.'); + } + const server = cluster.server; + const ssl = server.startsWith('https://'); + const target = ssl ? server.substr(8) : server.substr(7); + const proto = ssl ? 'wss' : 'ws'; + const uri = `${proto}://${target}${path}`; + const opts = {}; + await this.config.applytoHTTPSOptions(opts); + return await new Promise((resolve, reject) => { + const client = this.socketFactory + ? this.socketFactory(uri, opts) + : new WebSocket(uri, protocols, opts); + let resolved = false; + client.onopen = () => { + resolved = true; + resolve(client); + }; + client.onerror = (err) => { + if (!resolved) { + reject(err); + } + }; + client.onmessage = ({ data }) => { + // TODO: support ArrayBuffer and Buffer[] data types? + if (typeof data === 'string') { + if (textHandler && !textHandler(data)) { + client.close(); + } + } + else if (data instanceof Buffer) { + const streamNum = data.readInt8(0); + if (binaryHandler && !binaryHandler(streamNum, data.slice(1))) { + client.close(); + } + } + }; + }); + } +} +exports.WebSocketHandler = WebSocketHandler; +WebSocketHandler.StdinStream = 0; +WebSocketHandler.StdoutStream = 1; +WebSocketHandler.StderrStream = 2; +WebSocketHandler.StatusStream = 3; +WebSocketHandler.ResizeStream = 4; +//# sourceMappingURL=web-socket-handler.js.map + +/***/ }), + +/***/ 37817: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.dumpYaml = exports.loadAllYaml = exports.loadYaml = void 0; +const yaml = __nccwpck_require__(41783); +function loadYaml(data, opts) { + return yaml.load(data, opts); +} +exports.loadYaml = loadYaml; +function loadAllYaml(data, opts) { + return yaml.loadAll(data, undefined, opts); +} +exports.loadAllYaml = loadAllYaml; +function dumpYaml(object, opts) { + return yaml.dump(object, opts); +} +exports.dumpYaml = dumpYaml; +//# sourceMappingURL=yaml.js.map + +/***/ }), + +/***/ 19321: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const cp = __nccwpck_require__(32081); +const parse = __nccwpck_require__(34788); +const enoent = __nccwpck_require__(35749); + +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; + + +/***/ }), + +/***/ 35749: +/***/ ((module) => { + +"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, +}; + + +/***/ }), + +/***/ 34788: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const path = __nccwpck_require__(71017); +const resolveCommand = __nccwpck_require__(56156); +const escape = __nccwpck_require__(81771); +const readShebang = __nccwpck_require__(56405); + +const isWin = process.platform === 'win32'; +const isExecutableRegExp = /\.(?:com|exe)$/i; +const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + +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 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 ? parsed : parseNonShell(parsed); +} + +module.exports = parse; + + +/***/ }), + +/***/ 81771: +/***/ ((module) => { + +"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; + + +/***/ }), + +/***/ 56405: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const fs = __nccwpck_require__(57147); +const shebangCommand = __nccwpck_require__(10302); + +function readShebang(command) { + // Read the first 150 bytes from the file + const size = 150; + const buffer = Buffer.alloc(size); + + 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; + + +/***/ }), + +/***/ 56156: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const path = __nccwpck_require__(71017); +const which = __nccwpck_require__(99156); +const getPathKey = __nccwpck_require__(86183); + +function resolveCommandAttempt(parsed, withoutPathExt) { + const env = parsed.options.env || process.env; + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + // Worker threads do not have process.chdir() + const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled; + + // 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 (shouldSwitchCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + /* Empty */ + } + } + + let resolved; + + try { + resolved = which.sync(parsed.command, { + path: env[getPathKey({ env })], + pathExt: withoutPathExt ? path.delimiter : undefined, + }); + } catch (e) { + /* Empty */ + } finally { + if (shouldSwitchCwd) { + 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; + + +/***/ }), + +/***/ 83443: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const path = __nccwpck_require__(71017); +const childProcess = __nccwpck_require__(32081); +const crossSpawn = __nccwpck_require__(19321); +const stripFinalNewline = __nccwpck_require__(87698); +const npmRunPath = __nccwpck_require__(78982); +const onetime = __nccwpck_require__(85611); +const makeError = __nccwpck_require__(85266); +const normalizeStdio = __nccwpck_require__(53510); +const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = __nccwpck_require__(83940); +const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = __nccwpck_require__(41131); +const {mergePromise, getSpawnedPromise} = __nccwpck_require__(81090); +const {joinCommand, parseCommand} = __nccwpck_require__(73344); + +const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100; + +const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => { + const env = extendEnv ? {...process.env, ...envOption} : envOption; + + if (preferLocal) { + return npmRunPath.env({env, cwd: localDir, execPath}); + } + + return env; +}; + +const handleArguments = (file, args, options = {}) => { + const parsed = crossSpawn._parse(file, args, options); + file = parsed.command; + args = parsed.args; + options = parsed.options; + + options = { + maxBuffer: DEFAULT_MAX_BUFFER, + buffer: true, + stripFinalNewline: true, + extendEnv: true, + preferLocal: false, + localDir: options.cwd || process.cwd(), + execPath: process.execPath, + encoding: 'utf8', + reject: true, + cleanup: true, + all: false, + windowsHide: true, + ...options + }; + + options.env = getEnv(options); + + options.stdio = normalizeStdio(options); + + if (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') { + // #116 + args.unshift('/q'); + } + + return {file, args, options, parsed}; +}; + +const handleOutput = (options, value, error) => { + if (typeof value !== 'string' && !Buffer.isBuffer(value)) { + // When `execa.sync()` errors, we normalize it to '' to mimic `execa()` + return error === undefined ? undefined : ''; + } + + if (options.stripFinalNewline) { + return stripFinalNewline(value); + } + + return value; +}; + +const execa = (file, args, options) => { + const parsed = handleArguments(file, args, options); + const command = joinCommand(file, args); + + let spawned; + try { + spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options); + } catch (error) { + // Ensure the returned error is always both a promise and a child process + const dummySpawned = new childProcess.ChildProcess(); + const errorPromise = Promise.reject(makeError({ + error, + stdout: '', + stderr: '', + all: '', + command, + parsed, + timedOut: false, + isCanceled: false, + killed: false + })); + return mergePromise(dummySpawned, errorPromise); + } + + const spawnedPromise = getSpawnedPromise(spawned); + const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); + const processDone = setExitHandler(spawned, parsed.options, timedPromise); + + const context = {isCanceled: false}; + + spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); + spawned.cancel = spawnedCancel.bind(null, spawned, context); + + const handlePromise = async () => { + const [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); + const stdout = handleOutput(parsed.options, stdoutResult); + const stderr = handleOutput(parsed.options, stderrResult); + const all = handleOutput(parsed.options, allResult); + + if (error || exitCode !== 0 || signal !== null) { + const returnedError = makeError({ + error, + exitCode, + signal, + stdout, + stderr, + all, + command, + parsed, + timedOut, + isCanceled: context.isCanceled, + killed: spawned.killed + }); + + if (!parsed.options.reject) { + return returnedError; + } + + throw returnedError; + } + + return { + command, + exitCode: 0, + stdout, + stderr, + all, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + + const handlePromiseOnce = onetime(handlePromise); + + handleInput(spawned, parsed.options.input); + + spawned.all = makeAllStream(spawned, parsed.options); + + return mergePromise(spawned, handlePromiseOnce); +}; + +module.exports = execa; + +module.exports.sync = (file, args, options) => { + const parsed = handleArguments(file, args, options); + const command = joinCommand(file, args); + + validateInputSync(parsed.options); + + let result; + try { + result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options); + } catch (error) { + throw makeError({ + error, + stdout: '', + stderr: '', + all: '', + command, + parsed, + timedOut: false, + isCanceled: false, + killed: false + }); + } + + const stdout = handleOutput(parsed.options, result.stdout, result.error); + const stderr = handleOutput(parsed.options, result.stderr, result.error); + + if (result.error || result.status !== 0 || result.signal !== null) { + const error = makeError({ + stdout, + stderr, + error: result.error, + signal: result.signal, + exitCode: result.status, + command, + parsed, + timedOut: result.error && result.error.code === 'ETIMEDOUT', + isCanceled: false, + killed: result.signal !== null + }); + + if (!parsed.options.reject) { + return error; + } + + throw error; + } + + return { + command, + exitCode: 0, + stdout, + stderr, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; +}; + +module.exports.command = (command, options) => { + const [file, ...args] = parseCommand(command); + return execa(file, args, options); +}; + +module.exports.commandSync = (command, options) => { + const [file, ...args] = parseCommand(command); + return execa.sync(file, args, options); +}; + +module.exports.node = (scriptPath, args, options = {}) => { + if (args && !Array.isArray(args) && typeof args === 'object') { + options = args; + args = []; + } + + const stdio = normalizeStdio.node(options); + const defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect')); + + const { + nodePath = process.execPath, + nodeOptions = defaultExecArgv + } = options; + + return execa( + nodePath, + [ + ...nodeOptions, + scriptPath, + ...(Array.isArray(args) ? args : []) + ], + { + ...options, + stdin: undefined, + stdout: undefined, + stderr: undefined, + stdio, + shell: false + } + ); +}; + + +/***/ }), + +/***/ 73344: +/***/ ((module) => { + +"use strict"; + +const SPACES_REGEXP = / +/g; + +const joinCommand = (file, args = []) => { + if (!Array.isArray(args)) { + return file; + } + + return [file, ...args].join(' '); +}; + +// Handle `execa.command()` +const parseCommand = command => { + const tokens = []; + for (const token of command.trim().split(SPACES_REGEXP)) { + // Allow spaces to be escaped by a backslash if not meant as a delimiter + const previousToken = tokens[tokens.length - 1]; + if (previousToken && previousToken.endsWith('\\')) { + // Merge previous token with current one + tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`; + } else { + tokens.push(token); + } + } + + return tokens; +}; + +module.exports = { + joinCommand, + parseCommand +}; + + +/***/ }), + +/***/ 85266: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const {signalsByName} = __nccwpck_require__(68064); + +const getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => { + if (timedOut) { + return `timed out after ${timeout} milliseconds`; + } + + if (isCanceled) { + return 'was canceled'; + } + + if (errorCode !== undefined) { + return `failed with ${errorCode}`; + } + + if (signal !== undefined) { + return `was killed with ${signal} (${signalDescription})`; + } + + if (exitCode !== undefined) { + return `failed with exit code ${exitCode}`; + } + + return 'failed'; +}; + +const makeError = ({ + stdout, + stderr, + all, + error, + signal, + exitCode, + command, + timedOut, + isCanceled, + killed, + parsed: {options: {timeout}} +}) => { + // `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`. + // We normalize them to `undefined` + exitCode = exitCode === null ? undefined : exitCode; + signal = signal === null ? undefined : signal; + const signalDescription = signal === undefined ? undefined : signalsByName[signal].description; + + const errorCode = error && error.code; + + const prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}); + const execaMessage = `Command ${prefix}: ${command}`; + const isError = Object.prototype.toString.call(error) === '[object Error]'; + const shortMessage = isError ? `${execaMessage}\n${error.message}` : execaMessage; + const message = [shortMessage, stderr, stdout].filter(Boolean).join('\n'); + + if (isError) { + error.originalMessage = error.message; + error.message = message; + } else { + error = new Error(message); + } + + error.shortMessage = shortMessage; + error.command = command; + error.exitCode = exitCode; + error.signal = signal; + error.signalDescription = signalDescription; + error.stdout = stdout; + error.stderr = stderr; + + if (all !== undefined) { + error.all = all; + } + + if ('bufferedData' in error) { + delete error.bufferedData; + } + + error.failed = true; + error.timedOut = Boolean(timedOut); + error.isCanceled = isCanceled; + error.killed = killed && !timedOut; + + return error; +}; + +module.exports = makeError; + + +/***/ }), + +/***/ 83940: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const os = __nccwpck_require__(22037); +const onExit = __nccwpck_require__(6644); + +const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5; + +// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior +const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => { + const killResult = kill(signal); + setKillTimeout(kill, signal, options, killResult); + return killResult; +}; + +const setKillTimeout = (kill, signal, options, killResult) => { + if (!shouldForceKill(signal, options, killResult)) { + return; + } + + const timeout = getForceKillAfterTimeout(options); + const t = setTimeout(() => { + kill('SIGKILL'); + }, timeout); + + // Guarded because there's no `.unref()` when `execa` is used in the renderer + // process in Electron. This cannot be tested since we don't run tests in + // Electron. + // istanbul ignore else + if (t.unref) { + t.unref(); + } +}; + +const shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => { + return isSigterm(signal) && forceKillAfterTimeout !== false && killResult; +}; + +const isSigterm = signal => { + return signal === os.constants.signals.SIGTERM || + (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM'); +}; + +const getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => { + if (forceKillAfterTimeout === true) { + return DEFAULT_FORCE_KILL_TIMEOUT; + } + + if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { + throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); + } + + return forceKillAfterTimeout; +}; + +// `childProcess.cancel()` +const spawnedCancel = (spawned, context) => { + const killResult = spawned.kill(); + + if (killResult) { + context.isCanceled = true; + } +}; + +const timeoutKill = (spawned, signal, reject) => { + spawned.kill(signal); + reject(Object.assign(new Error('Timed out'), {timedOut: true, signal})); +}; + +// `timeout` option handling +const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => { + if (timeout === 0 || timeout === undefined) { + return spawnedPromise; + } + + if (!Number.isFinite(timeout) || timeout < 0) { + throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); + } + + let timeoutId; + const timeoutPromise = new Promise((resolve, reject) => { + timeoutId = setTimeout(() => { + timeoutKill(spawned, killSignal, reject); + }, timeout); + }); + + const safeSpawnedPromise = spawnedPromise.finally(() => { + clearTimeout(timeoutId); + }); + + return Promise.race([timeoutPromise, safeSpawnedPromise]); +}; + +// `cleanup` option handling +const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => { + if (!cleanup || detached) { + return timedPromise; + } + + const removeExitHandler = onExit(() => { + spawned.kill(); + }); + + return timedPromise.finally(() => { + removeExitHandler(); + }); +}; + +module.exports = { + spawnedKill, + spawnedCancel, + setupTimeout, + setExitHandler +}; + + +/***/ }), + +/***/ 81090: +/***/ ((module) => { + +"use strict"; + + +const nativePromisePrototype = (async () => {})().constructor.prototype; +const descriptors = ['then', 'catch', 'finally'].map(property => [ + property, + Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) +]); + +// The return value is a mixin of `childProcess` and `Promise` +const mergePromise = (spawned, promise) => { + for (const [property, descriptor] of descriptors) { + // Starting the main `promise` is deferred to avoid consuming streams + const value = typeof promise === 'function' ? + (...args) => Reflect.apply(descriptor.value, promise(), args) : + descriptor.value.bind(promise); + + Reflect.defineProperty(spawned, property, {...descriptor, value}); + } + + return spawned; +}; + +// Use promises instead of `child_process` events +const getSpawnedPromise = spawned => { + return new Promise((resolve, reject) => { + spawned.on('exit', (exitCode, signal) => { + resolve({exitCode, signal}); + }); + + spawned.on('error', error => { + reject(error); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', error => { + reject(error); + }); + } + }); +}; + +module.exports = { + mergePromise, + getSpawnedPromise +}; + + + +/***/ }), + +/***/ 53510: +/***/ ((module) => { + +"use strict"; + +const aliases = ['stdin', 'stdout', 'stderr']; + +const hasAlias = options => aliases.some(alias => options[alias] !== undefined); + +const normalizeStdio = options => { + if (!options) { + return; + } + + const {stdio} = options; + + if (stdio === undefined) { + return aliases.map(alias => options[alias]); + } + + if (hasAlias(options)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`); + } + + if (typeof stdio === 'string') { + return stdio; + } + + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + + const length = Math.max(stdio.length, aliases.length); + return Array.from({length}, (value, index) => stdio[index]); +}; + +module.exports = normalizeStdio; + +// `ipc` is pushed unless it is already present +module.exports.node = options => { + const stdio = normalizeStdio(options); + + if (stdio === 'ipc') { + return 'ipc'; + } + + if (stdio === undefined || typeof stdio === 'string') { + return [stdio, stdio, stdio, 'ipc']; + } + + if (stdio.includes('ipc')) { + return stdio; + } + + return [...stdio, 'ipc']; +}; + + +/***/ }), + +/***/ 41131: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const isStream = __nccwpck_require__(71786); +const getStream = __nccwpck_require__(93202); +const mergeStream = __nccwpck_require__(1980); + +// `input` option +const handleInput = (spawned, input) => { + // Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852 + // TODO: Remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0 + if (input === undefined || spawned.stdin === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +}; + +// `all` interleaves `stdout` and `stderr` +const makeAllStream = (spawned, {all}) => { + if (!all || (!spawned.stdout && !spawned.stderr)) { + return; + } + + const mixed = mergeStream(); + + if (spawned.stdout) { + mixed.add(spawned.stdout); + } + + if (spawned.stderr) { + mixed.add(spawned.stderr); + } + + return mixed; +}; + +// On failure, `result.stdout|stderr|all` should contain the currently buffered stream +const getBufferedData = async (stream, streamPromise) => { + if (!stream) { + return; + } + + stream.destroy(); + + try { + return await streamPromise; + } catch (error) { + return error.bufferedData; + } +}; + +const getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => { + if (!stream || !buffer) { + return; + } + + if (encoding) { + return getStream(stream, {encoding, maxBuffer}); + } + + return getStream.buffer(stream, {maxBuffer}); +}; + +// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all) +const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => { + const stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer}); + const stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer}); + const allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2}); + + try { + return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); + } catch (error) { + return Promise.all([ + {error, signal: error.signal, timedOut: error.timedOut}, + getBufferedData(stdout, stdoutPromise), + getBufferedData(stderr, stderrPromise), + getBufferedData(all, allPromise) + ]); + } +}; + +const validateInputSync = ({input}) => { + if (isStream(input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } +}; + +module.exports = { + handleInput, + makeAllStream, + getSpawnedResult, + validateInputSync +}; + + + +/***/ }), + +/***/ 22035: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const {PassThrough: PassThroughStream} = __nccwpck_require__(12781); + +module.exports = options => { + options = {...options}; + + const {array} = options; + let {encoding} = options; + const isBuffer = encoding === 'buffer'; + let objectMode = false; + + if (array) { + objectMode = !(encoding || isBuffer); + } else { + encoding = encoding || 'utf8'; + } + + if (isBuffer) { + encoding = null; + } + + const stream = new PassThroughStream({objectMode}); + + if (encoding) { + stream.setEncoding(encoding); + } + + let length = 0; + const chunks = []; + + stream.on('data', chunk => { + chunks.push(chunk); + + if (objectMode) { + length = chunks.length; + } else { + length += chunk.length; + } + }); + + stream.getBufferedValue = () => { + if (array) { + return chunks; + } + + return isBuffer ? Buffer.concat(chunks, length) : chunks.join(''); + }; + + stream.getBufferedLength = () => length; + + return stream; +}; + + +/***/ }), + +/***/ 93202: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const {constants: BufferConstants} = __nccwpck_require__(14300); +const stream = __nccwpck_require__(12781); +const {promisify} = __nccwpck_require__(73837); +const bufferStream = __nccwpck_require__(22035); + +const streamPipelinePromisified = promisify(stream.pipeline); + +class MaxBufferError extends Error { + constructor() { + super('maxBuffer exceeded'); + this.name = 'MaxBufferError'; + } +} + +async function getStream(inputStream, options) { + if (!inputStream) { + throw new Error('Expected a stream'); + } + + options = { + maxBuffer: Infinity, + ...options + }; + + const {maxBuffer} = options; + const stream = bufferStream(options); + + await new Promise((resolve, reject) => { + const rejectPromise = error => { + // Don't retrieve an oversized buffer. + if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) { + error.bufferedData = stream.getBufferedValue(); + } + + reject(error); + }; + + (async () => { + try { + await streamPipelinePromisified(inputStream, stream); + resolve(); + } catch (error) { + rejectPromise(error); + } + })(); + + stream.on('data', () => { + if (stream.getBufferedLength() > maxBuffer) { + rejectPromise(new MaxBufferError()); + } + }); + }); + + return stream.getBufferedValue(); +} + +module.exports = getStream; +module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'}); +module.exports.array = (stream, options) => getStream(stream, {...options, array: true}); +module.exports.MaxBufferError = MaxBufferError; + + +/***/ }), + +/***/ 78768: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +Object.defineProperty(exports, "__esModule", ({value:true}));exports.SIGNALS=void 0; + +const SIGNALS=[ +{ +name:"SIGHUP", +number:1, +action:"terminate", +description:"Terminal closed", +standard:"posix"}, + +{ +name:"SIGINT", +number:2, +action:"terminate", +description:"User interruption with CTRL-C", +standard:"ansi"}, + +{ +name:"SIGQUIT", +number:3, +action:"core", +description:"User interruption with CTRL-\\", +standard:"posix"}, + +{ +name:"SIGILL", +number:4, +action:"core", +description:"Invalid machine instruction", +standard:"ansi"}, + +{ +name:"SIGTRAP", +number:5, +action:"core", +description:"Debugger breakpoint", +standard:"posix"}, + +{ +name:"SIGABRT", +number:6, +action:"core", +description:"Aborted", +standard:"ansi"}, + +{ +name:"SIGIOT", +number:6, +action:"core", +description:"Aborted", +standard:"bsd"}, + +{ +name:"SIGBUS", +number:7, +action:"core", +description: +"Bus error due to misaligned, non-existing address or paging error", +standard:"bsd"}, + +{ +name:"SIGEMT", +number:7, +action:"terminate", +description:"Command should be emulated but is not implemented", +standard:"other"}, + +{ +name:"SIGFPE", +number:8, +action:"core", +description:"Floating point arithmetic error", +standard:"ansi"}, + +{ +name:"SIGKILL", +number:9, +action:"terminate", +description:"Forced termination", +standard:"posix", +forced:true}, + +{ +name:"SIGUSR1", +number:10, +action:"terminate", +description:"Application-specific signal", +standard:"posix"}, + +{ +name:"SIGSEGV", +number:11, +action:"core", +description:"Segmentation fault", +standard:"ansi"}, + +{ +name:"SIGUSR2", +number:12, +action:"terminate", +description:"Application-specific signal", +standard:"posix"}, + +{ +name:"SIGPIPE", +number:13, +action:"terminate", +description:"Broken pipe or socket", +standard:"posix"}, + +{ +name:"SIGALRM", +number:14, +action:"terminate", +description:"Timeout or timer", +standard:"posix"}, + +{ +name:"SIGTERM", +number:15, +action:"terminate", +description:"Termination", +standard:"ansi"}, + +{ +name:"SIGSTKFLT", +number:16, +action:"terminate", +description:"Stack is empty or overflowed", +standard:"other"}, + +{ +name:"SIGCHLD", +number:17, +action:"ignore", +description:"Child process terminated, paused or unpaused", +standard:"posix"}, + +{ +name:"SIGCLD", +number:17, +action:"ignore", +description:"Child process terminated, paused or unpaused", +standard:"other"}, + +{ +name:"SIGCONT", +number:18, +action:"unpause", +description:"Unpaused", +standard:"posix", +forced:true}, + +{ +name:"SIGSTOP", +number:19, +action:"pause", +description:"Paused", +standard:"posix", +forced:true}, + +{ +name:"SIGTSTP", +number:20, +action:"pause", +description:"Paused using CTRL-Z or \"suspend\"", +standard:"posix"}, + +{ +name:"SIGTTIN", +number:21, +action:"pause", +description:"Background process cannot read terminal input", +standard:"posix"}, + +{ +name:"SIGBREAK", +number:21, +action:"terminate", +description:"User interruption with CTRL-BREAK", +standard:"other"}, + +{ +name:"SIGTTOU", +number:22, +action:"pause", +description:"Background process cannot write to terminal output", +standard:"posix"}, + +{ +name:"SIGURG", +number:23, +action:"ignore", +description:"Socket received out-of-band data", +standard:"bsd"}, + +{ +name:"SIGXCPU", +number:24, +action:"core", +description:"Process timed out", +standard:"bsd"}, + +{ +name:"SIGXFSZ", +number:25, +action:"core", +description:"File too big", +standard:"bsd"}, + +{ +name:"SIGVTALRM", +number:26, +action:"terminate", +description:"Timeout or timer", +standard:"bsd"}, + +{ +name:"SIGPROF", +number:27, +action:"terminate", +description:"Timeout or timer", +standard:"bsd"}, + +{ +name:"SIGWINCH", +number:28, +action:"ignore", +description:"Terminal window size changed", +standard:"bsd"}, + +{ +name:"SIGIO", +number:29, +action:"terminate", +description:"I/O is available", +standard:"other"}, + +{ +name:"SIGPOLL", +number:29, +action:"terminate", +description:"Watched event", +standard:"other"}, + +{ +name:"SIGINFO", +number:29, +action:"ignore", +description:"Request for process information", +standard:"other"}, + +{ +name:"SIGPWR", +number:30, +action:"terminate", +description:"Device running out of power", +standard:"systemv"}, + +{ +name:"SIGSYS", +number:31, +action:"core", +description:"Invalid system call", +standard:"other"}, + +{ +name:"SIGUNUSED", +number:31, +action:"terminate", +description:"Invalid system call", +standard:"other"}];exports.SIGNALS=SIGNALS; +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 68064: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +Object.defineProperty(exports, "__esModule", ({value:true}));exports.signalsByNumber=exports.signalsByName=void 0;var _os=__nccwpck_require__(22037); + +var _signals=__nccwpck_require__(59822); +var _realtime=__nccwpck_require__(58402); + + + +const getSignalsByName=function(){ +const signals=(0,_signals.getSignals)(); +return signals.reduce(getSignalByName,{}); +}; + +const getSignalByName=function( +signalByNameMemo, +{name,number,description,supported,action,forced,standard}) +{ +return{ +...signalByNameMemo, +[name]:{name,number,description,supported,action,forced,standard}}; + +}; + +const signalsByName=getSignalsByName();exports.signalsByName=signalsByName; + + + + +const getSignalsByNumber=function(){ +const signals=(0,_signals.getSignals)(); +const length=_realtime.SIGRTMAX+1; +const signalsA=Array.from({length},(value,number)=> +getSignalByNumber(number,signals)); + +return Object.assign({},...signalsA); +}; + +const getSignalByNumber=function(number,signals){ +const signal=findSignalByNumber(number,signals); + +if(signal===undefined){ +return{}; +} + +const{name,description,supported,action,forced,standard}=signal; +return{ +[number]:{ +name, +number, +description, +supported, +action, +forced, +standard}}; + + +}; + + + +const findSignalByNumber=function(number,signals){ +const signal=signals.find(({name})=>_os.constants.signals[name]===number); + +if(signal!==undefined){ +return signal; +} + +return signals.find(signalA=>signalA.number===number); +}; + +const signalsByNumber=getSignalsByNumber();exports.signalsByNumber=signalsByNumber; +//# sourceMappingURL=main.js.map + +/***/ }), + +/***/ 58402: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +Object.defineProperty(exports, "__esModule", ({value:true}));exports.SIGRTMAX=exports.getRealtimeSignals=void 0; +const getRealtimeSignals=function(){ +const length=SIGRTMAX-SIGRTMIN+1; +return Array.from({length},getRealtimeSignal); +};exports.getRealtimeSignals=getRealtimeSignals; + +const getRealtimeSignal=function(value,index){ +return{ +name:`SIGRT${index+1}`, +number:SIGRTMIN+index, +action:"terminate", +description:"Application-specific signal (realtime)", +standard:"posix"}; + +}; + +const SIGRTMIN=34; +const SIGRTMAX=64;exports.SIGRTMAX=SIGRTMAX; +//# sourceMappingURL=realtime.js.map + +/***/ }), + +/***/ 59822: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +Object.defineProperty(exports, "__esModule", ({value:true}));exports.getSignals=void 0;var _os=__nccwpck_require__(22037); + +var _core=__nccwpck_require__(78768); +var _realtime=__nccwpck_require__(58402); + + + +const getSignals=function(){ +const realtimeSignals=(0,_realtime.getRealtimeSignals)(); +const signals=[..._core.SIGNALS,...realtimeSignals].map(normalizeSignal); +return signals; +};exports.getSignals=getSignals; + + + + + + + +const normalizeSignal=function({ +name, +number:defaultNumber, +description, +action, +forced=false, +standard}) +{ +const{ +signals:{[name]:constantSignal}}= +_os.constants; +const supported=constantSignal!==undefined; +const number=supported?constantSignal:defaultNumber; +return{name,number,description,supported,action,forced,standard}; +}; +//# sourceMappingURL=signals.js.map + +/***/ }), + +/***/ 71786: +/***/ ((module) => { + +"use strict"; + + +const isStream = stream => + stream !== null && + typeof stream === 'object' && + typeof stream.pipe === 'function'; + +isStream.writable = stream => + isStream(stream) && + stream.writable !== false && + typeof stream._write === 'function' && + typeof stream._writableState === 'object'; + +isStream.readable = stream => + isStream(stream) && + stream.readable !== false && + typeof stream._read === 'function' && + typeof stream._readableState === 'object'; + +isStream.duplex = stream => + isStream.writable(stream) && + isStream.readable(stream); + +isStream.transform = stream => + isStream.duplex(stream) && + typeof stream._transform === 'function'; + +module.exports = isStream; + + +/***/ }), + +/***/ 41783: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + + +var loader = __nccwpck_require__(14185); +var dumper = __nccwpck_require__(46321); + + +function renamed(from, to) { + return function () { + throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + + 'Use yaml.' + to + ' instead, which is now safe by default.'); + }; +} + + +module.exports.Type = __nccwpck_require__(71643); +module.exports.Schema = __nccwpck_require__(37385); +module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(67264); +module.exports.JSON_SCHEMA = __nccwpck_require__(60974); +module.exports.CORE_SCHEMA = __nccwpck_require__(14807); +module.exports.DEFAULT_SCHEMA = __nccwpck_require__(45833); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.dump = dumper.dump; +module.exports.YAMLException = __nccwpck_require__(73456); + +// Re-export all types in case user wants to create custom schema +module.exports.types = { + binary: __nccwpck_require__(53183), + float: __nccwpck_require__(92286), + map: __nccwpck_require__(8635), + null: __nccwpck_require__(8906), + pairs: __nccwpck_require__(56814), + set: __nccwpck_require__(63096), + timestamp: __nccwpck_require__(53521), + bool: __nccwpck_require__(84930), + int: __nccwpck_require__(91173), + merge: __nccwpck_require__(66883), + omap: __nccwpck_require__(90139), + seq: __nccwpck_require__(25527), + str: __nccwpck_require__(28597) +}; + +// Removed functions from JS-YAML 3.0.x +module.exports.safeLoad = renamed('safeLoad', 'load'); +module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll'); +module.exports.safeDump = renamed('safeDump', 'dump'); + + +/***/ }), + +/***/ 15805: +/***/ ((module) => { + +"use strict"; + + + +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} + + +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} + + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; +} + + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; +} + + +function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; +} + + +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} + + +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; + + +/***/ }), + +/***/ 46321: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/*eslint-disable no-use-before-define*/ + +var common = __nccwpck_require__(15805); +var YAMLException = __nccwpck_require__(73456); +var DEFAULT_SCHEMA = __nccwpck_require__(45833); + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_BOM = 0xFEFF; +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_EQUALS = 0x3D; /* = */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + + +var QUOTING_TYPE_SINGLE = 1, + QUOTING_TYPE_DOUBLE = 2; + +function State(options) { + this.schema = options['schema'] || DEFAULT_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options['forceQuotes'] || false; + this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// [34] ns-char ::= nb-char - s-white +// [27] nb-char ::= c-printable - b-char - c-byte-order-mark +// [26] b-char ::= b-line-feed | b-carriage-return +// Including s-white (for some reason, examples doesn't match specs in this aspect) +// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark +function isNsCharOrWhitespace(c) { + return isPrintable(c) + && c !== CHAR_BOM + // - b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; +} + +// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out +// c = flow-in ⇒ ns-plain-safe-in +// c = block-key ⇒ ns-plain-safe-out +// c = flow-key ⇒ ns-plain-safe-in +// [128] ns-plain-safe-out ::= ns-char +// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator +// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) +// | ( /* An ns-char preceding */ “#” ) +// | ( “:” /* Followed by an ns-plain-safe(c) */ ) +function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return ( + // ns-plain-safe + inblock ? // c = flow-in + cIsNsCharOrWhitespace + : cIsNsCharOrWhitespace + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + ) + // ns-plain-char + && c !== CHAR_SHARP // false on '#' + && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' + || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' + || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part + return isPrintable(c) && c !== CHAR_BOM + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Simplified test for values allowed as the last character in plain style. +function isPlainSafeLast(c) { + // just not whitespace or colon, it will be checked to be plain character later + return !isWhitespace(c) && c !== CHAR_COLON; +} + +// Same as 'string'.codePointAt(pos), but works in older browsers. +function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, + testAmbiguousType, quotingType, forceQuotes, inblock) { + + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(codePointAt(string, 0)) + && isPlainSafeLast(codePointAt(string, string.length - 1)); + + if (singleLineOnly || forceQuotes) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey, inblock) { + state.dump = (function () { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); + } + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, + testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char = 0; + var escapeSeq; + + for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 0x10000) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level, value, false, false) || + (typeof value === 'undefined' && + writeNode(state, level, null, false, false))) { + + if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level + 1, value, true, true, false, true) || + (typeof value === 'undefined' && + writeNode(state, level + 1, null, true, true, false, true))) { + + if (!compact || _result !== '') { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (_result !== '') pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || _result !== '') { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = '?'; + } + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey, inblock); + } + } else if (type === '[object Undefined]') { + return false; + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + // Need to encode all characters except those allowed by the spec: + // + // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ + // [36] ns-hex-digit ::= ns-dec-digit + // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ + // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ + // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” + // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” + // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” + // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” + // + // Also need to encode '!' because it has special meaning (end of tag prefix). + // + tagStr = encodeURI( + state.tag[0] === '!' ? state.tag.slice(1) : state.tag + ).replace(/!/g, '%21'); + + if (state.tag[0] === '!') { + tagStr = '!' + tagStr; + } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { + tagStr = '!!' + tagStr.slice(18); + } else { + tagStr = '!<' + tagStr + '>'; + } + + state.dump = tagStr + ' ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + var value = input; + + if (state.replacer) { + value = state.replacer.call({ '': value }, '', value); + } + + if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; + + return ''; +} + +module.exports.dump = dump; + + +/***/ }), + +/***/ 73456: +/***/ ((module) => { + +"use strict"; +// YAML error class. http://stackoverflow.com/questions/8458984 +// + + + +function formatError(exception, compact) { + var where = '', message = exception.reason || '(unknown reason)'; + + if (!exception.mark) return message; + + if (exception.mark.name) { + where += 'in "' + exception.mark.name + '" '; + } + + where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; + + if (!compact && exception.mark.snippet) { + where += '\n\n' + exception.mark.snippet; + } + + return message + ' ' + where; +} + + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + return this.name + ': ' + formatError(this, compact); +}; + + +module.exports = YAMLException; + + +/***/ }), + +/***/ 14185: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/*eslint-disable max-len,no-use-before-define*/ + +var common = __nccwpck_require__(15805); +var YAMLException = __nccwpck_require__(73456); +var makeSnippet = __nccwpck_require__(88264); +var DEFAULT_SCHEMA = __nccwpck_require__(45833); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_SCHEMA; + this.onWarning = options['onWarning'] || null; + // (Hidden) Remove? makes the loader to expect YAML 1.1 documents + // if such documents have no explicit %YAML directive + this.legacy = options['legacy'] || false; + + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + // position of first leading tab in the current line, + // used to make sure there are no tabs in the indentation + this.firstTabInLine = -1; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + + mark.snippet = makeSnippet(mark); + + return new YAMLException(message, mark); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, 'tag prefix is malformed: ' + prefix); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, + startLine, startLineStart, startPos) { + + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + + // used for this specific key only because Object.defineProperty is slow + if (keyNode === '__proto__') { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _lineStart, + _pos, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = Object.create(null), + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } else if (ch === 0x2C/* , */) { + // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 + throwError(state, "expected the node content, but found ','"); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; // Save the current line. + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _keyLine, + _keyLineStart, + _keyPos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = Object.create(null), + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + // Neither implicit nor explicit notation. + // Reading is done. Go to the epilogue. + break; + } + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, 'tag name is malformed: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + + } else if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "! [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== '!') { + if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + } else { + // looking for multi type + type = null; + typeList = state.typeMap.multi[state.kind || 'fallback']; + + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + + if (!type) { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; + + +/***/ }), + +/***/ 37385: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/*eslint-disable max-len*/ + +var YAMLException = __nccwpck_require__(73456); +var Type = __nccwpck_require__(71643); + + +function compileList(schema, name) { + var result = []; + + schema[name].forEach(function (currentType) { + var newIndex = result.length; + + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && + previousType.kind === currentType.kind && + previousType.multi === currentType.multi) { + + newIndex = previousIndex; + } + }); + + result[newIndex] = currentType; + }); + + return result; +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi['fallback'].push(type); + } else { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + return this.extend(definition); +} + + +Schema.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + + if (definition instanceof Type) { + // Schema.extend(type) + explicit.push(definition); + + } else if (Array.isArray(definition)) { + // Schema.extend([ type1, type2, ... ]) + explicit = explicit.concat(definition); + + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + + } else { + throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + + 'or a schema definition ({ implicit: [...], explicit: [...] })'); + } + + implicit.forEach(function (type) { + if (!(type instanceof Type)) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + + if (type.multi) { + throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); + } + }); + + explicit.forEach(function (type) { + if (!(type instanceof Type)) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + }); + + var result = Object.create(Schema.prototype); + + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + + result.compiledImplicit = compileList(result, 'implicit'); + result.compiledExplicit = compileList(result, 'explicit'); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + + return result; +}; + + +module.exports = Schema; + + +/***/ }), + +/***/ 14807: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + + + + +module.exports = __nccwpck_require__(60974); + + +/***/ }), + +/***/ 45833: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + + + + +module.exports = (__nccwpck_require__(14807).extend)({ + implicit: [ + __nccwpck_require__(53521), + __nccwpck_require__(66883) + ], + explicit: [ + __nccwpck_require__(53183), + __nccwpck_require__(90139), + __nccwpck_require__(56814), + __nccwpck_require__(63096) + ] +}); + + +/***/ }), + +/***/ 67264: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + + + + +var Schema = __nccwpck_require__(37385); + + +module.exports = new Schema({ + explicit: [ + __nccwpck_require__(28597), + __nccwpck_require__(25527), + __nccwpck_require__(8635) + ] +}); + + +/***/ }), + +/***/ 60974: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + + + + +module.exports = (__nccwpck_require__(67264).extend)({ + implicit: [ + __nccwpck_require__(8906), + __nccwpck_require__(84930), + __nccwpck_require__(91173), + __nccwpck_require__(92286) + ] +}); + + +/***/ }), + +/***/ 88264: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + + +var common = __nccwpck_require__(15805); + + +// get snippet for a single line, respecting maxLength +function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ''; + var tail = ''; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + + if (position - lineStart > maxHalfLength) { + head = ' ... '; + lineStart = position - maxHalfLength + head.length; + } + + if (lineEnd - position > maxHalfLength) { + tail = ' ...'; + lineEnd = position + maxHalfLength - tail.length; + } + + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, + pos: position - lineStart + head.length // relative position + }; +} + + +function padStart(string, max) { + return common.repeat(' ', max - string.length) + string; +} + + +function makeSnippet(mark, options) { + options = Object.create(options || null); + + if (!mark.buffer) return null; + + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== 'number') options.indent = 1; + if (typeof options.linesBefore !== 'number') options.linesBefore = 3; + if (typeof options.linesAfter !== 'number') options.linesAfter = 2; + + var re = /\r?\n|\r|\0/g; + var lineStarts = [ 0 ]; + var lineEnds = []; + var match; + var foundLineNo = -1; + + while ((match = re.exec(mark.buffer))) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + + var result = '', i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n' + result; + } + + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; + + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + } + + return result.replace(/\n$/, ''); +} + + +module.exports = makeSnippet; + + +/***/ }), + +/***/ 71643: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var YAMLException = __nccwpck_require__(73456); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'multi', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'representName', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.options = options; // keep original options in case user wants to extend this type later + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.representName = options['representName'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.multi = options['multi'] || false; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; + + +/***/ }), + +/***/ 53183: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/*eslint-disable no-bitwise*/ + + +var Type = __nccwpck_require__(71643); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + return new Uint8Array(result); +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(obj) { + return Object.prototype.toString.call(obj) === '[object Uint8Array]'; +} + +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); + + +/***/ }), + +/***/ 84930: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + + +/***/ }), + +/***/ 92286: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var common = __nccwpck_require__(15805); +var Type = __nccwpck_require__(71643); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + + +/***/ }), + +/***/ 91173: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var common = __nccwpck_require__(15805); +var Type = __nccwpck_require__(71643); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'o') { + // base 8 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + } + + // base 10 (except 0) + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + return true; +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); + if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + + +/***/ }), + +/***/ 8635: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); + + +/***/ }), + +/***/ 66883: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + + +/***/ }), + +/***/ 8906: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; }, + empty: function () { return ''; } + }, + defaultStyle: 'lowercase' +}); + + +/***/ }), + +/***/ 90139: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); + + +/***/ }), + +/***/ 56814: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +var _toString = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + + +/***/ }), + +/***/ 25527: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + + +/***/ }), + +/***/ 63096: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + + +/***/ }), + +/***/ 28597: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + + +/***/ }), + +/***/ 53521: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(71643); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + + +/***/ }), + +/***/ 78982: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const path = __nccwpck_require__(71017); +const pathKey = __nccwpck_require__(86183); + +const npmRunPath = options => { + options = { + cwd: process.cwd(), + path: process.env[pathKey()], + execPath: process.execPath, + ...options + }; + + let previous; + let cwdPath = path.resolve(options.cwd); + const result = []; + + while (previous !== cwdPath) { + result.push(path.join(cwdPath, 'node_modules/.bin')); + previous = cwdPath; + cwdPath = path.resolve(cwdPath, '..'); + } + + // Ensure the running `node` binary is used + const execPathDir = path.resolve(options.cwd, options.execPath, '..'); + result.push(execPathDir); + + return result.concat(options.path).join(path.delimiter); +}; + +module.exports = npmRunPath; +// TODO: Remove this for the next major release +module.exports["default"] = npmRunPath; + +module.exports.env = options => { + options = { + env: process.env, + ...options + }; + + const env = {...options.env}; + const path = pathKey({env}); + + options.path = env[path]; + env[path] = module.exports(options); + + return env; +}; + + +/***/ }), + +/***/ 86183: +/***/ ((module) => { + +"use strict"; + + +const pathKey = (options = {}) => { + const environment = options.env || process.env; + const platform = options.platform || process.platform; + + if (platform !== 'win32') { + return 'PATH'; + } + + return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path'; +}; + +module.exports = pathKey; +// TODO: Remove this for the next major release +module.exports["default"] = pathKey; + + +/***/ }), + +/***/ 10302: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const shebangRegex = __nccwpck_require__(52405); + +module.exports = (string = '') => { + const match = string.match(shebangRegex); + + if (!match) { + return null; + } + + const [path, argument] = match[0].replace(/#! ?/, '').split(' '); + const binary = path.split('/').pop(); + + if (binary === 'env') { + return argument; + } + + return argument ? `${binary} ${argument}` : binary; +}; + + +/***/ }), + +/***/ 52405: +/***/ ((module) => { + +"use strict"; + +module.exports = /^#!(.*)/; + + +/***/ }), + +/***/ 99156: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +const path = __nccwpck_require__(71017) +const COLON = isWindows ? ';' : ':' +const isexe = __nccwpck_require__(81119) + +const getNotFoundError = (cmd) => + Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) + +const getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [''] + : ( + [ + // windows always checks the cwd first + ...(isWindows ? [process.cwd()] : []), + ...(opt.path || process.env.PATH || + /* istanbul ignore next: very unusual */ '').split(colon), + ] + ) + const pathExtExe = isWindows + ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' + : '' + const pathExt = isWindows ? pathExtExe.split(colon) : [''] + + if (isWindows) { + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + return { + pathEnv, + pathExt, + pathExtExe, + } +} + +const which = (cmd, opt, cb) => { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + if (!opt) + opt = {} + + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) + const found = [] + + const step = i => new Promise((resolve, reject) => { + if (i === pathEnv.length) + return opt.all && found.length ? resolve(found) + : reject(getNotFoundError(cmd)) + + const ppRaw = pathEnv[i] + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw + + const pCmd = path.join(pathPart, cmd) + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd + : pCmd + + resolve(subStep(p, i, 0)) + }) + + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) + return resolve(step(i + 1)) + const ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return resolve(p + ext) + } + return resolve(subStep(p, i, ii + 1)) + }) + }) + + return cb ? step(0).then(res => cb(null, res), cb) : step(0) +} + +const whichSync = (cmd, opt) => { + opt = opt || {} + + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) + const found = [] + + for (let i = 0; i < pathEnv.length; i ++) { + const ppRaw = pathEnv[i] + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw + + const pCmd = path.join(pathPart, cmd) + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd + : pCmd + + for (let j = 0; j < pathExt.length; j ++) { + const cur = p + pathExt[j] + try { + const 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) +} + +module.exports = which +which.sync = whichSync + + +/***/ }), + +/***/ 27737: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { define } = __nccwpck_require__(38063) +const base = __nccwpck_require__(75785) +const constants = __nccwpck_require__(89886) +const decoders = __nccwpck_require__(59734) +const encoders = __nccwpck_require__(48574) + +module.exports = { + base, + constants, + decoders, + define, + encoders +} + + +/***/ }), + +/***/ 38063: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { inherits } = __nccwpck_require__(73837) +const encoders = __nccwpck_require__(48574) +const decoders = __nccwpck_require__(59734) + +module.exports.define = function define (name, body) { + return new Entity(name, body) +} + +function Entity (name, body) { + this.name = name + this.body = body + + this.decoders = {} + this.encoders = {} +} + +Entity.prototype._createNamed = function createNamed (Base) { + const name = this.name + + function Generated (entity) { + this._initNamed(entity, name) + } + inherits(Generated, Base) + Generated.prototype._initNamed = function _initNamed (entity, name) { + Base.call(this, entity, name) + } + + return new Generated(this) +} + +Entity.prototype._getDecoder = function _getDecoder (enc) { + enc = enc || 'der' + // Lazily create decoder + if (!Object.prototype.hasOwnProperty.call(this.decoders, enc)) { this.decoders[enc] = this._createNamed(decoders[enc]) } + return this.decoders[enc] +} + +Entity.prototype.decode = function decode (data, enc, options) { + return this._getDecoder(enc).decode(data, options) +} + +Entity.prototype._getEncoder = function _getEncoder (enc) { + enc = enc || 'der' + // Lazily create encoder + if (!Object.prototype.hasOwnProperty.call(this.encoders, enc)) { this.encoders[enc] = this._createNamed(encoders[enc]) } + return this.encoders[enc] +} + +Entity.prototype.encode = function encode (data, enc, /* internal */ reporter) { + return this._getEncoder(enc).encode(data, reporter) +} + + +/***/ }), + +/***/ 82380: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { inherits } = __nccwpck_require__(73837) + +const { Reporter } = __nccwpck_require__(99537) + +function DecoderBuffer (base, options) { + Reporter.call(this, options) + if (!Buffer.isBuffer(base)) { + this.error('Input not Buffer') + return + } + + this.base = base + this.offset = 0 + this.length = base.length +} +inherits(DecoderBuffer, Reporter) + +DecoderBuffer.isDecoderBuffer = function isDecoderBuffer (data) { + if (data instanceof DecoderBuffer) { + return true + } + + // Or accept compatible API + const isCompatible = typeof data === 'object' && + Buffer.isBuffer(data.base) && + data.constructor.name === 'DecoderBuffer' && + typeof data.offset === 'number' && + typeof data.length === 'number' && + typeof data.save === 'function' && + typeof data.restore === 'function' && + typeof data.isEmpty === 'function' && + typeof data.readUInt8 === 'function' && + typeof data.skip === 'function' && + typeof data.raw === 'function' + + return isCompatible +} + +DecoderBuffer.prototype.save = function save () { + return { offset: this.offset, reporter: Reporter.prototype.save.call(this) } +} + +DecoderBuffer.prototype.restore = function restore (save) { + // Return skipped data + const res = new DecoderBuffer(this.base) + res.offset = save.offset + res.length = this.offset + + this.offset = save.offset + Reporter.prototype.restore.call(this, save.reporter) + + return res +} + +DecoderBuffer.prototype.isEmpty = function isEmpty () { + return this.offset === this.length +} + +DecoderBuffer.prototype.readUInt8 = function readUInt8 (fail) { + if (this.offset + 1 <= this.length) { return this.base.readUInt8(this.offset++, true) } else { return this.error(fail || 'DecoderBuffer overrun') } +} + +DecoderBuffer.prototype.skip = function skip (bytes, fail) { + if (!(this.offset + bytes <= this.length)) { return this.error(fail || 'DecoderBuffer overrun') } + + const res = new DecoderBuffer(this.base) + + // Share reporter state + res._reporterState = this._reporterState + + res.offset = this.offset + res.length = this.offset + bytes + this.offset += bytes + return res +} + +DecoderBuffer.prototype.raw = function raw (save) { + return this.base.slice(save ? save.offset : this.offset, this.length) +} + +function EncoderBuffer (value, reporter) { + if (Array.isArray(value)) { + this.length = 0 + this.value = value.map(function (item) { + if (!EncoderBuffer.isEncoderBuffer(item)) { item = new EncoderBuffer(item, reporter) } + this.length += item.length + return item + }, this) + } else if (typeof value === 'number') { + if (!(value >= 0 && value <= 0xff)) { return reporter.error('non-byte EncoderBuffer value') } + this.value = value + this.length = 1 + } else if (typeof value === 'string') { + this.value = value + this.length = Buffer.byteLength(value) + } else if (Buffer.isBuffer(value)) { + this.value = value + this.length = value.length + } else { + return reporter.error(`Unsupported type: ${typeof value}`) + } +} + +EncoderBuffer.isEncoderBuffer = function isEncoderBuffer (data) { + if (data instanceof EncoderBuffer) { + return true + } + + // Or accept compatible API + const isCompatible = typeof data === 'object' && + data.constructor.name === 'EncoderBuffer' && + typeof data.length === 'number' && + typeof data.join === 'function' + + return isCompatible +} + +EncoderBuffer.prototype.join = function join (out, offset) { + if (!out) { out = Buffer.alloc(this.length) } + if (!offset) { offset = 0 } + + if (this.length === 0) { return out } + + if (Array.isArray(this.value)) { + this.value.forEach(function (item) { + item.join(out, offset) + offset += item.length + }) + } else { + if (typeof this.value === 'number') { out[offset] = this.value } else if (typeof this.value === 'string') { out.write(this.value, offset) } else if (Buffer.isBuffer(this.value)) { this.value.copy(out, offset) } + offset += this.length + } + + return out +} + +module.exports = { + DecoderBuffer, + EncoderBuffer +} + + +/***/ }), + +/***/ 75785: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { Reporter } = __nccwpck_require__(99537) +const { DecoderBuffer, EncoderBuffer } = __nccwpck_require__(82380) +const Node = __nccwpck_require__(98101) + +module.exports = { + DecoderBuffer, + EncoderBuffer, + Node, + Reporter +} + + +/***/ }), + +/***/ 98101: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { strict: assert } = __nccwpck_require__(39491) + +const { Reporter } = __nccwpck_require__(99537) +const { DecoderBuffer, EncoderBuffer } = __nccwpck_require__(82380) + +// Supported tags +const tags = [ + 'seq', 'seqof', 'set', 'setof', 'objid', 'bool', + 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc', + 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str', + 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr' +] + +// Public methods list +const methods = [ + 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', + 'any', 'contains' +].concat(tags) + +// Overrided methods list +const overrided = [ + '_peekTag', '_decodeTag', '_use', + '_decodeStr', '_decodeObjid', '_decodeTime', + '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList', + + '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime', + '_encodeNull', '_encodeInt', '_encodeBool' +] + +function Node (enc, parent, name) { + const state = {} + this._baseState = state + + state.name = name + state.enc = enc + + state.parent = parent || null + state.children = null + + // State + state.tag = null + state.args = null + state.reverseArgs = null + state.choice = null + state.optional = false + state.any = false + state.obj = false + state.use = null + state.useDecoder = null + state.key = null + state.default = null + state.explicit = null + state.implicit = null + state.contains = null + + // Should create new instance on each method + if (!state.parent) { + state.children = [] + this._wrap() + } +} + +const stateProps = [ + 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice', + 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit', + 'implicit', 'contains' +] + +Node.prototype.clone = function clone () { + const state = this._baseState + const cstate = {} + stateProps.forEach(function (prop) { + cstate[prop] = state[prop] + }) + const res = new this.constructor(cstate.parent) + res._baseState = cstate + return res +} + +Node.prototype._wrap = function wrap () { + const state = this._baseState + methods.forEach(function (method) { + this[method] = function _wrappedMethod () { + const clone = new this.constructor(this) + state.children.push(clone) + return clone[method].apply(clone, arguments) + } + }, this) +} + +Node.prototype._init = function init (body) { + const state = this._baseState + + assert(state.parent === null) + body.call(this) + + // Filter children + state.children = state.children.filter(function (child) { + return child._baseState.parent === this + }, this) + assert.equal(state.children.length, 1, 'Root node can have only one child') +} + +Node.prototype._useArgs = function useArgs (args) { + const state = this._baseState + + // Filter children and args + const children = args.filter(function (arg) { + return arg instanceof this.constructor + }, this) + args = args.filter(function (arg) { + return !(arg instanceof this.constructor) + }, this) + + if (children.length !== 0) { + assert(state.children === null) + state.children = children + + // Replace parent to maintain backward link + children.forEach(function (child) { + child._baseState.parent = this + }, this) + } + if (args.length !== 0) { + assert(state.args === null) + state.args = args + state.reverseArgs = args.map(function (arg) { + if (typeof arg !== 'object' || arg.constructor !== Object) { return arg } + + const res = {} + Object.keys(arg).forEach(function (key) { + if (key == (key | 0)) { key |= 0 } // eslint-disable-line eqeqeq + const value = arg[key] + res[value] = key + }) + return res + }) + } +} + +// +// Overrided methods +// + +overrided.forEach(function (method) { + Node.prototype[method] = function _overrided () { + const state = this._baseState + throw new Error(`${method} not implemented for encoding: ${state.enc}`) + } +}) + +// +// Public methods +// + +tags.forEach(function (tag) { + Node.prototype[tag] = function _tagMethod () { + const state = this._baseState + const args = Array.prototype.slice.call(arguments) + + assert(state.tag === null) + state.tag = tag + + this._useArgs(args) + + return this + } +}) + +Node.prototype.use = function use (item) { + assert(item) + const state = this._baseState + + assert(state.use === null) + state.use = item + + return this +} + +Node.prototype.optional = function optional () { + const state = this._baseState + + state.optional = true + + return this +} + +Node.prototype.def = function def (val) { + const state = this._baseState + + assert(state.default === null) + state.default = val + state.optional = true + + return this +} + +Node.prototype.explicit = function explicit (num) { + const state = this._baseState + + assert(state.explicit === null && state.implicit === null) + state.explicit = num + + return this +} + +Node.prototype.implicit = function implicit (num) { + const state = this._baseState + + assert(state.explicit === null && state.implicit === null) + state.implicit = num + + return this +} + +Node.prototype.obj = function obj () { + const state = this._baseState + const args = Array.prototype.slice.call(arguments) + + state.obj = true + + if (args.length !== 0) { this._useArgs(args) } + + return this +} + +Node.prototype.key = function key (newKey) { + const state = this._baseState + + assert(state.key === null) + state.key = newKey + + return this +} + +Node.prototype.any = function any () { + const state = this._baseState + + state.any = true + + return this +} + +Node.prototype.choice = function choice (obj) { + const state = this._baseState + + assert(state.choice === null) + state.choice = obj + this._useArgs(Object.keys(obj).map(function (key) { + return obj[key] + })) + + return this +} + +Node.prototype.contains = function contains (item) { + const state = this._baseState + + assert(state.use === null) + state.contains = item + + return this +} + +// +// Decoding +// + +Node.prototype._decode = function decode (input, options) { + const state = this._baseState + + // Decode root node + if (state.parent === null) { return input.wrapResult(state.children[0]._decode(input, options)) } + + let result = state.default + let present = true + + let prevKey = null + if (state.key !== null) { prevKey = input.enterKey(state.key) } + + // Check if tag is there + if (state.optional) { + let tag = null + if (state.explicit !== null) { tag = state.explicit } else if (state.implicit !== null) { tag = state.implicit } else if (state.tag !== null) { tag = state.tag } + + if (tag === null && !state.any) { + // Trial and Error + const save = input.save() + try { + if (state.choice === null) { this._decodeGeneric(state.tag, input, options) } else { this._decodeChoice(input, options) } + present = true + } catch (e) { + present = false + } + input.restore(save) + } else { + present = this._peekTag(input, tag, state.any) + + if (input.isError(present)) { return present } + } + } + + // Push object on stack + let prevObj + if (state.obj && present) { prevObj = input.enterObject() } + + if (present) { + // Unwrap explicit values + if (state.explicit !== null) { + const explicit = this._decodeTag(input, state.explicit) + if (input.isError(explicit)) { return explicit } + input = explicit + } + + const start = input.offset + + // Unwrap implicit and normal values + if (state.use === null && state.choice === null) { + let save + if (state.any) { save = input.save() } + const body = this._decodeTag( + input, + state.implicit !== null ? state.implicit : state.tag, + state.any + ) + if (input.isError(body)) { return body } + + if (state.any) { result = input.raw(save) } else { input = body } + } + + if (options && options.track && state.tag !== null) { options.track(input.path(), start, input.length, 'tagged') } + + if (options && options.track && state.tag !== null) { options.track(input.path(), input.offset, input.length, 'content') } + + // Select proper method for tag + if (state.any) { + // no-op + } else if (state.choice === null) { + result = this._decodeGeneric(state.tag, input, options) + } else { + result = this._decodeChoice(input, options) + } + + if (input.isError(result)) { return result } + + // Decode children + if (!state.any && state.choice === null && state.children !== null) { + state.children.forEach(function decodeChildren (child) { + // NOTE: We are ignoring errors here, to let parser continue with other + // parts of encoded data + child._decode(input, options) + }) + } + + // Decode contained/encoded by schema, only in bit or octet strings + if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) { + const data = new DecoderBuffer(result) + result = this._getUse(state.contains, input._reporterState.obj) + ._decode(data, options) + } + } + + // Pop object + if (state.obj && present) { result = input.leaveObject(prevObj) } + + // Set key + if (state.key !== null && (result !== null || present === true)) { input.leaveKey(prevKey, state.key, result) } else if (prevKey !== null) { input.exitKey(prevKey) } + + return result +} + +Node.prototype._decodeGeneric = function decodeGeneric (tag, input, options) { + const state = this._baseState + + if (tag === 'seq' || tag === 'set') { return null } + if (tag === 'seqof' || tag === 'setof') { return this._decodeList(input, tag, state.args[0], options) } else if (/str$/.test(tag)) { return this._decodeStr(input, tag, options) } else if (tag === 'objid' && state.args) { return this._decodeObjid(input, state.args[0], state.args[1], options) } else if (tag === 'objid') { return this._decodeObjid(input, null, null, options) } else if (tag === 'gentime' || tag === 'utctime') { return this._decodeTime(input, tag, options) } else if (tag === 'null_') { return this._decodeNull(input, options) } else if (tag === 'bool') { return this._decodeBool(input, options) } else if (tag === 'objDesc') { return this._decodeStr(input, tag, options) } else if (tag === 'int' || tag === 'enum') { return this._decodeInt(input, state.args && state.args[0], options) } + + if (state.use !== null) { + return this._getUse(state.use, input._reporterState.obj) + ._decode(input, options) + } else { + return input.error(`unknown tag: ${tag}`) + } +} + +Node.prototype._getUse = function _getUse (entity, obj) { + const state = this._baseState + // Create altered use decoder if implicit is set + state.useDecoder = this._use(entity, obj) + assert(state.useDecoder._baseState.parent === null) + state.useDecoder = state.useDecoder._baseState.children[0] + if (state.implicit !== state.useDecoder._baseState.implicit) { + state.useDecoder = state.useDecoder.clone() + state.useDecoder._baseState.implicit = state.implicit + } + return state.useDecoder +} + +Node.prototype._decodeChoice = function decodeChoice (input, options) { + const state = this._baseState + let result = null + let match = false + + Object.keys(state.choice).some(function (key) { + const save = input.save() + const node = state.choice[key] + try { + const value = node._decode(input, options) + if (input.isError(value)) { return false } + + result = { type: key, value: value } + match = true + } catch (e) { + input.restore(save) + return false + } + return true + }, this) + + if (!match) { return input.error('Choice not matched') } + + return result +} + +// +// Encoding +// + +Node.prototype._createEncoderBuffer = function createEncoderBuffer (data) { + return new EncoderBuffer(data, this.reporter) +} + +Node.prototype._encode = function encode (data, reporter, parent) { + const state = this._baseState + if (state.default !== null && state.default === data) { return } + + const result = this._encodeValue(data, reporter, parent) + if (result === undefined) { return } + + if (this._skipDefault(result, reporter, parent)) { return } + + return result +} + +Node.prototype._encodeValue = function encode (data, reporter, parent) { + const state = this._baseState + + // Decode root node + if (state.parent === null) { return state.children[0]._encode(data, reporter || new Reporter()) } + + let result = null + + // Set reporter to share it with a child class + this.reporter = reporter + + // Check if data is there + if (state.optional && data === undefined) { + if (state.default !== null) { data = state.default } else { return } + } + + // Encode children first + let content = null + let primitive = false + if (state.any) { + // Anything that was given is translated to buffer + result = this._createEncoderBuffer(data) + } else if (state.choice) { + result = this._encodeChoice(data, reporter) + } else if (state.contains) { + content = this._getUse(state.contains, parent)._encode(data, reporter) + primitive = true + } else if (state.children) { + content = state.children.map(function (child) { + if (child._baseState.tag === 'null_') { return child._encode(null, reporter, data) } + + if (child._baseState.key === null) { return reporter.error('Child should have a key') } + const prevKey = reporter.enterKey(child._baseState.key) + + if (typeof data !== 'object') { return reporter.error('Child expected, but input is not object') } + + const res = child._encode(data[child._baseState.key], reporter, data) + reporter.leaveKey(prevKey) + + return res + }, this).filter(function (child) { + return child + }) + content = this._createEncoderBuffer(content) + } else { + if (state.tag === 'seqof' || state.tag === 'setof') { + if (!(state.args && state.args.length === 1)) { return reporter.error(`Too many args for: ${state.tag}`) } + + if (!Array.isArray(data)) { return reporter.error('seqof/setof, but data is not Array') } + + const child = this.clone() + child._baseState.implicit = null + content = this._createEncoderBuffer(data.map(function (item) { + const state = this._baseState + + return this._getUse(state.args[0], data)._encode(item, reporter) + }, child)) + } else if (state.use !== null) { + result = this._getUse(state.use, parent)._encode(data, reporter) + } else { + content = this._encodePrimitive(state.tag, data) + primitive = true + } + } + + // Encode data itself + if (!state.any && state.choice === null) { + const tag = state.implicit !== null ? state.implicit : state.tag + const cls = state.implicit === null ? 'universal' : 'context' + + if (tag === null) { + if (state.use === null) { reporter.error('Tag could be omitted only for .use()') } + } else { + if (state.use === null) { result = this._encodeComposite(tag, primitive, cls, content) } + } + } + + // Wrap in explicit + if (state.explicit !== null) { result = this._encodeComposite(state.explicit, false, 'context', result) } + + return result +} + +Node.prototype._encodeChoice = function encodeChoice (data, reporter) { + const state = this._baseState + + const node = state.choice[data.type] + if (!node) { + assert( + false, + `${data.type} not found in ${JSON.stringify(Object.keys(state.choice))}` + ) + } + return node._encode(data.value, reporter) +} + +Node.prototype._encodePrimitive = function encodePrimitive (tag, data) { + const state = this._baseState + + if (/str$/.test(tag)) { return this._encodeStr(data, tag) } else if (tag === 'objid' && state.args) { return this._encodeObjid(data, state.reverseArgs[0], state.args[1]) } else if (tag === 'objid') { return this._encodeObjid(data, null, null) } else if (tag === 'gentime' || tag === 'utctime') { return this._encodeTime(data, tag) } else if (tag === 'null_') { return this._encodeNull() } else if (tag === 'int' || tag === 'enum') { return this._encodeInt(data, state.args && state.reverseArgs[0]) } else if (tag === 'bool') { return this._encodeBool(data) } else if (tag === 'objDesc') { return this._encodeStr(data, tag) } else { throw new Error(`Unsupported tag: ${tag}`) } +} + +Node.prototype._isNumstr = function isNumstr (str) { + return /^[0-9 ]*$/.test(str) +} + +Node.prototype._isPrintstr = function isPrintstr (str) { + return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str) +} + +module.exports = Node + + +/***/ }), + +/***/ 99537: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +const { inherits } = __nccwpck_require__(73837) + +function Reporter (options) { + this._reporterState = { + obj: null, + path: [], + options: options || {}, + errors: [] + } +} + +Reporter.prototype.isError = function isError (obj) { + return obj instanceof ReporterError +} + +Reporter.prototype.save = function save () { + const state = this._reporterState + + return { obj: state.obj, pathLen: state.path.length } +} + +Reporter.prototype.restore = function restore (data) { + const state = this._reporterState + + state.obj = data.obj + state.path = state.path.slice(0, data.pathLen) +} + +Reporter.prototype.enterKey = function enterKey (key) { + return this._reporterState.path.push(key) +} + +Reporter.prototype.exitKey = function exitKey (index) { + const state = this._reporterState + + state.path = state.path.slice(0, index - 1) +} + +Reporter.prototype.leaveKey = function leaveKey (index, key, value) { + const state = this._reporterState + + this.exitKey(index) + if (state.obj !== null) { state.obj[key] = value } +} + +Reporter.prototype.path = function path () { + return this._reporterState.path.join('/') +} + +Reporter.prototype.enterObject = function enterObject () { + const state = this._reporterState + + const prev = state.obj + state.obj = {} + return prev +} + +Reporter.prototype.leaveObject = function leaveObject (prev) { + const state = this._reporterState + + const now = state.obj + state.obj = prev + return now +} + +Reporter.prototype.error = function error (msg) { + let err + const state = this._reporterState + + const inherited = msg instanceof ReporterError + if (inherited) { + err = msg + } else { + err = new ReporterError(state.path.map(function (elem) { + return `[${JSON.stringify(elem)}]` + }).join(''), msg.message || msg, msg.stack) + } + + if (!state.options.partial) { throw err } + + if (!inherited) { state.errors.push(err) } + + return err +} + +Reporter.prototype.wrapResult = function wrapResult (result) { + const state = this._reporterState + if (!state.options.partial) { return result } + + return { + result: this.isError(result) ? null : result, + errors: state.errors + } +} + +function ReporterError (path, msg) { + this.path = path + this.rethrow(msg) +} +inherits(ReporterError, Error) + +ReporterError.prototype.rethrow = function rethrow (msg) { + this.message = `${msg} at: ${this.path || '(shallow)'}` + if (Error.captureStackTrace) { Error.captureStackTrace(this, ReporterError) } + + if (!this.stack) { + try { + // IE only adds stack when thrown + throw new Error(this.message) + } catch (e) { + this.stack = e.stack + } + } + return this +} + +exports.Reporter = Reporter + + +/***/ }), + +/***/ 15140: +/***/ ((__unused_webpack_module, exports) => { + +// Helper +function reverse (map) { + const res = {} + + Object.keys(map).forEach(function (key) { + // Convert key to integer if it is stringified + if ((key | 0) == key) { key = key | 0 } // eslint-disable-line eqeqeq + + const value = map[key] + res[value] = key + }) + + return res +} + +exports.tagClass = { + 0: 'universal', + 1: 'application', + 2: 'context', + 3: 'private' +} +exports.tagClassByName = reverse(exports.tagClass) + +exports.tag = { + 0x00: 'end', + 0x01: 'bool', + 0x02: 'int', + 0x03: 'bitstr', + 0x04: 'octstr', + 0x05: 'null_', + 0x06: 'objid', + 0x07: 'objDesc', + 0x08: 'external', + 0x09: 'real', + 0x0a: 'enum', + 0x0b: 'embed', + 0x0c: 'utf8str', + 0x0d: 'relativeOid', + 0x10: 'seq', + 0x11: 'set', + 0x12: 'numstr', + 0x13: 'printstr', + 0x14: 't61str', + 0x15: 'videostr', + 0x16: 'ia5str', + 0x17: 'utctime', + 0x18: 'gentime', + 0x19: 'graphstr', + 0x1a: 'iso646str', + 0x1b: 'genstr', + 0x1c: 'unistr', + 0x1d: 'charstr', + 0x1e: 'bmpstr' +} +exports.tagByName = reverse(exports.tag) + + +/***/ }), + +/***/ 89886: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + der: __nccwpck_require__(15140) +} + + +/***/ }), + +/***/ 8509: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* global BigInt */ +const { inherits } = __nccwpck_require__(73837) + +const { DecoderBuffer } = __nccwpck_require__(82380) +const Node = __nccwpck_require__(98101) + +// Import DER constants +const der = __nccwpck_require__(15140) + +function DERDecoder (entity) { + this.enc = 'der' + this.name = entity.name + this.entity = entity + + // Construct base tree + this.tree = new DERNode() + this.tree._init(entity.body) +} + +DERDecoder.prototype.decode = function decode (data, options) { + if (!DecoderBuffer.isDecoderBuffer(data)) { + data = new DecoderBuffer(data, options) + } + + return this.tree._decode(data, options) +} + +// Tree methods + +function DERNode (parent) { + Node.call(this, 'der', parent) +} +inherits(DERNode, Node) + +DERNode.prototype._peekTag = function peekTag (buffer, tag, any) { + if (buffer.isEmpty()) { return false } + + const state = buffer.save() + const decodedTag = derDecodeTag(buffer, `Failed to peek tag: "${tag}"`) + if (buffer.isError(decodedTag)) { return decodedTag } + + buffer.restore(state) + + return decodedTag.tag === tag || decodedTag.tagStr === tag || (decodedTag.tagStr + 'of') === tag || any +} + +DERNode.prototype._decodeTag = function decodeTag (buffer, tag, any) { + const decodedTag = derDecodeTag(buffer, + `Failed to decode tag of "${tag}"`) + if (buffer.isError(decodedTag)) { return decodedTag } + + let len = derDecodeLen(buffer, + decodedTag.primitive, + `Failed to get length of "${tag}"`) + + // Failure + if (buffer.isError(len)) { return len } + + if (!any && + decodedTag.tag !== tag && + decodedTag.tagStr !== tag && + decodedTag.tagStr + 'of' !== tag) { + return buffer.error(`Failed to match tag: "${tag}"`) + } + + if (decodedTag.primitive || len !== null) { return buffer.skip(len, `Failed to match body of: "${tag}"`) } + + // Indefinite length... find END tag + const state = buffer.save() + const res = this._skipUntilEnd( + buffer, + `Failed to skip indefinite length body: "${this.tag}"`) + if (buffer.isError(res)) { return res } + + len = buffer.offset - state.offset + buffer.restore(state) + return buffer.skip(len, `Failed to match body of: "${tag}"`) +} + +DERNode.prototype._skipUntilEnd = function skipUntilEnd (buffer, fail) { + for (;;) { + const tag = derDecodeTag(buffer, fail) + if (buffer.isError(tag)) { return tag } + const len = derDecodeLen(buffer, tag.primitive, fail) + if (buffer.isError(len)) { return len } + + let res + if (tag.primitive || len !== null) { res = buffer.skip(len) } else { res = this._skipUntilEnd(buffer, fail) } + + // Failure + if (buffer.isError(res)) { return res } + + if (tag.tagStr === 'end') { break } + } +} + +DERNode.prototype._decodeList = function decodeList (buffer, tag, decoder, + options) { + const result = [] + while (!buffer.isEmpty()) { + const possibleEnd = this._peekTag(buffer, 'end') + if (buffer.isError(possibleEnd)) { return possibleEnd } + + const res = decoder.decode(buffer, 'der', options) + if (buffer.isError(res) && possibleEnd) { break } + result.push(res) + } + return result +} + +DERNode.prototype._decodeStr = function decodeStr (buffer, tag) { + if (tag === 'bitstr') { + const unused = buffer.readUInt8() + if (buffer.isError(unused)) { return unused } + return { unused: unused, data: buffer.raw() } + } else if (tag === 'bmpstr') { + const raw = buffer.raw() + if (raw.length % 2 === 1) { return buffer.error('Decoding of string type: bmpstr length mismatch') } + + let str = '' + for (let i = 0; i < raw.length / 2; i++) { + str += String.fromCharCode(raw.readUInt16BE(i * 2)) + } + return str + } else if (tag === 'numstr') { + const numstr = buffer.raw().toString('ascii') + if (!this._isNumstr(numstr)) { + return buffer.error('Decoding of string type: numstr unsupported characters') + } + return numstr + } else if (tag === 'octstr') { + return buffer.raw() + } else if (tag === 'objDesc') { + return buffer.raw() + } else if (tag === 'printstr') { + const printstr = buffer.raw().toString('ascii') + if (!this._isPrintstr(printstr)) { + return buffer.error('Decoding of string type: printstr unsupported characters') + } + return printstr + } else if (/str$/.test(tag)) { + return buffer.raw().toString() + } else { + return buffer.error(`Decoding of string type: ${tag} unsupported`) + } +} + +DERNode.prototype._decodeObjid = function decodeObjid (buffer, values, relative) { + let result + const identifiers = [] + let ident = 0 + let subident = 0 + while (!buffer.isEmpty()) { + subident = buffer.readUInt8() + ident <<= 7 + ident |= subident & 0x7f + if ((subident & 0x80) === 0) { + identifiers.push(ident) + ident = 0 + } + } + if (subident & 0x80) { identifiers.push(ident) } + + const first = (identifiers[0] / 40) | 0 + const second = identifiers[0] % 40 + + if (relative) { result = identifiers } else { result = [first, second].concat(identifiers.slice(1)) } + + if (values) { + let tmp = values[result.join(' ')] + if (tmp === undefined) { tmp = values[result.join('.')] } + if (tmp !== undefined) { result = tmp } + } + + return result +} + +DERNode.prototype._decodeTime = function decodeTime (buffer, tag) { + const str = buffer.raw().toString() + + let year + let mon + let day + let hour + let min + let sec + if (tag === 'gentime') { + year = str.slice(0, 4) | 0 + mon = str.slice(4, 6) | 0 + day = str.slice(6, 8) | 0 + hour = str.slice(8, 10) | 0 + min = str.slice(10, 12) | 0 + sec = str.slice(12, 14) | 0 + } else if (tag === 'utctime') { + year = str.slice(0, 2) | 0 + mon = str.slice(2, 4) | 0 + day = str.slice(4, 6) | 0 + hour = str.slice(6, 8) | 0 + min = str.slice(8, 10) | 0 + sec = str.slice(10, 12) | 0 + if (year < 70) { year = 2000 + year } else { year = 1900 + year } + } else { + return buffer.error(`Decoding ${tag} time is not supported yet`) + } + + return Date.UTC(year, mon - 1, day, hour, min, sec, 0) +} + +DERNode.prototype._decodeNull = function decodeNull () { + return null +} + +DERNode.prototype._decodeBool = function decodeBool (buffer) { + const res = buffer.readUInt8() + if (buffer.isError(res)) { return res } else { return res !== 0 } +} + +DERNode.prototype._decodeInt = function decodeInt (buffer, values) { + // Bigint, return as it is (assume big endian) + const raw = buffer.raw() + let res = BigInt(`0x${raw.toString('hex')}`) + + if (values) { + res = values[res.toString(10)] || res + } + + return res +} + +DERNode.prototype._use = function use (entity, obj) { + if (typeof entity === 'function') { entity = entity(obj) } + return entity._getDecoder('der').tree +} + +// Utility methods + +function derDecodeTag (buf, fail) { + let tag = buf.readUInt8(fail) + if (buf.isError(tag)) { return tag } + + const cls = der.tagClass[tag >> 6] + const primitive = (tag & 0x20) === 0 + + // Multi-octet tag - load + if ((tag & 0x1f) === 0x1f) { + let oct = tag + tag = 0 + while ((oct & 0x80) === 0x80) { + oct = buf.readUInt8(fail) + if (buf.isError(oct)) { return oct } + + tag <<= 7 + tag |= oct & 0x7f + } + } else { + tag &= 0x1f + } + const tagStr = der.tag[tag] + + return { + cls: cls, + primitive: primitive, + tag: tag, + tagStr: tagStr + } +} + +function derDecodeLen (buf, primitive, fail) { + let len = buf.readUInt8(fail) + if (buf.isError(len)) { return len } + + // Indefinite form + if (!primitive && len === 0x80) { return null } + + // Definite form + if ((len & 0x80) === 0) { + // Short form + return len + } + + // Long form + const num = len & 0x7f + if (num > 4) { return buf.error('length octect is too long') } + + len = 0 + for (let i = 0; i < num; i++) { + len <<= 8 + const j = buf.readUInt8(fail) + if (buf.isError(j)) { return j } + len |= j + } + + return len +} + +module.exports = DERDecoder + + +/***/ }), + +/***/ 59734: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + der: __nccwpck_require__(8509), + pem: __nccwpck_require__(86389) +} + + +/***/ }), + +/***/ 86389: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { inherits } = __nccwpck_require__(73837) + +const DERDecoder = __nccwpck_require__(8509) + +function PEMDecoder (entity) { + DERDecoder.call(this, entity) + this.enc = 'pem' +} +inherits(PEMDecoder, DERDecoder) + +PEMDecoder.prototype.decode = function decode (data, options) { + const lines = data.toString().split(/[\r\n]+/g) + + const label = options.label.toUpperCase() + + const re = /^-----(BEGIN|END) ([^-]+)-----$/ + let start = -1 + let end = -1 + for (let i = 0; i < lines.length; i++) { + const match = lines[i].match(re) + if (match === null) { continue } + + if (match[2] !== label) { continue } + + if (start === -1) { + if (match[1] !== 'BEGIN') { break } + start = i + } else { + if (match[1] !== 'END') { break } + end = i + break + } + } + if (start === -1 || end === -1) { throw new Error(`PEM section not found for: ${label}`) } + + const base64 = lines.slice(start + 1, end).join('') + // Remove excessive symbols + base64.replace(/[^a-z0-9+/=]+/gi, '') + + const input = Buffer.from(base64, 'base64') + return DERDecoder.prototype.decode.call(this, input, options) +} + +module.exports = PEMDecoder + + +/***/ }), + +/***/ 12928: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* global BigInt */ +const { inherits } = __nccwpck_require__(73837) + +const Node = __nccwpck_require__(98101) +const der = __nccwpck_require__(15140) + +function DEREncoder (entity) { + this.enc = 'der' + this.name = entity.name + this.entity = entity + + // Construct base tree + this.tree = new DERNode() + this.tree._init(entity.body) +} + +DEREncoder.prototype.encode = function encode (data, reporter) { + return this.tree._encode(data, reporter).join() +} + +// Tree methods + +function DERNode (parent) { + Node.call(this, 'der', parent) +} +inherits(DERNode, Node) + +DERNode.prototype._encodeComposite = function encodeComposite (tag, + primitive, + cls, + content) { + const encodedTag = encodeTag(tag, primitive, cls, this.reporter) + + // Short form + if (content.length < 0x80) { + const header = Buffer.alloc(2) + header[0] = encodedTag + header[1] = content.length + return this._createEncoderBuffer([header, content]) + } + + // Long form + // Count octets required to store length + let lenOctets = 1 + for (let i = content.length; i >= 0x100; i >>= 8) { lenOctets++ } + + const header = Buffer.alloc(1 + 1 + lenOctets) + header[0] = encodedTag + header[1] = 0x80 | lenOctets + + for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8) { header[i] = j & 0xff } + + return this._createEncoderBuffer([header, content]) +} + +DERNode.prototype._encodeStr = function encodeStr (str, tag) { + if (tag === 'bitstr') { + return this._createEncoderBuffer([str.unused | 0, str.data]) + } else if (tag === 'bmpstr') { + const buf = Buffer.alloc(str.length * 2) + for (let i = 0; i < str.length; i++) { + buf.writeUInt16BE(str.charCodeAt(i), i * 2) + } + return this._createEncoderBuffer(buf) + } else if (tag === 'numstr') { + if (!this._isNumstr(str)) { + return this.reporter.error('Encoding of string type: numstr supports only digits and space') + } + return this._createEncoderBuffer(str) + } else if (tag === 'printstr') { + if (!this._isPrintstr(str)) { + return this.reporter.error('Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark') + } + return this._createEncoderBuffer(str) + } else if (/str$/.test(tag)) { + return this._createEncoderBuffer(str) + } else if (tag === 'objDesc') { + return this._createEncoderBuffer(str) + } else { + return this.reporter.error(`Encoding of string type: ${tag} unsupported`) + } +} + +DERNode.prototype._encodeObjid = function encodeObjid (id, values, relative) { + if (typeof id === 'string') { + if (!values) { return this.reporter.error('string objid given, but no values map found') } + if (!Object.prototype.hasOwnProperty.call(values, id)) { return this.reporter.error('objid not found in values map') } + id = values[id].split(/[\s.]+/g) + for (let i = 0; i < id.length; i++) { id[i] |= 0 } + } else if (Array.isArray(id)) { + id = id.slice() + for (let i = 0; i < id.length; i++) { id[i] |= 0 } + } + + if (!Array.isArray(id)) { + return this.reporter.error(`objid() should be either array or string, got: ${JSON.stringify(id)}`) + } + + if (!relative) { + if (id[1] >= 40) { return this.reporter.error('Second objid identifier OOB') } + id.splice(0, 2, id[0] * 40 + id[1]) + } + + // Count number of octets + let size = 0 + for (let i = 0; i < id.length; i++) { + let ident = id[i] + for (size++; ident >= 0x80; ident >>= 7) { size++ } + } + + const objid = Buffer.alloc(size) + let offset = objid.length - 1 + for (let i = id.length - 1; i >= 0; i--) { + let ident = id[i] + objid[offset--] = ident & 0x7f + while ((ident >>= 7) > 0) { objid[offset--] = 0x80 | (ident & 0x7f) } + } + + return this._createEncoderBuffer(objid) +} + +function two (num) { + if (num < 10) { return `0${num}` } else { return num } +} + +DERNode.prototype._encodeTime = function encodeTime (time, tag) { + let str + const date = new Date(time) + + if (tag === 'gentime') { + str = [ + two(date.getUTCFullYear()), + two(date.getUTCMonth() + 1), + two(date.getUTCDate()), + two(date.getUTCHours()), + two(date.getUTCMinutes()), + two(date.getUTCSeconds()), + 'Z' + ].join('') + } else if (tag === 'utctime') { + str = [ + two(date.getUTCFullYear() % 100), + two(date.getUTCMonth() + 1), + two(date.getUTCDate()), + two(date.getUTCHours()), + two(date.getUTCMinutes()), + two(date.getUTCSeconds()), + 'Z' + ].join('') + } else { + this.reporter.error(`Encoding ${tag} time is not supported yet`) + } + + return this._encodeStr(str, 'octstr') +} + +DERNode.prototype._encodeNull = function encodeNull () { + return this._createEncoderBuffer('') +} + +function bnToBuf (bn) { + var hex = BigInt(bn).toString(16) + if (hex.length % 2) { hex = '0' + hex } + + var len = hex.length / 2 + var u8 = new Uint8Array(len) + + var i = 0 + var j = 0 + while (i < len) { + u8[i] = parseInt(hex.slice(j, j + 2), 16) + i += 1 + j += 2 + } + + return u8 +} + +DERNode.prototype._encodeInt = function encodeInt (num, values) { + if (typeof num === 'string') { + if (!values) { return this.reporter.error('String int or enum given, but no values map') } + if (!Object.prototype.hasOwnProperty.call(values, num)) { + return this.reporter.error(`Values map doesn't contain: ${JSON.stringify(num)}`) + } + num = values[num] + } + + if (typeof num === 'bigint') { + const numArray = [...bnToBuf(num)] + if (numArray[0] & 0x80) { + numArray.unshift(0) + } + num = Buffer.from(numArray) + } + + if (Buffer.isBuffer(num)) { + let size = num.length + if (num.length === 0) { size++ } + + const out = Buffer.alloc(size) + num.copy(out) + if (num.length === 0) { out[0] = 0 } + return this._createEncoderBuffer(out) + } + + if (num < 0x80) { return this._createEncoderBuffer(num) } + + if (num < 0x100) { return this._createEncoderBuffer([0, num]) } + + let size = 1 + for (let i = num; i >= 0x100; i >>= 8) { size++ } + + const out = new Array(size) + for (let i = out.length - 1; i >= 0; i--) { + out[i] = num & 0xff + num >>= 8 + } + if (out[0] & 0x80) { + out.unshift(0) + } + + return this._createEncoderBuffer(Buffer.from(out)) +} + +DERNode.prototype._encodeBool = function encodeBool (value) { + return this._createEncoderBuffer(value ? 0xff : 0) +} + +DERNode.prototype._use = function use (entity, obj) { + if (typeof entity === 'function') { entity = entity(obj) } + return entity._getEncoder('der').tree +} + +DERNode.prototype._skipDefault = function skipDefault (dataBuffer, reporter, parent) { + const state = this._baseState + let i + if (state.default === null) { return false } + + const data = dataBuffer.join() + if (state.defaultBuffer === undefined) { state.defaultBuffer = this._encodeValue(state.default, reporter, parent).join() } + + if (data.length !== state.defaultBuffer.length) { return false } + + for (i = 0; i < data.length; i++) { + if (data[i] !== state.defaultBuffer[i]) { return false } + } + + return true +} + +// Utility methods + +function encodeTag (tag, primitive, cls, reporter) { + let res + + if (tag === 'seqof') { tag = 'seq' } else if (tag === 'setof') { tag = 'set' } + + if (Object.prototype.hasOwnProperty.call(der.tagByName, tag)) { res = der.tagByName[tag] } else if (typeof tag === 'number' && (tag | 0) === tag) { res = tag } else { return reporter.error(`Unknown tag: ${tag}`) } + + if (res >= 0x1f) { return reporter.error('Multi-octet tag encoding unsupported') } + + if (!primitive) { res |= 0x20 } + + res |= (der.tagClassByName[cls || 'universal'] << 6) + + return res +} + +module.exports = DEREncoder + + +/***/ }), + +/***/ 48574: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + der: __nccwpck_require__(12928), + pem: __nccwpck_require__(36985) +} + + +/***/ }), + +/***/ 36985: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { inherits } = __nccwpck_require__(73837) + +const DEREncoder = __nccwpck_require__(12928) + +function PEMEncoder (entity) { + DEREncoder.call(this, entity) + this.enc = 'pem' +} +inherits(PEMEncoder, DEREncoder) + +PEMEncoder.prototype.encode = function encode (data, options) { + const buf = DEREncoder.prototype.encode.call(this, data) + + const p = buf.toString('base64') + const out = [`-----BEGIN ${options.label}-----`] + for (let i = 0; i < p.length; i += 64) { out.push(p.slice(i, i + 64)) } + out.push(`-----END ${options.label}-----`) + return out.join('\n') +} + +module.exports = PEMEncoder + + +/***/ }), + +/***/ 59966: +/***/ ((module, exports) => { + +"use strict"; + +/// +/// +/// +Object.defineProperty(exports, "__esModule", ({ value: true })); +const typedArrayTypeNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; +function isTypedArrayName(name) { + return typedArrayTypeNames.includes(name); +} +const objectTypeNames = [ + 'Function', + 'Generator', + 'AsyncGenerator', + 'GeneratorFunction', + 'AsyncGeneratorFunction', + 'AsyncFunction', + 'Observable', + 'Array', + 'Buffer', + 'Object', + 'RegExp', + 'Date', + 'Error', + 'Map', + 'Set', + 'WeakMap', + 'WeakSet', + 'ArrayBuffer', + 'SharedArrayBuffer', + 'DataView', + 'Promise', + 'URL', + 'FormData', + 'URLSearchParams', + 'HTMLElement', + ...typedArrayTypeNames +]; +function isObjectTypeName(name) { + return objectTypeNames.includes(name); +} +const primitiveTypeNames = [ + 'null', + 'undefined', + 'string', + 'number', + 'bigint', + 'boolean', + 'symbol' +]; +function isPrimitiveTypeName(name) { + return primitiveTypeNames.includes(name); +} +// eslint-disable-next-line @typescript-eslint/ban-types +function isOfType(type) { + return (value) => typeof value === type; +} +const { toString } = Object.prototype; +const getObjectType = (value) => { + const objectTypeName = toString.call(value).slice(8, -1); + if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) { + return 'HTMLElement'; + } + if (isObjectTypeName(objectTypeName)) { + return objectTypeName; + } + return undefined; +}; +const isObjectOfType = (type) => (value) => getObjectType(value) === type; +function is(value) { + if (value === null) { + return 'null'; + } + switch (typeof value) { + case 'undefined': + return 'undefined'; + case 'string': + return 'string'; + case 'number': + return 'number'; + case 'boolean': + return 'boolean'; + case 'function': + return 'Function'; + case 'bigint': + return 'bigint'; + case 'symbol': + return 'symbol'; + default: + } + if (is.observable(value)) { + return 'Observable'; + } + if (is.array(value)) { + return 'Array'; + } + if (is.buffer(value)) { + return 'Buffer'; + } + const tagType = getObjectType(value); + if (tagType) { + return tagType; + } + if (value instanceof String || value instanceof Boolean || value instanceof Number) { + throw new TypeError('Please don\'t use object wrappers for primitive types'); + } + return 'Object'; +} +is.undefined = isOfType('undefined'); +is.string = isOfType('string'); +const isNumberType = isOfType('number'); +is.number = (value) => isNumberType(value) && !is.nan(value); +is.bigint = isOfType('bigint'); +// eslint-disable-next-line @typescript-eslint/ban-types +is.function_ = isOfType('function'); +is.null_ = (value) => value === null; +is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); +is.boolean = (value) => value === true || value === false; +is.symbol = isOfType('symbol'); +is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value)); +is.array = (value, assertion) => { + if (!Array.isArray(value)) { + return false; + } + if (!is.function_(assertion)) { + return true; + } + return value.every(assertion); +}; +is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; }; +is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); +is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value)); +is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); }; +is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); }; +is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); +is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw); +is.nativePromise = (value) => isObjectOfType('Promise')(value); +const hasPromiseAPI = (value) => { + var _a, _b; + return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) && + is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch); +}; +is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); +is.generatorFunction = isObjectOfType('GeneratorFunction'); +is.asyncGeneratorFunction = (value) => getObjectType(value) === 'AsyncGeneratorFunction'; +is.asyncFunction = (value) => getObjectType(value) === 'AsyncFunction'; +// eslint-disable-next-line no-prototype-builtins, @typescript-eslint/ban-types +is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype'); +is.regExp = isObjectOfType('RegExp'); +is.date = isObjectOfType('Date'); +is.error = isObjectOfType('Error'); +is.map = (value) => isObjectOfType('Map')(value); +is.set = (value) => isObjectOfType('Set')(value); +is.weakMap = (value) => isObjectOfType('WeakMap')(value); +is.weakSet = (value) => isObjectOfType('WeakSet')(value); +is.int8Array = isObjectOfType('Int8Array'); +is.uint8Array = isObjectOfType('Uint8Array'); +is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray'); +is.int16Array = isObjectOfType('Int16Array'); +is.uint16Array = isObjectOfType('Uint16Array'); +is.int32Array = isObjectOfType('Int32Array'); +is.uint32Array = isObjectOfType('Uint32Array'); +is.float32Array = isObjectOfType('Float32Array'); +is.float64Array = isObjectOfType('Float64Array'); +is.bigInt64Array = isObjectOfType('BigInt64Array'); +is.bigUint64Array = isObjectOfType('BigUint64Array'); +is.arrayBuffer = isObjectOfType('ArrayBuffer'); +is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer'); +is.dataView = isObjectOfType('DataView'); +is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype; +is.urlInstance = (value) => isObjectOfType('URL')(value); +is.urlString = (value) => { + if (!is.string(value)) { + return false; + } + try { + new URL(value); // eslint-disable-line no-new + return true; + } + catch (_a) { + return false; + } +}; +// TODO: Use the `not` operator with a type guard here when it's available. +// Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);` +is.truthy = (value) => Boolean(value); +// Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);` +is.falsy = (value) => !value; +is.nan = (value) => Number.isNaN(value); +is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value); +is.integer = (value) => Number.isInteger(value); +is.safeInteger = (value) => Number.isSafeInteger(value); +is.plainObject = (value) => { + // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js + if (toString.call(value) !== '[object Object]') { + return false; + } + const prototype = Object.getPrototypeOf(value); + return prototype === null || prototype === Object.getPrototypeOf({}); +}; +is.typedArray = (value) => isTypedArrayName(getObjectType(value)); +const isValidLength = (value) => is.safeInteger(value) && value >= 0; +is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); +is.inRange = (value, range) => { + if (is.number(range)) { + return value >= Math.min(0, range) && value <= Math.max(range, 0); + } + if (is.array(range) && range.length === 2) { + return value >= Math.min(...range) && value <= Math.max(...range); + } + throw new TypeError(`Invalid range: ${JSON.stringify(range)}`); +}; +const NODE_TYPE_ELEMENT = 1; +const DOM_PROPERTIES_TO_CHECK = [ + 'innerHTML', + 'ownerDocument', + 'style', + 'attributes', + 'nodeValue' +]; +is.domElement = (value) => { + return is.object(value) && + value.nodeType === NODE_TYPE_ELEMENT && + is.string(value.nodeName) && + !is.plainObject(value) && + DOM_PROPERTIES_TO_CHECK.every(property => property in value); +}; +is.observable = (value) => { + var _a, _b, _c, _d; + if (!value) { + return false; + } + // eslint-disable-next-line no-use-extend-native/no-use-extend-native + if (value === ((_b = (_a = value)[Symbol.observable]) === null || _b === void 0 ? void 0 : _b.call(_a))) { + return true; + } + if (value === ((_d = (_c = value)['@@observable']) === null || _d === void 0 ? void 0 : _d.call(_c))) { + return true; + } + return false; +}; +is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value); +is.infinite = (value) => value === Infinity || value === -Infinity; +const isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder; +is.evenInteger = isAbsoluteMod2(0); +is.oddInteger = isAbsoluteMod2(1); +is.emptyArray = (value) => is.array(value) && value.length === 0; +is.nonEmptyArray = (value) => is.array(value) && value.length > 0; +is.emptyString = (value) => is.string(value) && value.length === 0; +// TODO: Use `not ''` when the `not` operator is available. +is.nonEmptyString = (value) => is.string(value) && value.length > 0; +const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value); +is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value); +is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0; +// TODO: Use `not` operator here to remove `Map` and `Set` from type guard: +// - https://github.com/Microsoft/TypeScript/pull/29317 +is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0; +is.emptySet = (value) => is.set(value) && value.size === 0; +is.nonEmptySet = (value) => is.set(value) && value.size > 0; +is.emptyMap = (value) => is.map(value) && value.size === 0; +is.nonEmptyMap = (value) => is.map(value) && value.size > 0; +// `PropertyKey` is any value that can be used as an object key (string, number, or symbol) +is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value); +is.formData = (value) => isObjectOfType('FormData')(value); +is.urlSearchParams = (value) => isObjectOfType('URLSearchParams')(value); +const predicateOnArray = (method, predicate, values) => { + if (!is.function_(predicate)) { + throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`); + } + if (values.length === 0) { + throw new TypeError('Invalid number of values'); + } + return method.call(values, predicate); +}; +is.any = (predicate, ...values) => { + const predicates = is.array(predicate) ? predicate : [predicate]; + return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values)); +}; +is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values); +const assertType = (condition, description, value, options = {}) => { + if (!condition) { + const { multipleValues } = options; + const valuesMessage = multipleValues ? + `received values of types ${[ + ...new Set(value.map(singleValue => `\`${is(singleValue)}\``)) + ].join(', ')}` : + `received value of type \`${is(value)}\``; + throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`); + } +}; +exports.assert = { + // Unknowns. + undefined: (value) => assertType(is.undefined(value), 'undefined', value), + string: (value) => assertType(is.string(value), 'string', value), + number: (value) => assertType(is.number(value), 'number', value), + bigint: (value) => assertType(is.bigint(value), 'bigint', value), + // eslint-disable-next-line @typescript-eslint/ban-types + function_: (value) => assertType(is.function_(value), 'Function', value), + null_: (value) => assertType(is.null_(value), 'null', value), + class_: (value) => assertType(is.class_(value), "Class" /* class_ */, value), + boolean: (value) => assertType(is.boolean(value), 'boolean', value), + symbol: (value) => assertType(is.symbol(value), 'symbol', value), + numericString: (value) => assertType(is.numericString(value), "string with a number" /* numericString */, value), + array: (value, assertion) => { + const assert = assertType; + assert(is.array(value), 'Array', value); + if (assertion) { + value.forEach(assertion); + } + }, + buffer: (value) => assertType(is.buffer(value), 'Buffer', value), + nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" /* nullOrUndefined */, value), + object: (value) => assertType(is.object(value), 'Object', value), + iterable: (value) => assertType(is.iterable(value), "Iterable" /* iterable */, value), + asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable" /* asyncIterable */, value), + generator: (value) => assertType(is.generator(value), 'Generator', value), + asyncGenerator: (value) => assertType(is.asyncGenerator(value), 'AsyncGenerator', value), + nativePromise: (value) => assertType(is.nativePromise(value), "native Promise" /* nativePromise */, value), + promise: (value) => assertType(is.promise(value), 'Promise', value), + generatorFunction: (value) => assertType(is.generatorFunction(value), 'GeneratorFunction', value), + asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), 'AsyncGeneratorFunction', value), + // eslint-disable-next-line @typescript-eslint/ban-types + asyncFunction: (value) => assertType(is.asyncFunction(value), 'AsyncFunction', value), + // eslint-disable-next-line @typescript-eslint/ban-types + boundFunction: (value) => assertType(is.boundFunction(value), 'Function', value), + regExp: (value) => assertType(is.regExp(value), 'RegExp', value), + date: (value) => assertType(is.date(value), 'Date', value), + error: (value) => assertType(is.error(value), 'Error', value), + map: (value) => assertType(is.map(value), 'Map', value), + set: (value) => assertType(is.set(value), 'Set', value), + weakMap: (value) => assertType(is.weakMap(value), 'WeakMap', value), + weakSet: (value) => assertType(is.weakSet(value), 'WeakSet', value), + int8Array: (value) => assertType(is.int8Array(value), 'Int8Array', value), + uint8Array: (value) => assertType(is.uint8Array(value), 'Uint8Array', value), + uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), 'Uint8ClampedArray', value), + int16Array: (value) => assertType(is.int16Array(value), 'Int16Array', value), + uint16Array: (value) => assertType(is.uint16Array(value), 'Uint16Array', value), + int32Array: (value) => assertType(is.int32Array(value), 'Int32Array', value), + uint32Array: (value) => assertType(is.uint32Array(value), 'Uint32Array', value), + float32Array: (value) => assertType(is.float32Array(value), 'Float32Array', value), + float64Array: (value) => assertType(is.float64Array(value), 'Float64Array', value), + bigInt64Array: (value) => assertType(is.bigInt64Array(value), 'BigInt64Array', value), + bigUint64Array: (value) => assertType(is.bigUint64Array(value), 'BigUint64Array', value), + arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value), + sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value), + dataView: (value) => assertType(is.dataView(value), 'DataView', value), + urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value), + urlString: (value) => assertType(is.urlString(value), "string with a URL" /* urlString */, value), + truthy: (value) => assertType(is.truthy(value), "truthy" /* truthy */, value), + falsy: (value) => assertType(is.falsy(value), "falsy" /* falsy */, value), + nan: (value) => assertType(is.nan(value), "NaN" /* nan */, value), + primitive: (value) => assertType(is.primitive(value), "primitive" /* primitive */, value), + integer: (value) => assertType(is.integer(value), "integer" /* integer */, value), + safeInteger: (value) => assertType(is.safeInteger(value), "integer" /* safeInteger */, value), + plainObject: (value) => assertType(is.plainObject(value), "plain object" /* plainObject */, value), + typedArray: (value) => assertType(is.typedArray(value), "TypedArray" /* typedArray */, value), + arrayLike: (value) => assertType(is.arrayLike(value), "array-like" /* arrayLike */, value), + domElement: (value) => assertType(is.domElement(value), "HTMLElement" /* domElement */, value), + observable: (value) => assertType(is.observable(value), 'Observable', value), + nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream" /* nodeStream */, value), + infinite: (value) => assertType(is.infinite(value), "infinite number" /* infinite */, value), + emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* emptyArray */, value), + nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* nonEmptyArray */, value), + emptyString: (value) => assertType(is.emptyString(value), "empty string" /* emptyString */, value), + nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value), + emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* emptyStringOrWhitespace */, value), + emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* emptyObject */, value), + nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* nonEmptyObject */, value), + emptySet: (value) => assertType(is.emptySet(value), "empty set" /* emptySet */, value), + nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* nonEmptySet */, value), + emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* emptyMap */, value), + nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* nonEmptyMap */, value), + propertyKey: (value) => assertType(is.propertyKey(value), 'PropertyKey', value), + formData: (value) => assertType(is.formData(value), 'FormData', value), + urlSearchParams: (value) => assertType(is.urlSearchParams(value), 'URLSearchParams', value), + // Numbers. + evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* evenInteger */, value), + oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* oddInteger */, value), + // Two arguments. + directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* directInstanceOf */, instance), + inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* inRange */, value), + // Variadic functions. + any: (predicate, ...values) => { + return assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values, { multipleValues: true }); + }, + all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values, { multipleValues: true }) +}; +// Some few keywords are reserved, but we'll populate them for Node.js users +// See https://github.com/Microsoft/TypeScript/issues/2536 +Object.defineProperties(is, { + class: { + value: is.class_ + }, + function: { + value: is.function_ + }, + null: { + value: is.null_ + } +}); +Object.defineProperties(exports.assert, { + class: { + value: exports.assert.class_ + }, + function: { + value: exports.assert.function_ + }, + null: { + value: exports.assert.null_ + } +}); +exports["default"] = is; +// For CommonJS default export support +module.exports = is; +module.exports["default"] = is; +module.exports.assert = exports.assert; + + +/***/ }), + +/***/ 45978: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const defer_to_connect_1 = __nccwpck_require__(72098); +const util_1 = __nccwpck_require__(73837); +const nodejsMajorVersion = Number(process.versions.node.split('.')[0]); +const timer = (request) => { + if (request.timings) { + return request.timings; + } + const timings = { + start: Date.now(), + socket: undefined, + lookup: undefined, + connect: undefined, + secureConnect: undefined, + upload: undefined, + response: undefined, + end: undefined, + error: undefined, + abort: undefined, + phases: { + wait: undefined, + dns: undefined, + tcp: undefined, + tls: undefined, + request: undefined, + firstByte: undefined, + download: undefined, + total: undefined + } + }; + request.timings = timings; + const handleError = (origin) => { + const emit = origin.emit.bind(origin); + origin.emit = (event, ...args) => { + // Catches the `error` event + if (event === 'error') { + timings.error = Date.now(); + timings.phases.total = timings.error - timings.start; + origin.emit = emit; + } + // Saves the original behavior + return emit(event, ...args); + }; + }; + handleError(request); + const onAbort = () => { + timings.abort = Date.now(); + // Let the `end` response event be responsible for setting the total phase, + // unless the Node.js major version is >= 13. + if (!timings.response || nodejsMajorVersion >= 13) { + timings.phases.total = Date.now() - timings.start; + } + }; + request.prependOnceListener('abort', onAbort); + const onSocket = (socket) => { + timings.socket = Date.now(); + timings.phases.wait = timings.socket - timings.start; + if (util_1.types.isProxy(socket)) { + return; + } + const lookupListener = () => { + timings.lookup = Date.now(); + timings.phases.dns = timings.lookup - timings.socket; + }; + socket.prependOnceListener('lookup', lookupListener); + defer_to_connect_1.default(socket, { + connect: () => { + timings.connect = Date.now(); + if (timings.lookup === undefined) { + socket.removeListener('lookup', lookupListener); + timings.lookup = timings.connect; + timings.phases.dns = timings.lookup - timings.socket; + } + timings.phases.tcp = timings.connect - timings.lookup; + // This callback is called before flushing any data, + // so we don't need to set `timings.phases.request` here. + }, + secureConnect: () => { + timings.secureConnect = Date.now(); + timings.phases.tls = timings.secureConnect - timings.connect; + } + }); + }; + if (request.socket) { + onSocket(request.socket); + } + else { + request.prependOnceListener('socket', onSocket); + } + const onUpload = () => { + var _a; + timings.upload = Date.now(); + timings.phases.request = timings.upload - ((_a = timings.secureConnect) !== null && _a !== void 0 ? _a : timings.connect); + }; + const writableFinished = () => { + if (typeof request.writableFinished === 'boolean') { + return request.writableFinished; + } + // Node.js doesn't have `request.writableFinished` property + return request.finished && request.outputSize === 0 && (!request.socket || request.socket.writableLength === 0); + }; + if (writableFinished()) { + onUpload(); + } + else { + request.prependOnceListener('finish', onUpload); + } + request.prependOnceListener('response', (response) => { + timings.response = Date.now(); + timings.phases.firstByte = timings.response - timings.upload; + response.timings = timings; + handleError(response); + response.prependOnceListener('end', () => { + timings.end = Date.now(); + timings.phases.download = timings.end - timings.response; + timings.phases.total = timings.end - timings.start; + }); + response.prependOnceListener('aborted', onAbort); + }); + return timings; +}; +exports["default"] = timer; +// For CommonJS default export support +module.exports = timer; +module.exports["default"] = timer; + + +/***/ }), + +/***/ 19655: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const indentString = __nccwpck_require__(1761); +const cleanStack = __nccwpck_require__(40779); + +const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); + +class AggregateError extends Error { + constructor(errors) { + if (!Array.isArray(errors)) { + throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); + } + + errors = [...errors].map(error => { + if (error instanceof Error) { + return error; + } + + if (error !== null && typeof error === 'object') { + // Handle plain error objects with message property and/or possibly other metadata + return Object.assign(new Error(error.message), error); + } + + return new Error(error); + }); + + let message = errors + .map(error => { + // The `stack` property is not standardized, so we can't assume it exists + return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error); + }) + .join('\n'); + message = '\n' + indentString(message, 4); + super(message); + + this.name = 'AggregateError'; + + Object.defineProperty(this, '_errors', {value: errors}); + } + + * [Symbol.iterator]() { + for (const error of this._errors) { + yield error; + } + } +} + +module.exports = AggregateError; + + +/***/ }), + +/***/ 99318: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var compileSchema = __nccwpck_require__(66773) + , resolve = __nccwpck_require__(80891) + , Cache = __nccwpck_require__(19203) + , SchemaObject = __nccwpck_require__(20382) + , stableStringify = __nccwpck_require__(61308) + , formats = __nccwpck_require__(60536) + , rules = __nccwpck_require__(13583) + , $dataMetaSchema = __nccwpck_require__(23764) + , util = __nccwpck_require__(12763); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = __nccwpck_require__(1075); +var customKeyword = __nccwpck_require__(10915); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; +Ajv.prototype.validateKeyword = customKeyword.validate; + +var errorClasses = __nccwpck_require__(88226); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i { + +"use strict"; + + + +var Cache = module.exports = function Cache() { + this._cache = {}; +}; + + +Cache.prototype.put = function Cache_put(key, value) { + this._cache[key] = value; +}; + + +Cache.prototype.get = function Cache_get(key) { + return this._cache[key]; +}; + + +Cache.prototype.del = function Cache_del(key) { + delete this._cache[key]; +}; + + +Cache.prototype.clear = function Cache_clear() { + this._cache = {}; +}; + + +/***/ }), + +/***/ 1075: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var MissingRefError = (__nccwpck_require__(88226).MissingRef); + +module.exports = compileAsync; + + +/** + * Creates validating function for passed schema with asynchronous loading of missing schemas. + * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped + * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function. + * @return {Promise} promise that resolves with a validating function. + */ +function compileAsync(schema, meta, callback) { + /* eslint no-shadow: 0 */ + /* global Promise */ + /* jshint validthis: true */ + var self = this; + if (typeof this._opts.loadSchema != 'function') + throw new Error('options.loadSchema should be a function'); + + if (typeof meta == 'function') { + callback = meta; + meta = undefined; + } + + var p = loadMetaSchemaOf(schema).then(function () { + var schemaObj = self._addSchema(schema, undefined, meta); + return schemaObj.validate || _compileAsync(schemaObj); + }); + + if (callback) { + p.then( + function(v) { callback(null, v); }, + callback + ); + } + + return p; + + + function loadMetaSchemaOf(sch) { + var $schema = sch.$schema; + return $schema && !self.getSchema($schema) + ? compileAsync.call(self, { $ref: $schema }, true) + : Promise.resolve(); + } + + + function _compileAsync(schemaObj) { + try { return self._compile(schemaObj); } + catch(e) { + if (e instanceof MissingRefError) return loadMissingSchema(e); + throw e; + } + + + function loadMissingSchema(e) { + var ref = e.missingSchema; + if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'); + + var schemaPromise = self._loadingSchemas[ref]; + if (!schemaPromise) { + schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref); + schemaPromise.then(removePromise, removePromise); + } + + return schemaPromise.then(function (sch) { + if (!added(ref)) { + return loadMetaSchemaOf(sch).then(function () { + if (!added(ref)) self.addSchema(sch, ref, undefined, meta); + }); + } + }).then(function() { + return _compileAsync(schemaObj); + }); + + function removePromise() { + delete self._loadingSchemas[ref]; + } + + function added(ref) { + return self._refs[ref] || self._schemas[ref]; + } + } + } +} + + +/***/ }), + +/***/ 88226: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var resolve = __nccwpck_require__(80891); + +module.exports = { + Validation: errorSubclass(ValidationError), + MissingRef: errorSubclass(MissingRefError) +}; + + +function ValidationError(errors) { + this.message = 'validation failed'; + this.errors = errors; + this.ajv = this.validation = true; +} + + +MissingRefError.message = function (baseId, ref) { + return 'can\'t resolve reference ' + ref + ' from id ' + baseId; +}; + + +function MissingRefError(baseId, ref, message) { + this.message = message || MissingRefError.message(baseId, ref); + this.missingRef = resolve.url(baseId, ref); + this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); +} + + +function errorSubclass(Subclass) { + Subclass.prototype = Object.create(Error.prototype); + Subclass.prototype.constructor = Subclass; + return Subclass; +} + + +/***/ }), + +/***/ 60536: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var util = __nccwpck_require__(12763); + +var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; +var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31]; +var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; +var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; +var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; +var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; +// uri-template: https://tools.ietf.org/html/rfc6570 +var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} + + +/***/ }), + +/***/ 66773: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var resolve = __nccwpck_require__(80891) + , util = __nccwpck_require__(12763) + , errorClasses = __nccwpck_require__(88226) + , stableStringify = __nccwpck_require__(61308); + +var validateGenerator = __nccwpck_require__(66906); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = __nccwpck_require__(15784); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); + + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i { + +"use strict"; + + +var URI = __nccwpck_require__(92778) + , equal = __nccwpck_require__(15784) + , util = __nccwpck_require__(12763) + , SchemaObject = __nccwpck_require__(20382) + , traverse = __nccwpck_require__(21263); + +module.exports = resolve; + +resolve.normalizeId = normalizeId; +resolve.fullPath = getFullPath; +resolve.url = resolveUrl; +resolve.ids = resolveIds; +resolve.inlineRef = inlineRef; +resolve.schema = resolveSchema; + +/** + * [resolve and compile the references ($ref)] + * @this Ajv + * @param {Function} compile reference to schema compilation funciton (localCompile) + * @param {Object} root object with information about the root schema for the current schema + * @param {String} ref reference to resolve + * @return {Object|Function} schema object (if the schema can be inlined) or validation function + */ +function resolve(compile, root, ref) { + /* jshint validthis: true */ + var refVal = this._refs[ref]; + if (typeof refVal == 'string') { + if (this._refs[refVal]) refVal = this._refs[refVal]; + else return resolve.call(this, compile, root, refVal); + } + + refVal = refVal || this._schemas[ref]; + if (refVal instanceof SchemaObject) { + return inlineRef(refVal.schema, this._opts.inlineRefs) + ? refVal.schema + : refVal.validate || this._compile(refVal); + } + + var res = resolveSchema.call(this, root, ref); + var schema, v, baseId; + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + + if (schema instanceof SchemaObject) { + v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId); + } else if (schema !== undefined) { + v = inlineRef(schema, this._opts.inlineRefs) + ? schema + : compile.call(this, schema, root, undefined, baseId); + } + + return v; +} + + +/** + * Resolve schema, its root and baseId + * @this Ajv + * @param {Object} root root object with properties schema, refVal, refs + * @param {String} ref reference to resolve + * @return {Object} object with properties schema, root, baseId + */ +function resolveSchema(root, ref) { + /* jshint validthis: true */ + var p = URI.parse(ref) + , refPath = _getFullPath(p) + , baseId = getFullPath(this._getId(root.schema)); + if (Object.keys(root.schema).length === 0 || refPath !== baseId) { + var id = normalizeId(refPath); + var refVal = this._refs[id]; + if (typeof refVal == 'string') { + return resolveRecursive.call(this, root, refVal, p); + } else if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + root = refVal; + } else { + refVal = this._schemas[id]; + if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + if (id == normalizeId(ref)) + return { schema: refVal, root: root, baseId: baseId }; + root = refVal; + } else { + return; + } + } + if (!root.schema) return; + baseId = getFullPath(this._getId(root.schema)); + } + return getJsonPointer.call(this, p, baseId, root.schema, root); +} + + +/* @this Ajv */ +function resolveRecursive(root, ref, parsedRef) { + /* jshint validthis: true */ + var res = resolveSchema.call(this, root, ref); + if (res) { + var schema = res.schema; + var baseId = res.baseId; + root = res.root; + var id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + return getJsonPointer.call(this, parsedRef, baseId, schema, root); + } +} + + +var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']); +/* @this Ajv */ +function getJsonPointer(parsedRef, baseId, schema, root) { + /* jshint validthis: true */ + parsedRef.fragment = parsedRef.fragment || ''; + if (parsedRef.fragment.slice(0,1) != '/') return; + var parts = parsedRef.fragment.split('/'); + + for (var i = 1; i < parts.length; i++) { + var part = parts[i]; + if (part) { + part = util.unescapeFragment(part); + schema = schema[part]; + if (schema === undefined) break; + var id; + if (!PREVENT_SCOPE_CHANGE[part]) { + id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + if (schema.$ref) { + var $ref = resolveUrl(baseId, schema.$ref); + var res = resolveSchema.call(this, root, $ref); + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + } + } + } + } + if (schema !== undefined && schema !== root.schema) + return { schema: schema, root: root, baseId: baseId }; +} + + +var SIMPLE_INLINED = util.toHash([ + 'type', 'format', 'pattern', + 'maxLength', 'minLength', + 'maxProperties', 'minProperties', + 'maxItems', 'minItems', + 'maximum', 'minimum', + 'uniqueItems', 'multipleOf', + 'required', 'enum' +]); +function inlineRef(schema, limit) { + if (limit === false) return false; + if (limit === undefined || limit === true) return checkNoRef(schema); + else if (limit) return countKeys(schema) <= limit; +} + + +function checkNoRef(schema) { + var item; + if (Array.isArray(schema)) { + for (var i=0; i { + +"use strict"; + + +var ruleModules = __nccwpck_require__(43032) + , toHash = (__nccwpck_require__(12763).toHash); + +module.exports = function rules() { + var RULES = [ + { type: 'number', + rules: [ { 'maximum': ['exclusiveMaximum'] }, + { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] }, + { type: 'string', + rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] }, + { type: 'array', + rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] }, + { type: 'object', + rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames', + { 'properties': ['additionalProperties', 'patternProperties'] } ] }, + { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] } + ]; + + var ALL = [ 'type', '$comment' ]; + var KEYWORDS = [ + '$schema', '$id', 'id', '$data', '$async', 'title', + 'description', 'default', 'definitions', + 'examples', 'readOnly', 'writeOnly', + 'contentMediaType', 'contentEncoding', + 'additionalItems', 'then', 'else' + ]; + var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ]; + RULES.all = toHash(ALL); + RULES.types = toHash(TYPES); + + RULES.forEach(function (group) { + group.rules = group.rules.map(function (keyword) { + var implKeywords; + if (typeof keyword == 'object') { + var key = Object.keys(keyword)[0]; + implKeywords = keyword[key]; + keyword = key; + implKeywords.forEach(function (k) { + ALL.push(k); + RULES.all[k] = true; + }); + } + ALL.push(keyword); + var rule = RULES.all[keyword] = { + keyword: keyword, + code: ruleModules[keyword], + implements: implKeywords + }; + return rule; + }); + + RULES.all.$comment = { + keyword: '$comment', + code: ruleModules.$comment + }; + + if (group.type) RULES.types[group.type] = group; + }); + + RULES.keywords = toHash(ALL.concat(KEYWORDS)); + RULES.custom = {}; + + return RULES; +}; + + +/***/ }), + +/***/ 20382: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var util = __nccwpck_require__(12763); + +module.exports = SchemaObject; + +function SchemaObject(obj) { + util.copy(obj, this); +} + + +/***/ }), + +/***/ 51832: +/***/ ((module) => { + +"use strict"; + + +// https://mathiasbynens.be/notes/javascript-encoding +// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode +module.exports = function ucs2length(str) { + var length = 0 + , len = str.length + , pos = 0 + , value; + while (pos < len) { + length++; + value = str.charCodeAt(pos++); + if (value >= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + + +/***/ }), + +/***/ 12763: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: __nccwpck_require__(15784), + ucs2length: __nccwpck_require__(51832), + varOccurences: varOccurences, + varReplace: varReplace, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, strictNumbers, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data, strictNumbers) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i { + +"use strict"; + + +var KEYWORDS = [ + 'multipleOf', + 'maximum', + 'exclusiveMaximum', + 'minimum', + 'exclusiveMinimum', + 'maxLength', + 'minLength', + 'pattern', + 'additionalItems', + 'maxItems', + 'minItems', + 'uniqueItems', + 'maxProperties', + 'minProperties', + 'required', + 'additionalProperties', + 'enum', + 'format', + 'const' +]; + +module.exports = function (metaSchema, keywordsJsonPointers) { + for (var i=0; i { + +"use strict"; + + +var metaSchema = __nccwpck_require__(6680); + +module.exports = { + $id: 'https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js', + definitions: { + simpleTypes: metaSchema.definitions.simpleTypes + }, + type: 'object', + dependencies: { + schema: ['validate'], + $data: ['validate'], + statements: ['inline'], + valid: {not: {required: ['macro']}} + }, + properties: { + type: metaSchema.properties.type, + schema: {type: 'boolean'}, + statements: {type: 'boolean'}, + dependencies: { + type: 'array', + items: {type: 'string'} + }, + metaSchema: {type: 'object'}, + modifying: {type: 'boolean'}, + valid: {type: 'boolean'}, + $data: {type: 'boolean'}, + async: {type: 'boolean'}, + errors: { + anyOf: [ + {type: 'boolean'}, + {const: 'full'} + ] + } + } +}; + + +/***/ }), + +/***/ 10161: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate__limit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 67845: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 76015: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 55919: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 96548: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + return out; +} + + +/***/ }), + +/***/ 80253: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), + +/***/ 62302: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} + + +/***/ }), + +/***/ 71442: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 94022: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + + +/***/ }), + +/***/ 62881: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' { + +"use strict"; + +module.exports = function generate_dependencies(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $schemaDeps = {}, + $propertyDeps = {}, + $ownProperties = it.opts.ownProperties; + for ($property in $schema) { + if ($property == '__proto__') continue; + var $sch = $schema[$property]; + var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; + $deps[$property] = $sch; + } + out += 'var ' + ($errs) + ' = errors;'; + var $currentErrorPath = it.errorPath; + out += 'var missing' + ($lvl) + ';'; + for (var $property in $propertyDeps) { + $deps = $propertyDeps[$property]; + if ($deps.length) { + out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + if ($breakOnError) { + out += ' && ( '; + var arr1 = $deps; + if (arr1) { + var $propertyKey, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $propertyKey = arr1[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ')) { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + out += ' ) { '; + var arr2 = $deps; + if (arr2) { + var $propertyKey, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $propertyKey = arr2[i2 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + out += ' } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + } + it.errorPath = $currentErrorPath; + var $currentBaseId = $it.baseId; + for (var $property in $schemaDeps) { + var $sch = $schemaDeps[$property]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + + +/***/ }), + +/***/ 65872: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 96743: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 85740: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), + +/***/ 43032: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': __nccwpck_require__(56812), + allOf: __nccwpck_require__(96548), + anyOf: __nccwpck_require__(80253), + '$comment': __nccwpck_require__(62302), + const: __nccwpck_require__(71442), + contains: __nccwpck_require__(94022), + dependencies: __nccwpck_require__(71708), + 'enum': __nccwpck_require__(65872), + format: __nccwpck_require__(96743), + 'if': __nccwpck_require__(85740), + items: __nccwpck_require__(44438), + maximum: __nccwpck_require__(10161), + minimum: __nccwpck_require__(10161), + maxItems: __nccwpck_require__(67845), + minItems: __nccwpck_require__(67845), + maxLength: __nccwpck_require__(76015), + minLength: __nccwpck_require__(76015), + maxProperties: __nccwpck_require__(55919), + minProperties: __nccwpck_require__(55919), + multipleOf: __nccwpck_require__(3158), + not: __nccwpck_require__(30318), + oneOf: __nccwpck_require__(65451), + pattern: __nccwpck_require__(69339), + properties: __nccwpck_require__(5054), + propertyNames: __nccwpck_require__(79841), + required: __nccwpck_require__(49800), + uniqueItems: __nccwpck_require__(73159), + validate: __nccwpck_require__(66906) +}; + + +/***/ }), + +/***/ 44438: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + + +/***/ }), + +/***/ 3158: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 30318: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + + +/***/ }), + +/***/ 65451: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + + +/***/ }), + +/***/ 69339: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 5054: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}).filter(notProto), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties).filter(notProto), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { + return p !== '__proto__'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + + +/***/ }), + +/***/ 79841: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' { + +"use strict"; + +module.exports = function generate_ref(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $async, $refCode; + if ($schema == '#' || $schema == '#/') { + if (it.isRoot) { + $async = it.async; + $refCode = 'validate'; + } else { + $async = it.root.schema.$async === true; + $refCode = 'root.refVal[0]'; + } + } else { + var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); + if ($refVal === undefined) { + var $message = it.MissingRefError.message(it.baseId, $schema); + if (it.opts.missingRefs == 'fail') { + it.logger.error($message); + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' '; + } + if (it.opts.verbose) { + out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + if ($breakOnError) { + out += ' if (false) { '; + } + } else if (it.opts.missingRefs == 'ignore') { + it.logger.warn($message); + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + throw new it.MissingRefError(it.baseId, $schema, $message); + } + } else if ($refVal.inline) { + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $refVal.schema; + $it.schemaPath = ''; + $it.errSchemaPath = $schema; + var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); + out += ' ' + ($code) + ' '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + } + } else { + $async = $refVal.$async === true || (it.async && $refVal.$async !== false); + $refCode = $refVal.code; + } + } + if ($refCode) { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + if (it.opts.passContext) { + out += ' ' + ($refCode) + '.call(this, '; + } else { + out += ' ' + ($refCode) + '( '; + } + out += ' ' + ($data) + ', (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) '; + var __callValidate = out; + out = $$outStack.pop(); + if ($async) { + if (!it.async) throw new Error('async schema referenced by sync schema'); + if ($breakOnError) { + out += ' var ' + ($valid) + '; '; + } + out += ' try { await ' + (__callValidate) + '; '; + if ($breakOnError) { + out += ' ' + ($valid) + ' = true; '; + } + out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; '; + if ($breakOnError) { + out += ' ' + ($valid) + ' = false; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($valid) + ') { '; + } + } else { + out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } '; + if ($breakOnError) { + out += ' else { '; + } + } + } + return out; +} + + +/***/ }), + +/***/ 49800: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_required(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $vSchema = 'schema' + $lvl; + if (!$isData) { + if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) { + var $required = []; + var arr1 = $schema; + if (arr1) { + var $property, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $property = arr1[i1 += 1]; + var $propertySch = it.schema.properties[$property]; + if (!($propertySch && (it.opts.strictKeywords ? (typeof $propertySch == 'object' && Object.keys($propertySch).length > 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + + +/***/ }), + +/***/ 73159: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), + +/***/ 66906: +/***/ ((module) => { + +"use strict"; + +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [""]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; + } + out += ' if (' + ($coerced) + ' !== undefined) ; '; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($type == 'string') { + out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' else { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } if (' + ($coerced) + ' !== undefined) { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + + +/***/ }), + +/***/ 10915: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = __nccwpck_require__(62881); +var definitionSchema = __nccwpck_require__(87189); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i { + +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + + newInvalidAsn1Error: function (msg) { + var e = new Error(); + e.name = 'InvalidAsn1Error'; + e.message = msg || ''; + return e; + } + +}; + + +/***/ }), + +/***/ 16961: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2011 Mark Cavage All rights reserved. + +var errors = __nccwpck_require__(90455); +var types = __nccwpck_require__(71531); + +var Reader = __nccwpck_require__(83961); +var Writer = __nccwpck_require__(11042); + + +// --- Exports + +module.exports = { + + Reader: Reader, + + Writer: Writer + +}; + +for (var t in types) { + if (types.hasOwnProperty(t)) + module.exports[t] = types[t]; +} +for (var e in errors) { + if (errors.hasOwnProperty(e)) + module.exports[e] = errors[e]; +} + + +/***/ }), + +/***/ 83961: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = __nccwpck_require__(39491); +var Buffer = (__nccwpck_require__(77556).Buffer); + +var ASN1 = __nccwpck_require__(71531); +var errors = __nccwpck_require__(90455); + + +// --- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + + + +// --- API + +function Reader(data) { + if (!data || !Buffer.isBuffer(data)) + throw new TypeError('data must be a node Buffer'); + + this._buf = data; + this._size = data.length; + + // These hold the "current" state + this._len = 0; + this._offset = 0; +} + +Object.defineProperty(Reader.prototype, 'length', { + enumerable: true, + get: function () { return (this._len); } +}); + +Object.defineProperty(Reader.prototype, 'offset', { + enumerable: true, + get: function () { return (this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'remain', { + get: function () { return (this._size - this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'buffer', { + get: function () { return (this._buf.slice(this._offset)); } +}); + + +/** + * Reads a single byte and advances offset; you can pass in `true` to make this + * a "peek" operation (i.e., get the byte, but don't advance the offset). + * + * @param {Boolean} peek true means don't move offset. + * @return {Number} the next byte, null if not enough data. + */ +Reader.prototype.readByte = function (peek) { + if (this._size - this._offset < 1) + return null; + + var b = this._buf[this._offset] & 0xff; + + if (!peek) + this._offset += 1; + + return b; +}; + + +Reader.prototype.peek = function () { + return this.readByte(true); +}; + + +/** + * Reads a (potentially) variable length off the BER buffer. This call is + * not really meant to be called directly, as callers have to manipulate + * the internal buffer afterwards. + * + * As a result of this call, you can call `Reader.length`, until the + * next thing called that does a readLength. + * + * @return {Number} the amount of offset to advance the buffer. + * @throws {InvalidAsn1Error} on bad ASN.1 + */ +Reader.prototype.readLength = function (offset) { + if (offset === undefined) + offset = this._offset; + + if (offset >= this._size) + return null; + + var lenB = this._buf[offset++] & 0xff; + if (lenB === null) + return null; + + if ((lenB & 0x80) === 0x80) { + lenB &= 0x7f; + + if (lenB === 0) + throw newInvalidAsn1Error('Indefinite length not supported'); + + if (lenB > 4) + throw newInvalidAsn1Error('encoding too long'); + + if (this._size - offset < lenB) + return null; + + this._len = 0; + for (var i = 0; i < lenB; i++) + this._len = (this._len << 8) + (this._buf[offset++] & 0xff); + + } else { + // Wasn't a variable length + this._len = lenB; + } + + return offset; +}; + + +/** + * Parses the next sequence in this BER buffer. + * + * To get the length of the sequence, call `Reader.length`. + * + * @return {Number} the sequence's tag. + */ +Reader.prototype.readSequence = function (tag) { + var seq = this.peek(); + if (seq === null) + return null; + if (tag !== undefined && tag !== seq) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + seq.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + this._offset = o; + return seq; +}; + + +Reader.prototype.readInt = function () { + return this._readTag(ASN1.Integer); +}; + + +Reader.prototype.readBoolean = function () { + return (this._readTag(ASN1.Boolean) === 0 ? false : true); +}; + + +Reader.prototype.readEnumeration = function () { + return this._readTag(ASN1.Enumeration); +}; + + +Reader.prototype.readString = function (tag, retbuf) { + if (!tag) + tag = ASN1.OctetString; + + var b = this.peek(); + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + + if (o === null) + return null; + + if (this.length > this._size - o) + return null; + + this._offset = o; + + if (this.length === 0) + return retbuf ? Buffer.alloc(0) : ''; + + var str = this._buf.slice(this._offset, this._offset + this.length); + this._offset += this.length; + + return retbuf ? str : str.toString('utf8'); +}; + +Reader.prototype.readOID = function (tag) { + if (!tag) + tag = ASN1.OID; + + var b = this.readString(tag, true); + if (b === null) + return null; + + var values = []; + var value = 0; + + for (var i = 0; i < b.length; i++) { + var byte = b[i] & 0xff; + + value <<= 7; + value += byte & 0x7f; + if ((byte & 0x80) === 0) { + values.push(value); + value = 0; + } + } + + value = values.shift(); + values.unshift(value % 40); + values.unshift((value / 40) >> 0); + + return values.join('.'); +}; + + +Reader.prototype._readTag = function (tag) { + assert.ok(tag !== undefined); + + var b = this.peek(); + + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + if (this.length > 4) + throw newInvalidAsn1Error('Integer too long: ' + this.length); + + if (this.length > this._size - o) + return null; + this._offset = o; + + var fb = this._buf[this._offset]; + var value = 0; + + for (var i = 0; i < this.length; i++) { + value <<= 8; + value |= (this._buf[this._offset++] & 0xff); + } + + if ((fb & 0x80) === 0x80 && i !== 4) + value -= (1 << (i * 8)); + + return value >> 0; +}; + + + +// --- Exported API + +module.exports = Reader; + + +/***/ }), + +/***/ 71531: +/***/ ((module) => { + +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + EOC: 0, + Boolean: 1, + Integer: 2, + BitString: 3, + OctetString: 4, + Null: 5, + OID: 6, + ObjectDescriptor: 7, + External: 8, + Real: 9, // float + Enumeration: 10, + PDV: 11, + Utf8String: 12, + RelativeOID: 13, + Sequence: 16, + Set: 17, + NumericString: 18, + PrintableString: 19, + T61String: 20, + VideotexString: 21, + IA5String: 22, + UTCTime: 23, + GeneralizedTime: 24, + GraphicString: 25, + VisibleString: 26, + GeneralString: 28, + UniversalString: 29, + CharacterString: 30, + BMPString: 31, + Constructor: 32, + Context: 128 +}; + + +/***/ }), + +/***/ 11042: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = __nccwpck_require__(39491); +var Buffer = (__nccwpck_require__(77556).Buffer); +var ASN1 = __nccwpck_require__(71531); +var errors = __nccwpck_require__(90455); + + +// --- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + +var DEFAULT_OPTS = { + size: 1024, + growthFactor: 8 +}; + + +// --- Helpers + +function merge(from, to) { + assert.ok(from); + assert.equal(typeof (from), 'object'); + assert.ok(to); + assert.equal(typeof (to), 'object'); + + var keys = Object.getOwnPropertyNames(from); + keys.forEach(function (key) { + if (to[key]) + return; + + var value = Object.getOwnPropertyDescriptor(from, key); + Object.defineProperty(to, key, value); + }); + + return to; +} + + + +// --- API + +function Writer(options) { + options = merge(DEFAULT_OPTS, options || {}); + + this._buf = Buffer.alloc(options.size || 1024); + this._size = this._buf.length; + this._offset = 0; + this._options = options; + + // A list of offsets in the buffer where we need to insert + // sequence tag/len pairs. + this._seq = []; +} + +Object.defineProperty(Writer.prototype, 'buffer', { + get: function () { + if (this._seq.length) + throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); + + return (this._buf.slice(0, this._offset)); + } +}); + +Writer.prototype.writeByte = function (b) { + if (typeof (b) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(1); + this._buf[this._offset++] = b; +}; + + +Writer.prototype.writeInt = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Integer; + + var sz = 4; + + while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && + (sz > 1)) { + sz--; + i <<= 8; + } + + if (sz > 4) + throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); + + this._ensure(2 + sz); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = sz; + + while (sz-- > 0) { + this._buf[this._offset++] = ((i & 0xff000000) >>> 24); + i <<= 8; + } + +}; + + +Writer.prototype.writeNull = function () { + this.writeByte(ASN1.Null); + this.writeByte(0x00); +}; + + +Writer.prototype.writeEnumeration = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Enumeration; + + return this.writeInt(i, tag); +}; + + +Writer.prototype.writeBoolean = function (b, tag) { + if (typeof (b) !== 'boolean') + throw new TypeError('argument must be a Boolean'); + if (typeof (tag) !== 'number') + tag = ASN1.Boolean; + + this._ensure(3); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = 0x01; + this._buf[this._offset++] = b ? 0xff : 0x00; +}; + + +Writer.prototype.writeString = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); + if (typeof (tag) !== 'number') + tag = ASN1.OctetString; + + var len = Buffer.byteLength(s); + this.writeByte(tag); + this.writeLength(len); + if (len) { + this._ensure(len); + this._buf.write(s, this._offset); + this._offset += len; + } +}; + + +Writer.prototype.writeBuffer = function (buf, tag) { + if (typeof (tag) !== 'number') + throw new TypeError('tag must be a number'); + if (!Buffer.isBuffer(buf)) + throw new TypeError('argument must be a buffer'); + + this.writeByte(tag); + this.writeLength(buf.length); + this._ensure(buf.length); + buf.copy(this._buf, this._offset, 0, buf.length); + this._offset += buf.length; +}; + + +Writer.prototype.writeStringArray = function (strings) { + if ((!strings instanceof Array)) + throw new TypeError('argument must be an Array[String]'); + + var self = this; + strings.forEach(function (s) { + self.writeString(s); + }); +}; + +// This is really to solve DER cases, but whatever for now +Writer.prototype.writeOID = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string'); + if (typeof (tag) !== 'number') + tag = ASN1.OID; + + if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) + throw new Error('argument is not a valid OID string'); + + function encodeOctet(bytes, octet) { + if (octet < 128) { + bytes.push(octet); + } else if (octet < 16384) { + bytes.push((octet >>> 7) | 0x80); + bytes.push(octet & 0x7F); + } else if (octet < 2097152) { + bytes.push((octet >>> 14) | 0x80); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else if (octet < 268435456) { + bytes.push((octet >>> 21) | 0x80); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else { + bytes.push(((octet >>> 28) | 0x80) & 0xFF); + bytes.push(((octet >>> 21) | 0x80) & 0xFF); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } + } + + var tmp = s.split('.'); + var bytes = []; + bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); + tmp.slice(2).forEach(function (b) { + encodeOctet(bytes, parseInt(b, 10)); + }); + + var self = this; + this._ensure(2 + bytes.length); + this.writeByte(tag); + this.writeLength(bytes.length); + bytes.forEach(function (b) { + self.writeByte(b); + }); +}; + + +Writer.prototype.writeLength = function (len) { + if (typeof (len) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(4); + + if (len <= 0x7f) { + this._buf[this._offset++] = len; + } else if (len <= 0xff) { + this._buf[this._offset++] = 0x81; + this._buf[this._offset++] = len; + } else if (len <= 0xffff) { + this._buf[this._offset++] = 0x82; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else if (len <= 0xffffff) { + this._buf[this._offset++] = 0x83; + this._buf[this._offset++] = len >> 16; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else { + throw newInvalidAsn1Error('Length too long (> 4 bytes)'); + } +}; + +Writer.prototype.startSequence = function (tag) { + if (typeof (tag) !== 'number') + tag = ASN1.Sequence | ASN1.Constructor; + + this.writeByte(tag); + this._seq.push(this._offset); + this._ensure(3); + this._offset += 3; +}; + + +Writer.prototype.endSequence = function () { + var seq = this._seq.pop(); + var start = seq + 3; + var len = this._offset - start; + + if (len <= 0x7f) { + this._shift(start, len, -2); + this._buf[seq] = len; + } else if (len <= 0xff) { + this._shift(start, len, -1); + this._buf[seq] = 0x81; + this._buf[seq + 1] = len; + } else if (len <= 0xffff) { + this._buf[seq] = 0x82; + this._buf[seq + 1] = len >> 8; + this._buf[seq + 2] = len; + } else if (len <= 0xffffff) { + this._shift(start, len, 1); + this._buf[seq] = 0x83; + this._buf[seq + 1] = len >> 16; + this._buf[seq + 2] = len >> 8; + this._buf[seq + 3] = len; + } else { + throw newInvalidAsn1Error('Sequence too long'); + } +}; + + +Writer.prototype._shift = function (start, len, shift) { + assert.ok(start !== undefined); + assert.ok(len !== undefined); + assert.ok(shift); + + this._buf.copy(this._buf, start + shift, start, start + len); + this._offset += shift; +}; + +Writer.prototype._ensure = function (len) { + assert.ok(len); + + if (this._size - this._offset < len) { + var sz = this._size * this._options.growthFactor; + if (sz - this._offset < len) + sz += len; + + var buf = Buffer.alloc(sz); + + this._buf.copy(buf, 0, 0, this._offset); + this._buf = buf; + this._size = sz; + } +}; + + + +// --- Exported API + +module.exports = Writer; + + +/***/ }), + +/***/ 2: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2011 Mark Cavage All rights reserved. + +// If you have no idea what ASN.1 or BER is, see this: +// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc + +var Ber = __nccwpck_require__(16961); + + + +// --- Exported API + +module.exports = { + + Ber: Ber, + + BerReader: Ber.Reader, + + BerWriter: Ber.Writer + +}; + + +/***/ }), + +/***/ 41706: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright (c) 2012, Mark Cavage. All rights reserved. +// Copyright 2015 Joyent, Inc. + +var assert = __nccwpck_require__(39491); +var Stream = (__nccwpck_require__(12781).Stream); +var util = __nccwpck_require__(73837); + + +///--- Globals + +/* JSSTYLED */ +var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; + + +///--- Internal + +function _capitalize(str) { + return (str.charAt(0).toUpperCase() + str.slice(1)); +} + +function _toss(name, expected, oper, arg, actual) { + throw new assert.AssertionError({ + message: util.format('%s (%s) is required', name, expected), + actual: (actual === undefined) ? typeof (arg) : actual(arg), + expected: expected, + operator: oper || '===', + stackStartFunction: _toss.caller + }); +} + +function _getClass(arg) { + return (Object.prototype.toString.call(arg).slice(8, -1)); +} + +function noop() { + // Why even bother with asserts? +} + + +///--- Exports + +var types = { + bool: { + check: function (arg) { return typeof (arg) === 'boolean'; } + }, + func: { + check: function (arg) { return typeof (arg) === 'function'; } + }, + string: { + check: function (arg) { return typeof (arg) === 'string'; } + }, + object: { + check: function (arg) { + return typeof (arg) === 'object' && arg !== null; + } + }, + number: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg); + } + }, + finite: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); + } + }, + buffer: { + check: function (arg) { return Buffer.isBuffer(arg); }, + operator: 'Buffer.isBuffer' + }, + array: { + check: function (arg) { return Array.isArray(arg); }, + operator: 'Array.isArray' + }, + stream: { + check: function (arg) { return arg instanceof Stream; }, + operator: 'instanceof', + actual: _getClass + }, + date: { + check: function (arg) { return arg instanceof Date; }, + operator: 'instanceof', + actual: _getClass + }, + regexp: { + check: function (arg) { return arg instanceof RegExp; }, + operator: 'instanceof', + actual: _getClass + }, + uuid: { + check: function (arg) { + return typeof (arg) === 'string' && UUID_REGEXP.test(arg); + }, + operator: 'isUUID' + } +}; + +function _setExports(ndebug) { + var keys = Object.keys(types); + var out; + + /* re-export standard assert */ + if (process.env.NODE_NDEBUG) { + out = noop; + } else { + out = function (arg, msg) { + if (!arg) { + _toss(msg, 'true', arg); + } + }; + } + + /* standard checks */ + keys.forEach(function (k) { + if (ndebug) { + out[k] = noop; + return; + } + var type = types[k]; + out[k] = function (arg, msg) { + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* optional checks */ + keys.forEach(function (k) { + var name = 'optional' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* arrayOf checks */ + keys.forEach(function (k) { + var name = 'arrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* optionalArrayOf checks */ + keys.forEach(function (k) { + var name = 'optionalArrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* re-export built-in assertions */ + Object.keys(assert).forEach(function (k) { + if (k === 'AssertionError') { + out[k] = assert[k]; + return; + } + if (ndebug) { + out[k] = noop; + return; + } + out[k] = assert[k]; + }); + + /* export ourselves (for unit tests _only_) */ + out._setExports = _setExports; + + return out; +} + +module.exports = _setExports(process.env.NODE_NDEBUG); + + +/***/ }), + +/***/ 65261: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = +{ + parallel : __nccwpck_require__(86451), + serial : __nccwpck_require__(25854), + serialOrdered : __nccwpck_require__(412) +}; + + +/***/ }), + +/***/ 43392: +/***/ ((module) => { + +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} + + +/***/ }), + +/***/ 60251: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var defer = __nccwpck_require__(23963); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} + + +/***/ }), + +/***/ 23963: +/***/ ((module) => { + +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} + + +/***/ }), + +/***/ 94917: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var async = __nccwpck_require__(60251) + , abort = __nccwpck_require__(43392) + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} + + +/***/ }), + +/***/ 10945: +/***/ ((module) => { + +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} + + +/***/ }), + +/***/ 40010: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var abort = __nccwpck_require__(43392) + , async = __nccwpck_require__(60251) + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} + + +/***/ }), + +/***/ 86451: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var iterate = __nccwpck_require__(94917) + , initState = __nccwpck_require__(10945) + , terminator = __nccwpck_require__(40010) + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} + + +/***/ }), + +/***/ 25854: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var serialOrdered = __nccwpck_require__(412); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} + + +/***/ }), + +/***/ 412: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var iterate = __nccwpck_require__(94917) + , initState = __nccwpck_require__(10945) + , terminator = __nccwpck_require__(40010) + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} + + +/***/ }), + +/***/ 47557: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +/*! + * Copyright 2010 LearnBoost + * + * 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. + */ + +/** + * Module dependencies. + */ + +var crypto = __nccwpck_require__(6113) + , parse = (__nccwpck_require__(57310).parse) + ; + +/** + * Valid keys. + */ + +var keys = + [ 'acl' + , 'location' + , 'logging' + , 'notification' + , 'partNumber' + , 'policy' + , 'requestPayment' + , 'torrent' + , 'uploadId' + , 'uploads' + , 'versionId' + , 'versioning' + , 'versions' + , 'website' + ] + +/** + * Return an "Authorization" header value with the given `options` + * in the form of "AWS :" + * + * @param {Object} options + * @return {String} + * @api private + */ + +function authorization (options) { + return 'AWS ' + options.key + ':' + sign(options) +} + +module.exports = authorization +module.exports.authorization = authorization + +/** + * Simple HMAC-SHA1 Wrapper + * + * @param {Object} options + * @return {String} + * @api private + */ + +function hmacSha1 (options) { + return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') +} + +module.exports.hmacSha1 = hmacSha1 + +/** + * Create a base64 sha1 HMAC for `options`. + * + * @param {Object} options + * @return {String} + * @api private + */ + +function sign (options) { + options.message = stringToSign(options) + return hmacSha1(options) +} +module.exports.sign = sign + +/** + * Create a base64 sha1 HMAC for `options`. + * + * Specifically to be used with S3 presigned URLs + * + * @param {Object} options + * @return {String} + * @api private + */ + +function signQuery (options) { + options.message = queryStringToSign(options) + return hmacSha1(options) +} +module.exports.signQuery= signQuery + +/** + * Return a string for sign() with the given `options`. + * + * Spec: + * + * \n + * \n + * \n + * \n + * [headers\n] + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function stringToSign (options) { + var headers = options.amazonHeaders || '' + if (headers) headers += '\n' + var r = + [ options.verb + , options.md5 + , options.contentType + , options.date ? options.date.toUTCString() : '' + , headers + options.resource + ] + return r.join('\n') +} +module.exports.stringToSign = stringToSign + +/** + * Return a string for sign() with the given `options`, but is meant exclusively + * for S3 presigned URLs + * + * Spec: + * + * \n + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function queryStringToSign (options){ + return 'GET\n\n\n' + options.date + '\n' + options.resource +} +module.exports.queryStringToSign = queryStringToSign + +/** + * Perform the following: + * + * - ignore non-amazon headers + * - lowercase fields + * - sort lexicographically + * - trim whitespace between ":" + * - join with newline + * + * @param {Object} headers + * @return {String} + * @api private + */ + +function canonicalizeHeaders (headers) { + var buf = [] + , fields = Object.keys(headers) + ; + for (var i = 0, len = fields.length; i < len; ++i) { + var field = fields[i] + , val = headers[field] + , field = field.toLowerCase() + ; + if (0 !== field.indexOf('x-amz')) continue + buf.push(field + ':' + val) + } + return buf.sort().join('\n') +} +module.exports.canonicalizeHeaders = canonicalizeHeaders + +/** + * Perform the following: + * + * - ignore non sub-resources + * - sort lexicographically + * + * @param {String} resource + * @return {String} + * @api private + */ + +function canonicalizeResource (resource) { + var url = parse(resource, true) + , path = url.pathname + , buf = [] + ; + + Object.keys(url.query).forEach(function(key){ + if (!~keys.indexOf(key)) return + var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) + buf.push(key + val) + }) + + return path + (buf.length ? '?' + buf.sort().join('&') : '') +} +module.exports.canonicalizeResource = canonicalizeResource + + +/***/ }), + +/***/ 85132: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +var aws4 = exports, + url = __nccwpck_require__(57310), + querystring = __nccwpck_require__(63477), + crypto = __nccwpck_require__(6113), + lru = __nccwpck_require__(35031), + credentialsCache = lru(1000) + +// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html + +function hmac(key, string, encoding) { + return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) +} + +function hash(string, encoding) { + return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) +} + +// This function assumes the string has already been percent encoded +function encodeRfc3986(urlEncodedString) { + return urlEncodedString.replace(/[!'()*]/g, function(c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +function encodeRfc3986Full(str) { + return encodeRfc3986(encodeURIComponent(str)) +} + +// request: { path | body, [host], [method], [headers], [service], [region] } +// credentials: { accessKeyId, secretAccessKey, [sessionToken] } +function RequestSigner(request, credentials) { + + if (typeof request === 'string') request = url.parse(request) + + var headers = request.headers = (request.headers || {}), + hostParts = (!this.service || !this.region) && this.matchHost(request.hostname || request.host || headers.Host || headers.host) + + this.request = request + this.credentials = credentials || this.defaultCredentials() + + this.service = request.service || hostParts[0] || '' + this.region = request.region || hostParts[1] || 'us-east-1' + + // SES uses a different domain from the service name + if (this.service === 'email') this.service = 'ses' + + if (!request.method && request.body) + request.method = 'POST' + + if (!headers.Host && !headers.host) { + headers.Host = request.hostname || request.host || this.createHost() + + // If a port is specified explicitly, use it as is + if (request.port) + headers.Host += ':' + request.port + } + if (!request.hostname && !request.host) + request.hostname = headers.Host || headers.host + + this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' +} + +RequestSigner.prototype.matchHost = function(host) { + var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/) + var hostParts = (match || []).slice(1, 3) + + // ES's hostParts are sometimes the other way round, if the value that is expected + // to be region equals ‘es’ switch them back + // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com + if (hostParts[1] === 'es') + hostParts = hostParts.reverse() + + if (hostParts[1] == 's3') { + hostParts[0] = 's3' + hostParts[1] = 'us-east-1' + } else { + for (var i = 0; i < 2; i++) { + if (/^s3-/.test(hostParts[i])) { + hostParts[1] = hostParts[i].slice(3) + hostParts[0] = 's3' + break + } + } + } + + return hostParts +} + +// http://docs.aws.amazon.com/general/latest/gr/rande.html +RequestSigner.prototype.isSingleRegion = function() { + // Special case for S3 and SimpleDB in us-east-1 + if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true + + return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] + .indexOf(this.service) >= 0 +} + +RequestSigner.prototype.createHost = function() { + var region = this.isSingleRegion() ? '' : '.' + this.region, + subdomain = this.service === 'ses' ? 'email' : this.service + return subdomain + region + '.amazonaws.com' +} + +RequestSigner.prototype.prepareRequest = function() { + this.parsePath() + + var request = this.request, headers = request.headers, query + + if (request.signQuery) { + + this.parsedPath.query = query = this.parsedPath.query || {} + + if (this.credentials.sessionToken) + query['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !query['X-Amz-Expires']) + query['X-Amz-Expires'] = 86400 + + if (query['X-Amz-Date']) + this.datetime = query['X-Amz-Date'] + else + query['X-Amz-Date'] = this.getDateTime() + + query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' + query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() + query['X-Amz-SignedHeaders'] = this.signedHeaders() + + } else { + + if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { + if (request.body && !headers['Content-Type'] && !headers['content-type']) + headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' + + if (request.body && !headers['Content-Length'] && !headers['content-length']) + headers['Content-Length'] = Buffer.byteLength(request.body) + + if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) + headers['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) + headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') + + if (headers['X-Amz-Date'] || headers['x-amz-date']) + this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] + else + headers['X-Amz-Date'] = this.getDateTime() + } + + delete headers.Authorization + delete headers.authorization + } +} + +RequestSigner.prototype.sign = function() { + if (!this.parsedPath) this.prepareRequest() + + if (this.request.signQuery) { + this.parsedPath.query['X-Amz-Signature'] = this.signature() + } else { + this.request.headers.Authorization = this.authHeader() + } + + this.request.path = this.formatPath() + + return this.request +} + +RequestSigner.prototype.getDateTime = function() { + if (!this.datetime) { + var headers = this.request.headers, + date = new Date(headers.Date || headers.date || new Date) + + this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') + + // Remove the trailing 'Z' on the timestamp string for CodeCommit git access + if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) + } + return this.datetime +} + +RequestSigner.prototype.getDate = function() { + return this.getDateTime().substr(0, 8) +} + +RequestSigner.prototype.authHeader = function() { + return [ + 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), + 'SignedHeaders=' + this.signedHeaders(), + 'Signature=' + this.signature(), + ].join(', ') +} + +RequestSigner.prototype.signature = function() { + var date = this.getDate(), + cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), + kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) + if (!kCredentials) { + kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) + kRegion = hmac(kDate, this.region) + kService = hmac(kRegion, this.service) + kCredentials = hmac(kService, 'aws4_request') + credentialsCache.set(cacheKey, kCredentials) + } + return hmac(kCredentials, this.stringToSign(), 'hex') +} + +RequestSigner.prototype.stringToSign = function() { + return [ + 'AWS4-HMAC-SHA256', + this.getDateTime(), + this.credentialString(), + hash(this.canonicalString(), 'hex'), + ].join('\n') +} + +RequestSigner.prototype.canonicalString = function() { + if (!this.parsedPath) this.prepareRequest() + + var pathStr = this.parsedPath.path, + query = this.parsedPath.query, + headers = this.request.headers, + queryStr = '', + normalizePath = this.service !== 's3', + decodePath = this.service === 's3' || this.request.doNotEncodePath, + decodeSlashesInPath = this.service === 's3', + firstValOnly = this.service === 's3', + bodyHash + + if (this.service === 's3' && this.request.signQuery) { + bodyHash = 'UNSIGNED-PAYLOAD' + } else if (this.isCodeCommitGit) { + bodyHash = '' + } else { + bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || + hash(this.request.body || '', 'hex') + } + + if (query) { + var reducedQuery = Object.keys(query).reduce(function(obj, key) { + if (!key) return obj + obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] : + (firstValOnly ? query[key][0] : query[key]) + return obj + }, {}) + var encodedQueryPieces = [] + Object.keys(reducedQuery).sort().forEach(function(key) { + if (!Array.isArray(reducedQuery[key])) { + encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key])) + } else { + reducedQuery[key].map(encodeRfc3986Full).sort() + .forEach(function(val) { encodedQueryPieces.push(key + '=' + val) }) + } + }) + queryStr = encodedQueryPieces.join('&') + } + if (pathStr !== '/') { + if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') + pathStr = pathStr.split('/').reduce(function(path, piece) { + if (normalizePath && piece === '..') { + path.pop() + } else if (!normalizePath || piece !== '.') { + if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, ' ')) + path.push(encodeRfc3986Full(piece)) + } + return path + }, []).join('/') + if (pathStr[0] !== '/') pathStr = '/' + pathStr + if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') + } + + return [ + this.request.method || 'GET', + pathStr, + queryStr, + this.canonicalHeaders() + '\n', + this.signedHeaders(), + bodyHash, + ].join('\n') +} + +RequestSigner.prototype.canonicalHeaders = function() { + var headers = this.request.headers + function trimAll(header) { + return header.toString().trim().replace(/\s+/g, ' ') + } + return Object.keys(headers) + .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) + .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) + .join('\n') +} + +RequestSigner.prototype.signedHeaders = function() { + return Object.keys(this.request.headers) + .map(function(key) { return key.toLowerCase() }) + .sort() + .join(';') +} + +RequestSigner.prototype.credentialString = function() { + return [ + this.getDate(), + this.region, + this.service, + 'aws4_request', + ].join('/') +} + +RequestSigner.prototype.defaultCredentials = function() { + var env = process.env + return { + accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, + secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, + sessionToken: env.AWS_SESSION_TOKEN, + } +} + +RequestSigner.prototype.parsePath = function() { + var path = this.request.path || '/' + + // S3 doesn't always encode characters > 127 correctly and + // all services don't encode characters > 255 correctly + // So if there are non-reserved chars (and it's not already all % encoded), just encode them all + if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) { + path = encodeURI(decodeURI(path)) + } + + var queryIx = path.indexOf('?'), + query = null + + if (queryIx >= 0) { + query = querystring.parse(path.slice(queryIx + 1)) + path = path.slice(0, queryIx) + } + + this.parsedPath = { + path: path, + query: query, + } +} + +RequestSigner.prototype.formatPath = function() { + var path = this.parsedPath.path, + query = this.parsedPath.query + + if (!query) return path + + // Services don't support empty query string keys + if (query[''] != null) delete query[''] + + return path + '?' + encodeRfc3986(querystring.stringify(query)) +} + +aws4.RequestSigner = RequestSigner + +aws4.sign = function(request, credentials) { + return new RequestSigner(request, credentials).sign() +} + + +/***/ }), + +/***/ 35031: +/***/ ((module) => { + +module.exports = function(size) { + return new LruCache(size) +} + +function LruCache(size) { + this.capacity = size | 0 + this.map = Object.create(null) + this.list = new DoublyLinkedList() +} + +LruCache.prototype.get = function(key) { + var node = this.map[key] + if (node == null) return undefined + this.used(node) + return node.val +} + +LruCache.prototype.set = function(key, val) { + var node = this.map[key] + if (node != null) { + node.val = val + } else { + if (!this.capacity) this.prune() + if (!this.capacity) return false + node = new DoublyLinkedNode(key, val) + this.map[key] = node + this.capacity-- + } + this.used(node) + return true +} + +LruCache.prototype.used = function(node) { + this.list.moveToFront(node) +} + +LruCache.prototype.prune = function() { + var node = this.list.pop() + if (node != null) { + delete this.map[node.key] + this.capacity++ + } +} + + +function DoublyLinkedList() { + this.firstNode = null + this.lastNode = null +} + +DoublyLinkedList.prototype.moveToFront = function(node) { + if (this.firstNode == node) return + + this.remove(node) + + if (this.firstNode == null) { + this.firstNode = node + this.lastNode = node + node.prev = null + node.next = null + } else { + node.prev = null + node.next = this.firstNode + node.next.prev = node + this.firstNode = node + } +} + +DoublyLinkedList.prototype.pop = function() { + var lastNode = this.lastNode + if (lastNode != null) { + this.remove(lastNode) + } + return lastNode +} + +DoublyLinkedList.prototype.remove = function(node) { + if (this.firstNode == node) { + this.firstNode = node.next + } else if (node.prev != null) { + node.prev.next = node.next + } + if (this.lastNode == node) { + this.lastNode = node.prev + } else if (node.next != null) { + node.next.prev = node.prev + } +} + + +function DoublyLinkedNode(key, val) { + this.key = key + this.val = val + this.prev = null + this.next = null +} + + +/***/ }), + +/***/ 82522: +/***/ ((module) => { + +"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; +} + + +/***/ }), + +/***/ 77567: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var crypto_hash_sha512 = (__nccwpck_require__(59595).lowlevel.crypto_hash); + +/* + * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a + * result, it retains the original copyright and license. The two files are + * under slightly different (but compatible) licenses, and are here combined in + * one file. + * + * Credit for the actual porting work goes to: + * Devi Mandiri + */ + +/* + * The Blowfish portions are under the following license: + * + * Blowfish block cipher for OpenBSD + * Copyright 1997 Niels Provos + * All rights reserved. + * + * Implementation advice by David Mazieres . + * + * 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 AUTHOR 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. + */ + +/* + * The bcrypt_pbkdf portions are under the following license: + * + * Copyright (c) 2013 Ted Unangst + * + * Permission to use, copy, modify, and 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. + */ + +/* + * Performance improvements (Javascript-specific): + * + * Copyright 2016, Joyent Inc + * Author: Alex Wilson + * + * Permission to use, copy, modify, and 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. + */ + +// Ported from OpenBSD bcrypt_pbkdf.c v1.9 + +var BLF_J = 0; + +var Blowfish = function() { + this.S = [ + new Uint32Array([ + 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, + 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, + 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, + 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, + 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, + 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, + 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, + 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, + 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, + 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, + 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, + 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, + 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, + 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, + 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, + 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, + 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, + 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, + 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, + 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, + 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, + 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, + 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, + 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, + 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, + 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, + 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, + 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, + 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, + 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, + 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, + 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, + 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, + 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, + 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, + 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, + 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, + 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, + 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, + 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, + 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, + 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, + 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, + 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, + 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, + 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, + 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, + 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, + 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, + 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, + 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, + 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, + 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, + 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, + 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, + 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, + 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, + 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, + 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, + 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, + 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, + 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, + 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, + 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), + new Uint32Array([ + 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, + 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, + 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, + 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, + 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, + 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, + 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, + 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, + 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, + 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, + 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, + 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, + 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, + 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, + 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, + 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, + 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, + 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, + 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, + 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, + 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, + 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, + 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, + 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, + 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, + 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, + 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, + 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, + 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, + 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, + 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, + 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, + 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, + 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, + 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, + 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, + 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, + 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, + 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, + 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, + 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, + 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, + 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, + 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, + 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, + 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, + 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, + 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, + 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, + 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, + 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, + 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, + 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, + 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, + 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, + 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, + 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, + 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, + 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, + 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, + 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, + 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, + 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, + 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), + new Uint32Array([ + 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, + 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, + 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, + 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, + 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, + 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, + 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, + 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, + 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, + 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, + 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, + 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, + 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, + 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, + 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, + 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, + 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, + 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, + 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, + 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, + 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, + 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, + 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, + 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, + 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, + 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, + 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, + 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, + 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, + 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, + 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, + 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, + 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, + 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, + 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, + 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, + 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, + 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, + 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, + 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, + 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, + 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, + 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, + 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, + 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, + 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, + 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, + 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, + 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, + 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, + 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, + 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, + 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, + 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, + 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, + 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, + 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, + 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, + 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, + 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, + 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, + 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, + 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, + 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), + new Uint32Array([ + 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, + 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, + 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, + 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, + 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, + 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, + 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, + 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, + 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, + 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, + 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, + 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, + 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, + 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, + 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, + 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, + 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, + 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, + 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, + 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, + 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, + 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, + 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, + 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, + 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, + 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, + 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, + 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, + 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, + 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, + 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, + 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, + 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, + 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, + 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, + 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, + 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, + 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, + 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, + 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, + 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, + 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, + 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, + 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, + 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, + 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, + 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, + 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, + 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, + 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, + 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, + 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, + 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, + 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, + 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, + 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, + 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, + 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, + 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, + 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, + 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, + 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, + 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, + 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) + ]; + this.P = new Uint32Array([ + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, + 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, + 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, + 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, + 0x9216d5d9, 0x8979fb1b]); +}; + +function F(S, x8, i) { + return (((S[0][x8[i+3]] + + S[1][x8[i+2]]) ^ + S[2][x8[i+1]]) + + S[3][x8[i]]); +}; + +Blowfish.prototype.encipher = function(x, x8) { + if (x8 === undefined) { + x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + } + x[0] ^= this.P[0]; + for (var i = 1; i < 16; i += 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[17]; + x[1] = t; +}; + +Blowfish.prototype.decipher = function(x) { + var x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + x[0] ^= this.P[17]; + for (var i = 16; i > 0; i -= 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[0]; + x[1] = t; +}; + +function stream2word(data, databytes){ + var i, temp = 0; + for (i = 0; i < 4; i++, BLF_J++) { + if (BLF_J >= databytes) BLF_J = 0; + temp = (temp << 8) | data[BLF_J]; + } + return temp; +}; + +Blowfish.prototype.expand0state = function(key, keybytes) { + var d = new Uint32Array(2), i, k; + var d8 = new Uint8Array(d.buffer); + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + BLF_J = 0; + + for (i = 0; i < 18; i += 2) { + this.encipher(d, d8); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + this.encipher(d, d8); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } +}; + +Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { + var d = new Uint32Array(2), i, k; + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + + for (i = 0, BLF_J = 0; i < 18; i += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } + BLF_J = 0; +}; + +Blowfish.prototype.enc = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.encipher(data.subarray(i*2)); + } +}; + +Blowfish.prototype.dec = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.decipher(data.subarray(i*2)); + } +}; + +var BCRYPT_BLOCKS = 8, + BCRYPT_HASHSIZE = 32; + +function bcrypt_hash(sha2pass, sha2salt, out) { + var state = new Blowfish(), + cdata = new Uint32Array(BCRYPT_BLOCKS), i, + ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, + 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, + 105,116,101]); //"OxychromaticBlowfishSwatDynamite" + + state.expandstate(sha2salt, 64, sha2pass, 64); + for (i = 0; i < 64; i++) { + state.expand0state(sha2salt, 64); + state.expand0state(sha2pass, 64); + } + + for (i = 0; i < BCRYPT_BLOCKS; i++) + cdata[i] = stream2word(ciphertext, ciphertext.byteLength); + for (i = 0; i < 64; i++) + state.enc(cdata, cdata.byteLength / 8); + + for (i = 0; i < BCRYPT_BLOCKS; i++) { + out[4*i+3] = cdata[i] >>> 24; + out[4*i+2] = cdata[i] >>> 16; + out[4*i+1] = cdata[i] >>> 8; + out[4*i+0] = cdata[i]; + } +}; + +function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { + var sha2pass = new Uint8Array(64), + sha2salt = new Uint8Array(64), + out = new Uint8Array(BCRYPT_HASHSIZE), + tmpout = new Uint8Array(BCRYPT_HASHSIZE), + countsalt = new Uint8Array(saltlen+4), + i, j, amt, stride, dest, count, + origkeylen = keylen; + + if (rounds < 1) + return -1; + if (passlen === 0 || saltlen === 0 || keylen === 0 || + keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) + return -1; + + stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); + amt = Math.floor((keylen + stride - 1) / stride); + + for (i = 0; i < saltlen; i++) + countsalt[i] = salt[i]; + + crypto_hash_sha512(sha2pass, pass, passlen); + + for (count = 1; keylen > 0; count++) { + countsalt[saltlen+0] = count >>> 24; + countsalt[saltlen+1] = count >>> 16; + countsalt[saltlen+2] = count >>> 8; + countsalt[saltlen+3] = count; + + crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (i = out.byteLength; i--;) + out[i] = tmpout[i]; + + for (i = 1; i < rounds; i++) { + crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (j = 0; j < out.byteLength; j++) + out[j] ^= tmpout[j]; + } + + amt = Math.min(amt, keylen); + for (i = 0; i < amt; i++) { + dest = i * stride + (count - 1); + if (dest >= origkeylen) + break; + key[dest] = out[i]; + } + keylen -= i; + } + + return 0; +}; + +module.exports = { + BLOCKS: BCRYPT_BLOCKS, + HASHSIZE: BCRYPT_HASHSIZE, + hash: bcrypt_hash, + pbkdf: bcrypt_pbkdf +}; + + +/***/ }), + +/***/ 90308: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var concatMap = __nccwpck_require__(40388); +var balanced = __nccwpck_require__(82522); + +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; +} + + + +/***/ }), + +/***/ 38202: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright (C) 2011-2015 John Hewson +// +// 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. + +var stream = __nccwpck_require__(12781), + util = __nccwpck_require__(73837), + timers = __nccwpck_require__(39512); + +// convinience API +module.exports = function(readStream, options) { + return module.exports.createStream(readStream, options); +}; + +// basic API +module.exports.createStream = function(readStream, options) { + if (readStream) { + return createLineStream(readStream, options); + } else { + return new LineStream(options); + } +}; + +// deprecated API +module.exports.createLineStream = function(readStream) { + console.log('WARNING: byline#createLineStream is deprecated and will be removed soon'); + return createLineStream(readStream); +}; + +function createLineStream(readStream, options) { + if (!readStream) { + throw new Error('expected readStream'); + } + if (!readStream.readable) { + throw new Error('readStream must be readable'); + } + var ls = new LineStream(options); + readStream.pipe(ls); + return ls; +} + +// +// using the new node v0.10 "streams2" API +// + +module.exports.LineStream = LineStream; + +function LineStream(options) { + stream.Transform.call(this, options); + options = options || {}; + + // use objectMode to stop the output from being buffered + // which re-concatanates the lines, just without newlines. + this._readableState.objectMode = true; + this._lineBuffer = []; + this._keepEmptyLines = options.keepEmptyLines || false; + this._lastChunkEndedWithCR = false; + + // take the source's encoding if we don't have one + var self = this; + this.on('pipe', function(src) { + if (!self.encoding) { + // but we can't do this for old-style streams + if (src instanceof stream.Readable) { + self.encoding = src._readableState.encoding; + } + } + }); +} +util.inherits(LineStream, stream.Transform); + +LineStream.prototype._transform = function(chunk, encoding, done) { + // decode binary chunks as UTF-8 + encoding = encoding || 'utf8'; + + if (Buffer.isBuffer(chunk)) { + if (encoding == 'buffer') { + chunk = chunk.toString(); // utf8 + encoding = 'utf8'; + } + else { + chunk = chunk.toString(encoding); + } + } + this._chunkEncoding = encoding; + + // see: http://www.unicode.org/reports/tr18/#Line_Boundaries + var lines = chunk.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g); + + // don't split CRLF which spans chunks + if (this._lastChunkEndedWithCR && chunk[0] == '\n') { + lines.shift(); + } + + if (this._lineBuffer.length > 0) { + this._lineBuffer[this._lineBuffer.length - 1] += lines[0]; + lines.shift(); + } + + this._lastChunkEndedWithCR = chunk[chunk.length - 1] == '\r'; + this._lineBuffer = this._lineBuffer.concat(lines); + this._pushBuffer(encoding, 1, done); +}; + +LineStream.prototype._pushBuffer = function(encoding, keep, done) { + // always buffer the last (possibly partial) line + while (this._lineBuffer.length > keep) { + var line = this._lineBuffer.shift(); + // skip empty lines + if (this._keepEmptyLines || line.length > 0 ) { + if (!this.push(this._reencode(line, encoding))) { + // when the high-water mark is reached, defer pushes until the next tick + var self = this; + timers.setImmediate(function() { + self._pushBuffer(encoding, keep, done); + }); + return; + } + } + } + done(); +}; + +LineStream.prototype._flush = function(done) { + this._pushBuffer(this._chunkEncoding, 0, done); +}; + +// see Readable::push +LineStream.prototype._reencode = function(line, chunkEncoding) { + if (this.encoding && this.encoding != chunkEncoding) { + return new Buffer(line, chunkEncoding).toString(this.encoding); + } + else if (this.encoding) { + // this should be the most common case, i.e. we're using an encoded source stream + return line; + } + else { + return new Buffer(line, chunkEncoding); + } +}; + + +/***/ }), + +/***/ 92702: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const { + V4MAPPED, + ADDRCONFIG, + ALL, + promises: { + Resolver: AsyncResolver + }, + lookup: dnsLookup +} = __nccwpck_require__(17578); +const {promisify} = __nccwpck_require__(73837); +const os = __nccwpck_require__(22037); + +const kCacheableLookupCreateConnection = Symbol('cacheableLookupCreateConnection'); +const kCacheableLookupInstance = Symbol('cacheableLookupInstance'); +const kExpires = Symbol('expires'); + +const supportsALL = typeof ALL === 'number'; + +const verifyAgent = agent => { + if (!(agent && typeof agent.createConnection === 'function')) { + throw new Error('Expected an Agent instance as the first argument'); + } +}; + +const map4to6 = entries => { + for (const entry of entries) { + if (entry.family === 6) { + continue; + } + + entry.address = `::ffff:${entry.address}`; + entry.family = 6; + } +}; + +const getIfaceInfo = () => { + let has4 = false; + let has6 = false; + + for (const device of Object.values(os.networkInterfaces())) { + for (const iface of device) { + if (iface.internal) { + continue; + } + + if (iface.family === 'IPv6') { + has6 = true; + } else { + has4 = true; + } + + if (has4 && has6) { + return {has4, has6}; + } + } + } + + return {has4, has6}; +}; + +const isIterable = map => { + return Symbol.iterator in map; +}; + +const ttl = {ttl: true}; +const all = {all: true}; + +class CacheableLookup { + constructor({ + cache = new Map(), + maxTtl = Infinity, + fallbackDuration = 3600, + errorTtl = 0.15, + resolver = new AsyncResolver(), + lookup = dnsLookup + } = {}) { + this.maxTtl = maxTtl; + this.errorTtl = errorTtl; + + this._cache = cache; + this._resolver = resolver; + this._dnsLookup = promisify(lookup); + + if (this._resolver instanceof AsyncResolver) { + this._resolve4 = this._resolver.resolve4.bind(this._resolver); + this._resolve6 = this._resolver.resolve6.bind(this._resolver); + } else { + this._resolve4 = promisify(this._resolver.resolve4.bind(this._resolver)); + this._resolve6 = promisify(this._resolver.resolve6.bind(this._resolver)); + } + + this._iface = getIfaceInfo(); + + this._pending = {}; + this._nextRemovalTime = false; + this._hostnamesToFallback = new Set(); + + if (fallbackDuration < 1) { + this._fallback = false; + } else { + this._fallback = true; + + const interval = setInterval(() => { + this._hostnamesToFallback.clear(); + }, fallbackDuration * 1000); + + /* istanbul ignore next: There is no `interval.unref()` when running inside an Electron renderer */ + if (interval.unref) { + interval.unref(); + } + } + + this.lookup = this.lookup.bind(this); + this.lookupAsync = this.lookupAsync.bind(this); + } + + set servers(servers) { + this.clear(); + + this._resolver.setServers(servers); + } + + get servers() { + return this._resolver.getServers(); + } + + lookup(hostname, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } else if (typeof options === 'number') { + options = { + family: options + }; + } + + if (!callback) { + throw new Error('Callback must be a function.'); + } + + // eslint-disable-next-line promise/prefer-await-to-then + this.lookupAsync(hostname, options).then(result => { + if (options.all) { + callback(null, result); + } else { + callback(null, result.address, result.family, result.expires, result.ttl); + } + }, callback); + } + + async lookupAsync(hostname, options = {}) { + if (typeof options === 'number') { + options = { + family: options + }; + } + + let cached = await this.query(hostname); + + if (options.family === 6) { + const filtered = cached.filter(entry => entry.family === 6); + + if (options.hints & V4MAPPED) { + if ((supportsALL && options.hints & ALL) || filtered.length === 0) { + map4to6(cached); + } else { + cached = filtered; + } + } else { + cached = filtered; + } + } else if (options.family === 4) { + cached = cached.filter(entry => entry.family === 4); + } + + if (options.hints & ADDRCONFIG) { + const {_iface} = this; + cached = cached.filter(entry => entry.family === 6 ? _iface.has6 : _iface.has4); + } + + if (cached.length === 0) { + const error = new Error(`cacheableLookup ENOTFOUND ${hostname}`); + error.code = 'ENOTFOUND'; + error.hostname = hostname; + + throw error; + } + + if (options.all) { + return cached; + } + + return cached[0]; + } + + async query(hostname) { + let cached = await this._cache.get(hostname); + + if (!cached) { + const pending = this._pending[hostname]; + + if (pending) { + cached = await pending; + } else { + const newPromise = this.queryAndCache(hostname); + this._pending[hostname] = newPromise; + + try { + cached = await newPromise; + } finally { + delete this._pending[hostname]; + } + } + } + + cached = cached.map(entry => { + return {...entry}; + }); + + return cached; + } + + async _resolve(hostname) { + const wrap = async promise => { + try { + return await promise; + } catch (error) { + if (error.code === 'ENODATA' || error.code === 'ENOTFOUND') { + return []; + } + + throw error; + } + }; + + // ANY is unsafe as it doesn't trigger new queries in the underlying server. + const [A, AAAA] = await Promise.all([ + this._resolve4(hostname, ttl), + this._resolve6(hostname, ttl) + ].map(promise => wrap(promise))); + + let aTtl = 0; + let aaaaTtl = 0; + let cacheTtl = 0; + + const now = Date.now(); + + for (const entry of A) { + entry.family = 4; + entry.expires = now + (entry.ttl * 1000); + + aTtl = Math.max(aTtl, entry.ttl); + } + + for (const entry of AAAA) { + entry.family = 6; + entry.expires = now + (entry.ttl * 1000); + + aaaaTtl = Math.max(aaaaTtl, entry.ttl); + } + + if (A.length > 0) { + if (AAAA.length > 0) { + cacheTtl = Math.min(aTtl, aaaaTtl); + } else { + cacheTtl = aTtl; + } + } else { + cacheTtl = aaaaTtl; + } + + return { + entries: [ + ...A, + ...AAAA + ], + cacheTtl + }; + } + + async _lookup(hostname) { + try { + const entries = await this._dnsLookup(hostname, { + all: true + }); + + return { + entries, + cacheTtl: 0 + }; + } catch (_) { + return { + entries: [], + cacheTtl: 0 + }; + } + } + + async _set(hostname, data, cacheTtl) { + if (this.maxTtl > 0 && cacheTtl > 0) { + cacheTtl = Math.min(cacheTtl, this.maxTtl) * 1000; + data[kExpires] = Date.now() + cacheTtl; + + try { + await this._cache.set(hostname, data, cacheTtl); + } catch (error) { + this.lookupAsync = async () => { + const cacheError = new Error('Cache Error. Please recreate the CacheableLookup instance.'); + cacheError.cause = error; + + throw cacheError; + }; + } + + if (isIterable(this._cache)) { + this._tick(cacheTtl); + } + } + } + + async queryAndCache(hostname) { + if (this._hostnamesToFallback.has(hostname)) { + return this._dnsLookup(hostname, all); + } + + let query = await this._resolve(hostname); + + if (query.entries.length === 0 && this._fallback) { + query = await this._lookup(hostname); + + if (query.entries.length !== 0) { + // Use `dns.lookup(...)` for that particular hostname + this._hostnamesToFallback.add(hostname); + } + } + + const cacheTtl = query.entries.length === 0 ? this.errorTtl : query.cacheTtl; + await this._set(hostname, query.entries, cacheTtl); + + return query.entries; + } + + _tick(ms) { + const nextRemovalTime = this._nextRemovalTime; + + if (!nextRemovalTime || ms < nextRemovalTime) { + clearTimeout(this._removalTimeout); + + this._nextRemovalTime = ms; + + this._removalTimeout = setTimeout(() => { + this._nextRemovalTime = false; + + let nextExpiry = Infinity; + + const now = Date.now(); + + for (const [hostname, entries] of this._cache) { + const expires = entries[kExpires]; + + if (now >= expires) { + this._cache.delete(hostname); + } else if (expires < nextExpiry) { + nextExpiry = expires; + } + } + + if (nextExpiry !== Infinity) { + this._tick(nextExpiry - now); + } + }, ms); + + /* istanbul ignore next: There is no `timeout.unref()` when running inside an Electron renderer */ + if (this._removalTimeout.unref) { + this._removalTimeout.unref(); + } + } + } + + install(agent) { + verifyAgent(agent); + + if (kCacheableLookupCreateConnection in agent) { + throw new Error('CacheableLookup has been already installed'); + } + + agent[kCacheableLookupCreateConnection] = agent.createConnection; + agent[kCacheableLookupInstance] = this; + + agent.createConnection = (options, callback) => { + if (!('lookup' in options)) { + options.lookup = this.lookup; + } + + return agent[kCacheableLookupCreateConnection](options, callback); + }; + } + + uninstall(agent) { + verifyAgent(agent); + + if (agent[kCacheableLookupCreateConnection]) { + if (agent[kCacheableLookupInstance] !== this) { + throw new Error('The agent is not owned by this CacheableLookup instance'); + } + + agent.createConnection = agent[kCacheableLookupCreateConnection]; + + delete agent[kCacheableLookupCreateConnection]; + delete agent[kCacheableLookupInstance]; + } + } + + updateInterfaceInfo() { + const {_iface} = this; + + this._iface = getIfaceInfo(); + + if ((_iface.has4 && !this._iface.has4) || (_iface.has6 && !this._iface.has6)) { + this._cache.clear(); + } + } + + clear(hostname) { + if (hostname) { + this._cache.delete(hostname); + return; + } + + this._cache.clear(); + } +} + +module.exports = CacheableLookup; +module.exports["default"] = CacheableLookup; + + +/***/ }), + +/***/ 4506: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const {PassThrough: PassThroughStream} = __nccwpck_require__(12781); + +module.exports = options => { + options = {...options}; + + const {array} = options; + let {encoding} = options; + const isBuffer = encoding === 'buffer'; + let objectMode = false; + + if (array) { + objectMode = !(encoding || isBuffer); + } else { + encoding = encoding || 'utf8'; + } + + if (isBuffer) { + encoding = null; + } + + const stream = new PassThroughStream({objectMode}); + + if (encoding) { + stream.setEncoding(encoding); + } + + let length = 0; + const chunks = []; + + stream.on('data', chunk => { + chunks.push(chunk); + + if (objectMode) { + length = chunks.length; + } else { + length += chunk.length; + } + }); + + stream.getBufferedValue = () => { + if (array) { + return chunks; + } + + return isBuffer ? Buffer.concat(chunks, length) : chunks.join(''); + }; + + stream.getBufferedLength = () => length; + + return stream; +}; + + +/***/ }), + +/***/ 60124: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const {constants: BufferConstants} = __nccwpck_require__(14300); +const pump = __nccwpck_require__(49394); +const bufferStream = __nccwpck_require__(4506); + +class MaxBufferError extends Error { + constructor() { + super('maxBuffer exceeded'); + this.name = 'MaxBufferError'; + } +} + +async function getStream(inputStream, options) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + + options = { + maxBuffer: Infinity, + ...options + }; + + const {maxBuffer} = options; + + let stream; + await new Promise((resolve, reject) => { + const rejectPromise = error => { + // Don't retrieve an oversized buffer. + if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) { + 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()); + } + }); + }); + + return stream.getBufferedValue(); +} + +module.exports = getStream; +// TODO: Remove this for the next major release +module.exports["default"] = getStream; +module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'}); +module.exports.array = (stream, options) => getStream(stream, {...options, array: true}); +module.exports.MaxBufferError = MaxBufferError; + + +/***/ }), + +/***/ 23082: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const EventEmitter = __nccwpck_require__(82361); +const urlLib = __nccwpck_require__(57310); +const normalizeUrl = __nccwpck_require__(26646); +const getStream = __nccwpck_require__(60124); +const CachePolicy = __nccwpck_require__(67332); +const Response = __nccwpck_require__(45973); +const lowercaseKeys = __nccwpck_require__(29955); +const cloneResponse = __nccwpck_require__(64111); +const Keyv = __nccwpck_require__(26554); + +class CacheableRequest { + constructor(request, cacheAdapter) { + if (typeof request !== 'function') { + throw new TypeError('Parameter `request` must be a function'); + } + + this.cache = new Keyv({ + uri: typeof cacheAdapter === 'string' && cacheAdapter, + store: typeof cacheAdapter !== 'string' && cacheAdapter, + namespace: 'cacheable-request' + }); + + return this.createCacheableRequest(request); + } + + createCacheableRequest(request) { + return (opts, cb) => { + let url; + if (typeof opts === 'string') { + url = normalizeUrlObject(urlLib.parse(opts)); + opts = {}; + } else if (opts instanceof urlLib.URL) { + url = normalizeUrlObject(urlLib.parse(opts.toString())); + opts = {}; + } else { + const [pathname, ...searchParts] = (opts.path || '').split('?'); + const search = searchParts.length > 0 ? + `?${searchParts.join('?')}` : + ''; + url = normalizeUrlObject({ ...opts, pathname, search }); + } + + opts = { + headers: {}, + method: 'GET', + cache: true, + strictTtl: false, + automaticFailover: false, + ...opts, + ...urlObjectToRequestOptions(url) + }; + opts.headers = lowercaseKeys(opts.headers); + + const ee = new EventEmitter(); + const normalizedUrlString = normalizeUrl( + urlLib.format(url), + { + stripWWW: false, + removeTrailingSlash: false, + stripAuthentication: false + } + ); + const key = `${opts.method}:${normalizedUrlString}`; + let revalidate = false; + let madeRequest = false; + + const makeRequest = opts => { + madeRequest = true; + let requestErrored = false; + let requestErrorCallback; + + const requestErrorPromise = new Promise(resolve => { + requestErrorCallback = () => { + if (!requestErrored) { + requestErrored = true; + resolve(); + } + }; + }); + + const handler = response => { + if (revalidate && !opts.forceRefresh) { + response.status = response.statusCode; + const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts, response); + if (!revalidatedPolicy.modified) { + const headers = revalidatedPolicy.policy.responseHeaders(); + response = new Response(revalidate.statusCode, headers, revalidate.body, revalidate.url); + response.cachePolicy = revalidatedPolicy.policy; + response.fromCache = true; + } + } + + if (!response.fromCache) { + response.cachePolicy = new CachePolicy(opts, response, opts); + response.fromCache = false; + } + + let clonedResponse; + if (opts.cache && response.cachePolicy.storable()) { + clonedResponse = cloneResponse(response); + + (async () => { + try { + const bodyPromise = getStream.buffer(response); + + await Promise.race([ + requestErrorPromise, + new Promise(resolve => response.once('end', resolve)) + ]); + + if (requestErrored) { + return; + } + + const body = await bodyPromise; + + const value = { + cachePolicy: response.cachePolicy.toObject(), + url: response.url, + statusCode: response.fromCache ? revalidate.statusCode : response.statusCode, + body + }; + + let ttl = opts.strictTtl ? response.cachePolicy.timeToLive() : undefined; + if (opts.maxTtl) { + ttl = ttl ? Math.min(ttl, opts.maxTtl) : opts.maxTtl; + } + + await this.cache.set(key, value, ttl); + } catch (error) { + ee.emit('error', new CacheableRequest.CacheError(error)); + } + })(); + } else if (opts.cache && revalidate) { + (async () => { + try { + await this.cache.delete(key); + } catch (error) { + ee.emit('error', new CacheableRequest.CacheError(error)); + } + })(); + } + + ee.emit('response', clonedResponse || response); + if (typeof cb === 'function') { + cb(clonedResponse || response); + } + }; + + try { + const req = request(opts, handler); + req.once('error', requestErrorCallback); + req.once('abort', requestErrorCallback); + ee.emit('request', req); + } catch (error) { + ee.emit('error', new CacheableRequest.RequestError(error)); + } + }; + + (async () => { + const get = async opts => { + await Promise.resolve(); + + const cacheEntry = opts.cache ? await this.cache.get(key) : undefined; + if (typeof cacheEntry === 'undefined') { + return makeRequest(opts); + } + + const policy = CachePolicy.fromObject(cacheEntry.cachePolicy); + if (policy.satisfiesWithoutRevalidation(opts) && !opts.forceRefresh) { + const headers = policy.responseHeaders(); + const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url); + response.cachePolicy = policy; + response.fromCache = true; + + ee.emit('response', response); + if (typeof cb === 'function') { + cb(response); + } + } else { + revalidate = cacheEntry; + opts.headers = policy.revalidationHeaders(opts); + makeRequest(opts); + } + }; + + const errorHandler = error => ee.emit('error', new CacheableRequest.CacheError(error)); + this.cache.once('error', errorHandler); + ee.on('response', () => this.cache.removeListener('error', errorHandler)); + + try { + await get(opts); + } catch (error) { + if (opts.automaticFailover && !madeRequest) { + makeRequest(opts); + } + + ee.emit('error', new CacheableRequest.CacheError(error)); + } + })(); + + return ee; + }; + } +} + +function urlObjectToRequestOptions(url) { + const options = { ...url }; + options.path = `${url.pathname || '/'}${url.search || ''}`; + delete options.pathname; + delete options.search; + return options; +} + +function normalizeUrlObject(url) { + // If url was parsed by url.parse or new URL: + // - hostname will be set + // - host will be hostname[:port] + // - port will be set if it was explicit in the parsed string + // Otherwise, url was from request options: + // - hostname or host may be set + // - host shall not have port encoded + return { + protocol: url.protocol, + auth: url.auth, + hostname: url.hostname || url.host || 'localhost', + port: url.port, + pathname: url.pathname, + search: url.search + }; +} + +CacheableRequest.RequestError = class extends Error { + constructor(error) { + super(error.message); + this.name = 'RequestError'; + Object.assign(this, error); + } +}; + +CacheableRequest.CacheError = class extends Error { + constructor(error) { + super(error.message); + this.name = 'CacheError'; + Object.assign(this, error); + } +}; + +module.exports = CacheableRequest; + + +/***/ }), + +/***/ 12146: +/***/ ((module) => { + +function Caseless (dict) { + this.dict = dict || {} +} +Caseless.prototype.set = function (name, value, clobber) { + if (typeof name === 'object') { + for (var i in name) { + this.set(i, name[i], value) + } + } else { + if (typeof clobber === 'undefined') clobber = true + var has = this.has(name) + + if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value + else this.dict[has || name] = value + return has + } +} +Caseless.prototype.has = function (name) { + var keys = Object.keys(this.dict) + , name = name.toLowerCase() + ; + for (var i=0;i { + +"use strict"; + +const fs = __nccwpck_require__(57147) +const path = __nccwpck_require__(71017) + +/* istanbul ignore next */ +const LCHOWN = fs.lchown ? 'lchown' : 'chown' +/* istanbul ignore next */ +const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' + +/* istanbul ignore next */ +const needEISDIRHandled = fs.lchown && + !process.version.match(/v1[1-9]+\./) && + !process.version.match(/v10\.[6-9]/) + +const lchownSync = (path, uid, gid) => { + try { + return fs[LCHOWNSYNC](path, uid, gid) + } catch (er) { + if (er.code !== 'ENOENT') + throw er + } +} + +/* istanbul ignore next */ +const chownSync = (path, uid, gid) => { + try { + return fs.chownSync(path, uid, gid) + } catch (er) { + if (er.code !== 'ENOENT') + throw er + } +} + +/* istanbul ignore next */ +const handleEISDIR = + needEISDIRHandled ? (path, uid, gid, cb) => er => { + // Node prior to v10 had a very questionable implementation of + // fs.lchown, which would always try to call fs.open on a directory + // Fall back to fs.chown in those cases. + if (!er || er.code !== 'EISDIR') + cb(er) + else + fs.chown(path, uid, gid, cb) + } + : (_, __, ___, cb) => cb + +/* istanbul ignore next */ +const handleEISDirSync = + needEISDIRHandled ? (path, uid, gid) => { + try { + return lchownSync(path, uid, gid) + } catch (er) { + if (er.code !== 'EISDIR') + throw er + chownSync(path, uid, gid) + } + } + : (path, uid, gid) => lchownSync(path, uid, gid) + +// fs.readdir could only accept an options object as of node v6 +const nodeVersion = process.version +let readdir = (path, options, cb) => fs.readdir(path, options, cb) +let readdirSync = (path, options) => fs.readdirSync(path, options) +/* istanbul ignore next */ +if (/^v4\./.test(nodeVersion)) + readdir = (path, options, cb) => fs.readdir(path, cb) + +const chown = (cpath, uid, gid, cb) => { + fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => { + // Skip ENOENT error + cb(er && er.code !== 'ENOENT' ? er : null) + })) +} + +const chownrKid = (p, child, uid, gid, cb) => { + if (typeof child === 'string') + return fs.lstat(path.resolve(p, child), (er, stats) => { + // Skip ENOENT error + if (er) + return cb(er.code !== 'ENOENT' ? er : null) + stats.name = child + chownrKid(p, stats, uid, gid, cb) + }) + + if (child.isDirectory()) { + chownr(path.resolve(p, child.name), uid, gid, er => { + if (er) + return cb(er) + const cpath = path.resolve(p, child.name) + chown(cpath, uid, gid, cb) + }) + } else { + const cpath = path.resolve(p, child.name) + chown(cpath, uid, gid, cb) + } +} + + +const chownr = (p, uid, gid, cb) => { + readdir(p, { withFileTypes: true }, (er, children) => { + // any error other than ENOTDIR or ENOTSUP means it's not readable, + // or doesn't exist. give up. + if (er) { + if (er.code === 'ENOENT') + return cb() + else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') + return cb(er) + } + if (er || !children.length) + return chown(p, uid, gid, cb) + + let len = children.length + let errState = null + const then = er => { + if (errState) + return + if (er) + return cb(errState = er) + if (-- len === 0) + return chown(p, uid, gid, cb) + } + + children.forEach(child => chownrKid(p, child, uid, gid, then)) + }) +} + +const chownrKidSync = (p, child, uid, gid) => { + if (typeof child === 'string') { + try { + const stats = fs.lstatSync(path.resolve(p, child)) + stats.name = child + child = stats + } catch (er) { + if (er.code === 'ENOENT') + return + else + throw er + } + } + + if (child.isDirectory()) + chownrSync(path.resolve(p, child.name), uid, gid) + + handleEISDirSync(path.resolve(p, child.name), uid, gid) +} + +const chownrSync = (p, uid, gid) => { + let children + try { + children = readdirSync(p, { withFileTypes: true }) + } catch (er) { + if (er.code === 'ENOENT') + return + else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP') + return handleEISDirSync(p, uid, gid) + else + throw er + } + + if (children && children.length) + children.forEach(child => chownrKidSync(p, child, uid, gid)) + + return handleEISDirSync(p, uid, gid) +} + +module.exports = chownr +chownr.sync = chownrSync + + +/***/ }), + +/***/ 40779: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const os = __nccwpck_require__(22037); + +const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; +const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; +const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir(); + +module.exports = (stack, options) => { + options = Object.assign({pretty: false}, options); + + return stack.replace(/\\/g, '/') + .split('\n') + .filter(line => { + const pathMatches = line.match(extractPathRegex); + if (pathMatches === null || !pathMatches[1]) { + return true; + } + + const match = pathMatches[1]; + + // Electron + if ( + match.includes('.app/Contents/Resources/electron.asar') || + match.includes('.app/Contents/Resources/default_app.asar') + ) { + return false; + } + + return !pathRegex.test(match); + }) + .filter(line => line.trim() !== '') + .map(line => { + if (options.pretty) { + return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~'))); + } + + return line; + }) + .join('\n'); +}; + + +/***/ }), + +/***/ 64111: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const PassThrough = (__nccwpck_require__(12781).PassThrough); +const mimicResponse = __nccwpck_require__(41058); + +const cloneResponse = response => { + if (!(response && response.pipe)) { + throw new TypeError('Parameter `response` must be a response stream.'); + } + + const clone = new PassThrough(); + mimicResponse(response, clone); + + return response.pipe(clone); +}; + +module.exports = cloneResponse; + + +/***/ }), + +/***/ 93324: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(73837); +var Stream = (__nccwpck_require__(12781).Stream); +var DelayedStream = __nccwpck_require__(99681); + +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; + + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); + +CombinedStream.create = function(options) { + var combinedStream = new this(); + + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; + } + + return combinedStream; +}; + +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; + +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } + + this._handleErrors(stream); + + if (this.pauseStreams) { + stream.pause(); + } + } + + this._streams.push(stream); + return this; +}; + +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; +}; + +CombinedStream.prototype._getNext = function() { + this._currentStream = null; + + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call + } + + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } +}; + +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); + + + if (typeof stream == 'undefined') { + this.end(); + return; + } + + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; + } + + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); + } + + this._pipeNext(stream); + }.bind(this)); +}; + +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; + + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } + + var value = stream; + this.write(value); + this._getNext(); +}; + +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; + +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; + +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; + +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; + +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; + +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; + +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; + +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } + + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; + +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; + } + + self.dataSize += stream.dataSize; + }); + + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } +}; + +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; + + +/***/ }), + +/***/ 40388: +/***/ ((module) => { + +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]'; +}; + + +/***/ }), + +/***/ 2527: +/***/ ((__unused_webpack_module, exports) => { + +var __webpack_unused_export__; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +__webpack_unused_export__ = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +__webpack_unused_export__ = isBoolean; + +function isNull(arg) { + return arg === null; +} +__webpack_unused_export__ = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +__webpack_unused_export__ = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +__webpack_unused_export__ = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +__webpack_unused_export__ = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +__webpack_unused_export__ = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +__webpack_unused_export__ = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +__webpack_unused_export__ = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +__webpack_unused_export__ = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +__webpack_unused_export__ = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.VZ = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +__webpack_unused_export__ = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +__webpack_unused_export__ = isPrimitive; + +__webpack_unused_export__ = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +/***/ }), + +/***/ 6133: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const {Transform, PassThrough} = __nccwpck_require__(12781); +const zlib = __nccwpck_require__(59796); +const mimicResponse = __nccwpck_require__(79219); + +module.exports = response => { + const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); + + if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) { + return response; + } + + // TODO: Remove this when targeting Node.js 12. + const isBrotli = contentEncoding === 'br'; + if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') { + response.destroy(new Error('Brotli is not supported on Node.js < 12')); + return response; + } + + let isEmpty = true; + + const checker = new Transform({ + transform(data, _encoding, callback) { + isEmpty = false; + + callback(null, data); + }, + + flush(callback) { + callback(); + } + }); + + const finalStream = new PassThrough({ + autoDestroy: false, + destroy(error, callback) { + response.destroy(); + + callback(error); + } + }); + + const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); + + decompressStream.once('error', error => { + if (isEmpty && !response.readable) { + finalStream.end(); + return; + } + + finalStream.destroy(error); + }); + + mimicResponse(response, finalStream); + response.pipe(checker).pipe(decompressStream).pipe(finalStream); + + return finalStream; +}; + + +/***/ }), + +/***/ 79219: +/***/ ((module) => { + +"use strict"; + + +// We define these manually to ensure they're always copied +// even if they would move up the prototype chain +// https://nodejs.org/api/http.html#http_class_http_incomingmessage +const knownProperties = [ + 'aborted', + 'complete', + 'headers', + 'httpVersion', + 'httpVersionMinor', + 'httpVersionMajor', + 'method', + 'rawHeaders', + 'rawTrailers', + 'setTimeout', + 'socket', + 'statusCode', + 'statusMessage', + 'trailers', + 'url' +]; + +module.exports = (fromStream, toStream) => { + if (toStream._readableState.autoDestroy) { + throw new Error('The second stream must have the `autoDestroy` option set to `false`'); + } + + const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); + + const properties = {}; + + for (const property of fromProperties) { + // Don't overwrite existing properties. + if (property in toStream) { + continue; + } + + properties[property] = { + get() { + const value = fromStream[property]; + const isFunction = typeof value === 'function'; + + return isFunction ? value.bind(fromStream) : value; + }, + set(value) { + fromStream[property] = value; + }, + enumerable: true, + configurable: false + }; + } + + Object.defineProperties(toStream, properties); + + fromStream.once('aborted', () => { + toStream.destroy(); + + toStream.emit('aborted'); + }); + + fromStream.once('close', () => { + if (fromStream.complete) { + if (toStream.readable) { + toStream.once('end', () => { + toStream.emit('close'); + }); + } else { + toStream.emit('close'); + } + } else { + toStream.emit('close'); + } + }); + + return toStream; +}; + + +/***/ }), + +/***/ 72098: +/***/ ((module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +function isTLSSocket(socket) { + return socket.encrypted; +} +const deferToConnect = (socket, fn) => { + let listeners; + if (typeof fn === 'function') { + const connect = fn; + listeners = { connect }; + } + else { + listeners = fn; + } + const hasConnectListener = typeof listeners.connect === 'function'; + const hasSecureConnectListener = typeof listeners.secureConnect === 'function'; + const hasCloseListener = typeof listeners.close === 'function'; + const onConnect = () => { + if (hasConnectListener) { + listeners.connect(); + } + if (isTLSSocket(socket) && hasSecureConnectListener) { + if (socket.authorized) { + listeners.secureConnect(); + } + else if (!socket.authorizationError) { + socket.once('secureConnect', listeners.secureConnect); + } + } + if (hasCloseListener) { + socket.once('close', listeners.close); + } + }; + if (socket.writable && !socket.connecting) { + onConnect(); + } + else if (socket.connecting) { + socket.once('connect', onConnect); + } + else if (socket.destroyed && hasCloseListener) { + listeners.close(socket._hadError); + } +}; +exports["default"] = deferToConnect; +// For CommonJS default export support +module.exports = deferToConnect; +module.exports["default"] = deferToConnect; + + +/***/ }), + +/***/ 99681: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Stream = (__nccwpck_require__(12781).Stream); +var util = __nccwpck_require__(73837); + +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; + + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; +} +util.inherits(DelayedStream, Stream); + +DelayedStream.create = function(source, options) { + var delayedStream = new this(); + + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } + + delayedStream.source = source; + + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; + + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); + } + + return delayedStream; +}; + +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } +}); + +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; + +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } + + this.source.resume(); +}; + +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; + +DelayedStream.prototype.release = function() { + this._released = true; + + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; + +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; + +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; + } + + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); + } + + this._bufferedEvents.push(args); +}; + +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } + + if (this.dataSize <= this.maxDataSize) { + return; + } + + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; + + +/***/ }), + +/***/ 13781: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +var crypto = __nccwpck_require__(6113); +var BigInteger = (__nccwpck_require__(42934).BigInteger); +var ECPointFp = (__nccwpck_require__(68592).ECPointFp); +var Buffer = (__nccwpck_require__(77556).Buffer); +exports.ECCurves = __nccwpck_require__(99659); + +// zero prepad +function unstupid(hex,len) +{ + return (hex.length >= len) ? hex : unstupid("0"+hex,len); +} + +exports.ECKey = function(curve, key, isPublic) +{ + var priv; + var c = curve(); + var n = c.getN(); + var bytes = Math.floor(n.bitLength()/8); + + if(key) + { + if(isPublic) + { + var curve = c.getCurve(); +// var x = key.slice(1,bytes+1); // skip the 04 for uncompressed format +// var y = key.slice(bytes+1); +// this.P = new ECPointFp(curve, +// curve.fromBigInteger(new BigInteger(x.toString("hex"), 16)), +// curve.fromBigInteger(new BigInteger(y.toString("hex"), 16))); + this.P = curve.decodePointHex(key.toString("hex")); + }else{ + if(key.length != bytes) return false; + priv = new BigInteger(key.toString("hex"), 16); + } + }else{ + var n1 = n.subtract(BigInteger.ONE); + var r = new BigInteger(crypto.randomBytes(n.bitLength())); + priv = r.mod(n1).add(BigInteger.ONE); + this.P = c.getG().multiply(priv); + } + if(this.P) + { +// var pubhex = unstupid(this.P.getX().toBigInteger().toString(16),bytes*2)+unstupid(this.P.getY().toBigInteger().toString(16),bytes*2); +// this.PublicKey = Buffer.from("04"+pubhex,"hex"); + this.PublicKey = Buffer.from(c.getCurve().encodeCompressedPointHex(this.P),"hex"); + } + if(priv) + { + this.PrivateKey = Buffer.from(unstupid(priv.toString(16),bytes*2),"hex"); + this.deriveSharedSecret = function(key) + { + if(!key || !key.P) return false; + var S = key.P.multiply(priv); + return Buffer.from(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex"); + } + } +} + + + +/***/ }), + +/***/ 68592: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Basic Javascript Elliptic Curve implementation +// Ported loosely from BouncyCastle's Java EC code +// Only Fp curves implemented for now + +// Requires jsbn.js and jsbn2.js +var BigInteger = (__nccwpck_require__(42934).BigInteger) +var Barrett = BigInteger.prototype.Barrett + +// ---------------- +// ECFieldElementFp + +// constructor +function ECFieldElementFp(q,x) { + this.x = x; + // TODO if(x.compareTo(q) >= 0) error + this.q = q; +} + +function feFpEquals(other) { + if(other == this) return true; + return (this.q.equals(other.q) && this.x.equals(other.x)); +} + +function feFpToBigInteger() { + return this.x; +} + +function feFpNegate() { + return new ECFieldElementFp(this.q, this.x.negate().mod(this.q)); +} + +function feFpAdd(b) { + return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q)); +} + +function feFpSubtract(b) { + return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q)); +} + +function feFpMultiply(b) { + return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q)); +} + +function feFpSquare() { + return new ECFieldElementFp(this.q, this.x.square().mod(this.q)); +} + +function feFpDivide(b) { + return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q)); +} + +ECFieldElementFp.prototype.equals = feFpEquals; +ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger; +ECFieldElementFp.prototype.negate = feFpNegate; +ECFieldElementFp.prototype.add = feFpAdd; +ECFieldElementFp.prototype.subtract = feFpSubtract; +ECFieldElementFp.prototype.multiply = feFpMultiply; +ECFieldElementFp.prototype.square = feFpSquare; +ECFieldElementFp.prototype.divide = feFpDivide; + +// ---------------- +// ECPointFp + +// constructor +function ECPointFp(curve,x,y,z) { + this.curve = curve; + this.x = x; + this.y = y; + // Projective coordinates: either zinv == null or z * zinv == 1 + // z and zinv are just BigIntegers, not fieldElements + if(z == null) { + this.z = BigInteger.ONE; + } + else { + this.z = z; + } + this.zinv = null; + //TODO: compression flag +} + +function pointFpGetX() { + if(this.zinv == null) { + this.zinv = this.z.modInverse(this.curve.q); + } + var r = this.x.toBigInteger().multiply(this.zinv); + this.curve.reduce(r); + return this.curve.fromBigInteger(r); +} + +function pointFpGetY() { + if(this.zinv == null) { + this.zinv = this.z.modInverse(this.curve.q); + } + var r = this.y.toBigInteger().multiply(this.zinv); + this.curve.reduce(r); + return this.curve.fromBigInteger(r); +} + +function pointFpEquals(other) { + if(other == this) return true; + if(this.isInfinity()) return other.isInfinity(); + if(other.isInfinity()) return this.isInfinity(); + var u, v; + // u = Y2 * Z1 - Y1 * Z2 + u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q); + if(!u.equals(BigInteger.ZERO)) return false; + // v = X2 * Z1 - X1 * Z2 + v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q); + return v.equals(BigInteger.ZERO); +} + +function pointFpIsInfinity() { + if((this.x == null) && (this.y == null)) return true; + return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO); +} + +function pointFpNegate() { + return new ECPointFp(this.curve, this.x, this.y.negate(), this.z); +} + +function pointFpAdd(b) { + if(this.isInfinity()) return b; + if(b.isInfinity()) return this; + + // u = Y2 * Z1 - Y1 * Z2 + var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q); + // v = X2 * Z1 - X1 * Z2 + var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q); + + if(BigInteger.ZERO.equals(v)) { + if(BigInteger.ZERO.equals(u)) { + return this.twice(); // this == b, so double + } + return this.curve.getInfinity(); // this = -b, so infinity + } + + var THREE = new BigInteger("3"); + var x1 = this.x.toBigInteger(); + var y1 = this.y.toBigInteger(); + var x2 = b.x.toBigInteger(); + var y2 = b.y.toBigInteger(); + + var v2 = v.square(); + var v3 = v2.multiply(v); + var x1v2 = x1.multiply(v2); + var zu2 = u.square().multiply(this.z); + + // x3 = v * (z2 * (z1 * u^2 - 2 * x1 * v^2) - v^3) + var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q); + // y3 = z2 * (3 * x1 * u * v^2 - y1 * v^3 - z1 * u^3) + u * v^3 + var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q); + // z3 = v^3 * z1 * z2 + var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q); + + return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); +} + +function pointFpTwice() { + if(this.isInfinity()) return this; + if(this.y.toBigInteger().signum() == 0) return this.curve.getInfinity(); + + // TODO: optimized handling of constants + var THREE = new BigInteger("3"); + var x1 = this.x.toBigInteger(); + var y1 = this.y.toBigInteger(); + + var y1z1 = y1.multiply(this.z); + var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q); + var a = this.curve.a.toBigInteger(); + + // w = 3 * x1^2 + a * z1^2 + var w = x1.square().multiply(THREE); + if(!BigInteger.ZERO.equals(a)) { + w = w.add(this.z.square().multiply(a)); + } + w = w.mod(this.curve.q); + //this.curve.reduce(w); + // x3 = 2 * y1 * z1 * (w^2 - 8 * x1 * y1^2 * z1) + var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q); + // y3 = 4 * y1^2 * z1 * (3 * w * x1 - 2 * y1^2 * z1) - w^3 + var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q); + // z3 = 8 * (y1 * z1)^3 + var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q); + + return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); +} + +// Simple NAF (Non-Adjacent Form) multiplication algorithm +// TODO: modularize the multiplication algorithm +function pointFpMultiply(k) { + if(this.isInfinity()) return this; + if(k.signum() == 0) return this.curve.getInfinity(); + + var e = k; + var h = e.multiply(new BigInteger("3")); + + var neg = this.negate(); + var R = this; + + var i; + for(i = h.bitLength() - 2; i > 0; --i) { + R = R.twice(); + + var hBit = h.testBit(i); + var eBit = e.testBit(i); + + if (hBit != eBit) { + R = R.add(hBit ? this : neg); + } + } + + return R; +} + +// Compute this*j + x*k (simultaneous multiplication) +function pointFpMultiplyTwo(j,x,k) { + var i; + if(j.bitLength() > k.bitLength()) + i = j.bitLength() - 1; + else + i = k.bitLength() - 1; + + var R = this.curve.getInfinity(); + var both = this.add(x); + while(i >= 0) { + R = R.twice(); + if(j.testBit(i)) { + if(k.testBit(i)) { + R = R.add(both); + } + else { + R = R.add(this); + } + } + else { + if(k.testBit(i)) { + R = R.add(x); + } + } + --i; + } + + return R; +} + +ECPointFp.prototype.getX = pointFpGetX; +ECPointFp.prototype.getY = pointFpGetY; +ECPointFp.prototype.equals = pointFpEquals; +ECPointFp.prototype.isInfinity = pointFpIsInfinity; +ECPointFp.prototype.negate = pointFpNegate; +ECPointFp.prototype.add = pointFpAdd; +ECPointFp.prototype.twice = pointFpTwice; +ECPointFp.prototype.multiply = pointFpMultiply; +ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo; + +// ---------------- +// ECCurveFp + +// constructor +function ECCurveFp(q,a,b) { + this.q = q; + this.a = this.fromBigInteger(a); + this.b = this.fromBigInteger(b); + this.infinity = new ECPointFp(this, null, null); + this.reducer = new Barrett(this.q); +} + +function curveFpGetQ() { + return this.q; +} + +function curveFpGetA() { + return this.a; +} + +function curveFpGetB() { + return this.b; +} + +function curveFpEquals(other) { + if(other == this) return true; + return(this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b)); +} + +function curveFpGetInfinity() { + return this.infinity; +} + +function curveFpFromBigInteger(x) { + return new ECFieldElementFp(this.q, x); +} + +function curveReduce(x) { + this.reducer.reduce(x); +} + +// for now, work with hex strings because they're easier in JS +function curveFpDecodePointHex(s) { + switch(parseInt(s.substr(0,2), 16)) { // first byte + case 0: + return this.infinity; + case 2: + case 3: + // point compression not supported yet + return null; + case 4: + case 6: + case 7: + var len = (s.length - 2) / 2; + var xHex = s.substr(2, len); + var yHex = s.substr(len+2, len); + + return new ECPointFp(this, + this.fromBigInteger(new BigInteger(xHex, 16)), + this.fromBigInteger(new BigInteger(yHex, 16))); + + default: // unsupported + return null; + } +} + +function curveFpEncodePointHex(p) { + if (p.isInfinity()) return "00"; + var xHex = p.getX().toBigInteger().toString(16); + var yHex = p.getY().toBigInteger().toString(16); + var oLen = this.getQ().toString(16).length; + if ((oLen % 2) != 0) oLen++; + while (xHex.length < oLen) { + xHex = "0" + xHex; + } + while (yHex.length < oLen) { + yHex = "0" + yHex; + } + return "04" + xHex + yHex; +} + +ECCurveFp.prototype.getQ = curveFpGetQ; +ECCurveFp.prototype.getA = curveFpGetA; +ECCurveFp.prototype.getB = curveFpGetB; +ECCurveFp.prototype.equals = curveFpEquals; +ECCurveFp.prototype.getInfinity = curveFpGetInfinity; +ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger; +ECCurveFp.prototype.reduce = curveReduce; +//ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex; +ECCurveFp.prototype.encodePointHex = curveFpEncodePointHex; + +// from: https://github.com/kaielvin/jsbn-ec-point-compression +ECCurveFp.prototype.decodePointHex = function(s) +{ + var yIsEven; + switch(parseInt(s.substr(0,2), 16)) { // first byte + case 0: + return this.infinity; + case 2: + yIsEven = false; + case 3: + if(yIsEven == undefined) yIsEven = true; + var len = s.length - 2; + var xHex = s.substr(2, len); + var x = this.fromBigInteger(new BigInteger(xHex,16)); + var alpha = x.multiply(x.square().add(this.getA())).add(this.getB()); + var beta = alpha.sqrt(); + + if (beta == null) throw "Invalid point compression"; + + var betaValue = beta.toBigInteger(); + if (betaValue.testBit(0) != yIsEven) + { + // Use the other root + beta = this.fromBigInteger(this.getQ().subtract(betaValue)); + } + return new ECPointFp(this,x,beta); + case 4: + case 6: + case 7: + var len = (s.length - 2) / 2; + var xHex = s.substr(2, len); + var yHex = s.substr(len+2, len); + + return new ECPointFp(this, + this.fromBigInteger(new BigInteger(xHex, 16)), + this.fromBigInteger(new BigInteger(yHex, 16))); + + default: // unsupported + return null; + } +} +ECCurveFp.prototype.encodeCompressedPointHex = function(p) +{ + if (p.isInfinity()) return "00"; + var xHex = p.getX().toBigInteger().toString(16); + var oLen = this.getQ().toString(16).length; + if ((oLen % 2) != 0) oLen++; + while (xHex.length < oLen) + xHex = "0" + xHex; + var yPrefix; + if(p.getY().toBigInteger().isEven()) yPrefix = "02"; + else yPrefix = "03"; + + return yPrefix + xHex; +} + + +ECFieldElementFp.prototype.getR = function() +{ + if(this.r != undefined) return this.r; + + this.r = null; + var bitLength = this.q.bitLength(); + if (bitLength > 128) + { + var firstWord = this.q.shiftRight(bitLength - 64); + if (firstWord.intValue() == -1) + { + this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q); + } + } + return this.r; +} +ECFieldElementFp.prototype.modMult = function(x1,x2) +{ + return this.modReduce(x1.multiply(x2)); +} +ECFieldElementFp.prototype.modReduce = function(x) +{ + if (this.getR() != null) + { + var qLen = q.bitLength(); + while (x.bitLength() > (qLen + 1)) + { + var u = x.shiftRight(qLen); + var v = x.subtract(u.shiftLeft(qLen)); + if (!this.getR().equals(BigInteger.ONE)) + { + u = u.multiply(this.getR()); + } + x = u.add(v); + } + while (x.compareTo(q) >= 0) + { + x = x.subtract(q); + } + } + else + { + x = x.mod(q); + } + return x; +} +ECFieldElementFp.prototype.sqrt = function() +{ + if (!this.q.testBit(0)) throw "unsupported"; + + // p mod 4 == 3 + if (this.q.testBit(1)) + { + var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q)); + return z.square().equals(this) ? z : null; + } + + // p mod 4 == 1 + var qMinusOne = this.q.subtract(BigInteger.ONE); + + var legendreExponent = qMinusOne.shiftRight(1); + if (!(this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE))) + { + return null; + } + + var u = qMinusOne.shiftRight(2); + var k = u.shiftLeft(1).add(BigInteger.ONE); + + var Q = this.x; + var fourQ = modDouble(modDouble(Q)); + + var U, V; + do + { + var P; + do + { + P = new BigInteger(this.q.bitLength(), new SecureRandom()); + } + while (P.compareTo(this.q) >= 0 + || !(P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne))); + + var result = this.lucasSequence(P, Q, k); + U = result[0]; + V = result[1]; + + if (this.modMult(V, V).equals(fourQ)) + { + // Integer division by 2, mod q + if (V.testBit(0)) + { + V = V.add(q); + } + + V = V.shiftRight(1); + + return new ECFieldElementFp(q,V); + } + } + while (U.equals(BigInteger.ONE) || U.equals(qMinusOne)); + + return null; +} +ECFieldElementFp.prototype.lucasSequence = function(P,Q,k) +{ + var n = k.bitLength(); + var s = k.getLowestSetBit(); + + var Uh = BigInteger.ONE; + var Vl = BigInteger.TWO; + var Vh = P; + var Ql = BigInteger.ONE; + var Qh = BigInteger.ONE; + + for (var j = n - 1; j >= s + 1; --j) + { + Ql = this.modMult(Ql, Qh); + + if (k.testBit(j)) + { + Qh = this.modMult(Ql, Q); + Uh = this.modMult(Uh, Vh); + Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1))); + } + else + { + Qh = Ql; + Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); + Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); + } + } + + Ql = this.modMult(Ql, Qh); + Qh = this.modMult(Ql, Q); + Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); + Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Ql = this.modMult(Ql, Qh); + + for (var j = 1; j <= s; ++j) + { + Uh = this.modMult(Uh, Vl); + Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); + Ql = this.modMult(Ql, Ql); + } + + return [ Uh, Vl ]; +} + +var exports = { + ECCurveFp: ECCurveFp, + ECPointFp: ECPointFp, + ECFieldElementFp: ECFieldElementFp +} + +module.exports = exports + + +/***/ }), + +/***/ 99659: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Named EC curves + +// Requires ec.js, jsbn.js, and jsbn2.js +var BigInteger = (__nccwpck_require__(42934).BigInteger) +var ECCurveFp = (__nccwpck_require__(68592).ECCurveFp) + + +// ---------------- +// X9ECParameters + +// constructor +function X9ECParameters(curve,g,n,h) { + this.curve = curve; + this.g = g; + this.n = n; + this.h = h; +} + +function x9getCurve() { + return this.curve; +} + +function x9getG() { + return this.g; +} + +function x9getN() { + return this.n; +} + +function x9getH() { + return this.h; +} + +X9ECParameters.prototype.getCurve = x9getCurve; +X9ECParameters.prototype.getG = x9getG; +X9ECParameters.prototype.getN = x9getN; +X9ECParameters.prototype.getH = x9getH; + +// ---------------- +// SECNamedCurves + +function fromHex(s) { return new BigInteger(s, 16); } + +function secp128r1() { + // p = 2^128 - 2^97 - 1 + var p = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF"); + var a = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC"); + var b = fromHex("E87579C11079F43DD824993C2CEE5ED3"); + //byte[] S = Hex.decode("000E0D4D696E6768756151750CC03A4473D03679"); + var n = fromHex("FFFFFFFE0000000075A30D1B9038A115"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "161FF7528B899B2D0C28607CA52C5B86" + + "CF5AC8395BAFEB13C02DA292DDED7A83"); + return new X9ECParameters(curve, G, n, h); +} + +function secp160k1() { + // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73"); + var a = BigInteger.ZERO; + var b = fromHex("7"); + //byte[] S = null; + var n = fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB" + + "938CF935318FDCED6BC28286531733C3F03C4FEE"); + return new X9ECParameters(curve, G, n, h); +} + +function secp160r1() { + // p = 2^160 - 2^31 - 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF"); + var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC"); + var b = fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45"); + //byte[] S = Hex.decode("1053CDE42C14D696E67687561517533BF3F83345"); + var n = fromHex("0100000000000000000001F4C8F927AED3CA752257"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "4A96B5688EF573284664698968C38BB913CBFC82" + + "23A628553168947D59DCC912042351377AC5FB32"); + return new X9ECParameters(curve, G, n, h); +} + +function secp192k1() { + // p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37"); + var a = BigInteger.ZERO; + var b = fromHex("3"); + //byte[] S = null; + var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D" + + "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D"); + return new X9ECParameters(curve, G, n, h); +} + +function secp192r1() { + // p = 2^192 - 2^64 - 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"); + var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC"); + var b = fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1"); + //byte[] S = Hex.decode("3045AE6FC8422F64ED579528D38120EAE12196D5"); + var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012" + + "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811"); + return new X9ECParameters(curve, G, n, h); +} + +function secp224r1() { + // p = 2^224 - 2^96 + 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"); + var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE"); + var b = fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4"); + //byte[] S = Hex.decode("BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5"); + var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21" + + "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34"); + return new X9ECParameters(curve, G, n, h); +} + +function secp256r1() { + // p = 2^224 (2^32 - 1) + 2^192 + 2^96 - 1 + var p = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"); + var a = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"); + var b = fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"); + //byte[] S = Hex.decode("C49D360886E704936A6678E1139D26B7819F7E90"); + var n = fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296" + + "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5"); + return new X9ECParameters(curve, G, n, h); +} + +// TODO: make this into a proper hashtable +function getSECCurveByName(name) { + if(name == "secp128r1") return secp128r1(); + if(name == "secp160k1") return secp160k1(); + if(name == "secp160r1") return secp160r1(); + if(name == "secp192k1") return secp192k1(); + if(name == "secp192r1") return secp192r1(); + if(name == "secp224r1") return secp224r1(); + if(name == "secp256r1") return secp256r1(); + return null; +} + +module.exports = { + "secp128r1":secp128r1, + "secp160k1":secp160k1, + "secp160r1":secp160r1, + "secp192k1":secp192k1, + "secp192r1":secp192r1, + "secp224r1":secp224r1, + "secp256r1":secp256r1 +} + + +/***/ }), + +/***/ 528: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var once = __nccwpck_require__(38953); + +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; + + +/***/ }), + +/***/ 7011: +/***/ ((module) => { + +"use strict"; + + +var hasOwn = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var defineProperty = Object.defineProperty; +var gOPD = Object.getOwnPropertyDescriptor; + +var isArray = function isArray(arr) { + if (typeof Array.isArray === 'function') { + return Array.isArray(arr); + } + + return toStr.call(arr) === '[object Array]'; +}; + +var isPlainObject = function isPlainObject(obj) { + if (!obj || toStr.call(obj) !== '[object Object]') { + return false; + } + + var hasOwnConstructor = hasOwn.call(obj, 'constructor'); + var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); + // Not own constructor property must be Object + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) { /**/ } + + return typeof key === 'undefined' || hasOwn.call(obj, key); +}; + +// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target +var setProperty = function setProperty(target, options) { + if (defineProperty && options.name === '__proto__') { + defineProperty(target, options.name, { + enumerable: true, + configurable: true, + value: options.newValue, + writable: true + }); + } else { + target[options.name] = options.newValue; + } +}; + +// Return undefined instead of __proto__ if '__proto__' is not an own property +var getProperty = function getProperty(obj, name) { + if (name === '__proto__') { + if (!hasOwn.call(obj, name)) { + return void 0; + } else if (gOPD) { + // In early versions of node, obj['__proto__'] is buggy when obj has + // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. + return gOPD(obj, name).value; + } + } + + return obj[name]; +}; + +module.exports = function extend() { + var options, name, src, copy, copyIsArray, clone; + var target = arguments[0]; + var i = 1; + var length = arguments.length; + var deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { + target = {}; + } + + for (; i < length; ++i) { + options = arguments[i]; + // Only deal with non-null/undefined values + if (options != null) { + // Extend the base object + for (name in options) { + src = getProperty(target, name); + copy = getProperty(options, name); + + // Prevent never-ending loop + if (target !== copy) { + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); + + // Don't bring in undefined values + } else if (typeof copy !== 'undefined') { + setProperty(target, { name: name, newValue: copy }); + } + } + } + } + } + + // Return the modified object + return target; +}; + + +/***/ }), + +/***/ 40122: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +/* + * extsprintf.js: extended POSIX-style sprintf + */ + +var mod_assert = __nccwpck_require__(39491); +var mod_util = __nccwpck_require__(73837); + +/* + * Public interface + */ +exports.sprintf = jsSprintf; +exports.printf = jsPrintf; +exports.fprintf = jsFprintf; + +/* + * Stripped down version of s[n]printf(3c). We make a best effort to throw an + * exception when given a format string we don't understand, rather than + * ignoring it, so that we won't break existing programs if/when we go implement + * the rest of this. + * + * This implementation currently supports specifying + * - field alignment ('-' flag), + * - zero-pad ('0' flag) + * - always show numeric sign ('+' flag), + * - field width + * - conversions for strings, decimal integers, and floats (numbers). + * - argument size specifiers. These are all accepted but ignored, since + * Javascript has no notion of the physical size of an argument. + * + * Everything else is currently unsupported, most notably precision, unsigned + * numbers, non-decimal numbers, and characters. + */ +function jsSprintf(fmt) +{ + var regex = [ + '([^%]*)', /* normal text */ + '%', /* start of format */ + '([\'\\-+ #0]*?)', /* flags (optional) */ + '([1-9]\\d*)?', /* width (optional) */ + '(\\.([1-9]\\d*))?', /* precision (optional) */ + '[lhjztL]*?', /* length mods (ignored) */ + '([diouxXfFeEgGaAcCsSp%jr])' /* conversion */ + ].join(''); + + var re = new RegExp(regex); + var args = Array.prototype.slice.call(arguments, 1); + var flags, width, precision, conversion; + var left, pad, sign, arg, match; + var ret = ''; + var argn = 1; + + mod_assert.equal('string', typeof (fmt)); + + while ((match = re.exec(fmt)) !== null) { + ret += match[1]; + fmt = fmt.substring(match[0].length); + + flags = match[2] || ''; + width = match[3] || 0; + precision = match[4] || ''; + conversion = match[6]; + left = false; + sign = false; + pad = ' '; + + if (conversion == '%') { + ret += '%'; + continue; + } + + if (args.length === 0) + throw (new Error('too few args to sprintf')); + + arg = args.shift(); + argn++; + + if (flags.match(/[\' #]/)) + throw (new Error( + 'unsupported flags: ' + flags)); + + if (precision.length > 0) + throw (new Error( + 'non-zero precision not supported')); + + if (flags.match(/-/)) + left = true; + + if (flags.match(/0/)) + pad = '0'; + + if (flags.match(/\+/)) + sign = true; + + switch (conversion) { + case 's': + if (arg === undefined || arg === null) + throw (new Error('argument ' + argn + + ': attempted to print undefined or null ' + + 'as a string')); + ret += doPad(pad, width, left, arg.toString()); + break; + + case 'd': + arg = Math.floor(arg); + /*jsl:fallthru*/ + case 'f': + sign = sign && arg > 0 ? '+' : ''; + ret += sign + doPad(pad, width, left, + arg.toString()); + break; + + case 'x': + ret += doPad(pad, width, left, arg.toString(16)); + break; + + case 'j': /* non-standard */ + if (width === 0) + width = 10; + ret += mod_util.inspect(arg, false, width); + break; + + case 'r': /* non-standard */ + ret += dumpException(arg); + break; + + default: + throw (new Error('unsupported conversion: ' + + conversion)); + } + } + + ret += fmt; + return (ret); +} + +function jsPrintf() { + var args = Array.prototype.slice.call(arguments); + args.unshift(process.stdout); + jsFprintf.apply(null, args); +} + +function jsFprintf(stream) { + var args = Array.prototype.slice.call(arguments, 1); + return (stream.write(jsSprintf.apply(this, args))); +} + +function doPad(chr, width, left, str) +{ + var ret = str; + + while (ret.length < width) { + if (left) + ret += chr; + else + ret = chr + ret; + } + + return (ret); +} + +/* + * This function dumps long stack traces for exceptions having a cause() method. + * See node-verror for an example. + */ +function dumpException(ex) +{ + var ret; + + if (!(ex instanceof Error)) + throw (new Error(jsSprintf('invalid type for %%r: %j', ex))); + + /* Note that V8 prepends "ex.stack" with ex.toString(). */ + ret = 'EXCEPTION: ' + ex.constructor.name + ': ' + ex.stack; + + if (ex.cause && typeof (ex.cause) === 'function') { + var cex = ex.cause(); + if (cex) { + ret += '\nCaused by: ' + dumpException(cex); + } + } + + return (ret); +} + + +/***/ }), + +/***/ 15784: +/***/ ((module) => { + +"use strict"; + + +// do not edit .js files directly - edit src/index.jst + + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; +}; + + +/***/ }), + +/***/ 61308: +/***/ ((module) => { + +"use strict"; + + +module.exports = function (data, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (node) { + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + if (node === undefined) return; + if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; + if (typeof node !== 'object') return JSON.stringify(node); + + var i, out; + if (Array.isArray(node)) { + out = '['; + for (i = 0; i < node.length; i++) { + if (i) out += ','; + out += stringify(node[i]) || 'null'; + } + return out + ']'; + } + + if (node === null) return 'null'; + + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ''; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node[key]); + + if (!value) continue; + if (out) out += ','; + out += JSON.stringify(key) + ':' + value; + } + seen.splice(seenIndex, 1); + return '{' + out + '}'; + })(data); +}; + + +/***/ }), + +/***/ 65016: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = ForeverAgent +ForeverAgent.SSL = ForeverAgentSSL + +var util = __nccwpck_require__(73837) + , Agent = (__nccwpck_require__(13685).Agent) + , net = __nccwpck_require__(41808) + , tls = __nccwpck_require__(24404) + , AgentSSL = (__nccwpck_require__(95687).Agent) + +function getConnectionName(host, port) { + var name = '' + if (typeof host === 'string') { + name = host + ':' + port + } else { + // For node.js v012.0 and iojs-v1.5.1, host is an object. And any existing localAddress is part of the connection name. + name = host.host + ':' + host.port + ':' + (host.localAddress ? (host.localAddress + ':') : ':') + } + return name +} + +function ForeverAgent(options) { + var self = this + self.options = options || {} + self.requests = {} + self.sockets = {} + self.freeSockets = {} + self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets + self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets + self.on('free', function(socket, host, port) { + var name = getConnectionName(host, port) + + if (self.requests[name] && self.requests[name].length) { + self.requests[name].shift().onSocket(socket) + } else if (self.sockets[name].length < self.minSockets) { + if (!self.freeSockets[name]) self.freeSockets[name] = [] + self.freeSockets[name].push(socket) + + // if an error happens while we don't use the socket anyway, meh, throw the socket away + var onIdleError = function() { + socket.destroy() + } + socket._onIdleError = onIdleError + socket.on('error', onIdleError) + } else { + // If there are no pending requests just destroy the + // socket and it will get removed from the pool. This + // gets us out of timeout issues and allows us to + // default to Connection:keep-alive. + socket.destroy() + } + }) + +} +util.inherits(ForeverAgent, Agent) + +ForeverAgent.defaultMinSockets = 5 + + +ForeverAgent.prototype.createConnection = net.createConnection +ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest +ForeverAgent.prototype.addRequest = function(req, host, port) { + var name = getConnectionName(host, port) + + if (typeof host !== 'string') { + var options = host + port = options.port + host = options.host + } + + if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) { + var idleSocket = this.freeSockets[name].pop() + idleSocket.removeListener('error', idleSocket._onIdleError) + delete idleSocket._onIdleError + req._reusedSocket = true + req.onSocket(idleSocket) + } else { + this.addRequestNoreuse(req, host, port) + } +} + +ForeverAgent.prototype.removeSocket = function(s, name, host, port) { + if (this.sockets[name]) { + var index = this.sockets[name].indexOf(s) + if (index !== -1) { + this.sockets[name].splice(index, 1) + } + } else if (this.sockets[name] && this.sockets[name].length === 0) { + // don't leak + delete this.sockets[name] + delete this.requests[name] + } + + if (this.freeSockets[name]) { + var index = this.freeSockets[name].indexOf(s) + if (index !== -1) { + this.freeSockets[name].splice(index, 1) + if (this.freeSockets[name].length === 0) { + delete this.freeSockets[name] + } + } + } + + if (this.requests[name] && this.requests[name].length) { + // 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(name, host, port).emit('free') + } +} + +function ForeverAgentSSL (options) { + ForeverAgent.call(this, options) +} +util.inherits(ForeverAgentSSL, ForeverAgent) + +ForeverAgentSSL.prototype.createConnection = createConnectionSSL +ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest + +function createConnectionSSL (port, host, options) { + if (typeof port === 'object') { + options = port; + } else if (typeof host === 'object') { + options = host; + } else if (typeof options === 'object') { + options = options; + } else { + options = {}; + } + + if (typeof port === 'number') { + options.port = port; + } + + if (typeof host === 'string') { + options.host = host; + } + + return tls.connect(options); +} + + +/***/ }), + +/***/ 54550: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var CombinedStream = __nccwpck_require__(93324); +var util = __nccwpck_require__(73837); +var path = __nccwpck_require__(71017); +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var parseUrl = (__nccwpck_require__(57310).parse); +var fs = __nccwpck_require__(57147); +var mime = __nccwpck_require__(38098); +var asynckit = __nccwpck_require__(65261); +var populate = __nccwpck_require__(60306); + +// Public API +module.exports = FormData; + +// make it a Stream +util.inherits(FormData, CombinedStream); + +/** + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + */ +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(); + } + + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; + for (var option in options) { + this[option] = options[option]; + } +} + +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +FormData.prototype.append = function(field, value, options) { + + options = options || {}; + + // allow filename as single option + if (typeof options == 'string') { + options = {filename: options}; + } + + var append = CombinedStream.prototype.append.bind(this); + + // all that streamy business can't handle numbers + if (typeof value == 'number') { + value = '' + value; + } + + // https://github.com/felixge/node-form-data/issues/38 + if (util.isArray(value)) { + // Please convert your array into string + // the way web server expects it + this._error(new Error('Arrays are not supported.')); + return; + } + + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + + append(header); + append(value); + append(footer); + + // pass along options.knownLength + this._trackLength(header, value, options); +}; + +FormData.prototype._trackLength = function(header, value, options) { + var valueLength = 0; + + // used w/ getLengthSync(), when length is known. + // e.g. for streaming directly from a remote server, + // w/ a known file a size, and not wanting to wait for + // incoming file to finish to get its size. + if (options.knownLength != null) { + valueLength += +options.knownLength; + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } + + this._valueLength += valueLength; + + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += + Buffer.byteLength(header) + + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response + if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) { + return; + } + + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; + +FormData.prototype._lengthRetriever = function(value, callback) { + + if (value.hasOwnProperty('fd')) { + + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function(err, stat) { + + var fileSize; + + if (err) { + callback(err); + return; + } + + // update final size based on the range options + fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); + } + + // or http response + } else if (value.hasOwnProperty('httpVersion')) { + callback(null, +value.headers['content-length']); + + // or request stream http://github.com/mikeal/request + } else if (value.hasOwnProperty('httpModule')) { + // wait till response come back + value.on('response', function(response) { + value.pause(); + callback(null, +response.headers['content-length']); + }); + value.resume(); + + // something else + } else { + callback('Unknown stream'); + } +}; + +FormData.prototype._multiPartHeader = function(field, value, options) { + // custom header specified (as string)? + // it becomes responsible for boundary + // (e.g. to handle extra CRLFs on .NET servers) + if (typeof options.header == 'string') { + return options.header; + } + + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; + + // allow custom headers. + if (typeof options.header == 'object') { + populate(headers, options.header); + } + + var header; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; + + // skip nullish headers. + if (header == null) { + continue; + } + + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } + } + + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; + +FormData.prototype._getContentDisposition = function(value, options) { + + var filename + , contentDisposition + ; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path); + } + + if (filename) { + contentDisposition = 'filename="' + filename + '"'; + } + + return contentDisposition; +}; + +FormData.prototype._getContentType = function(value, options) { + + // use custom content-type above all + var contentType = options.contentType; + + // or try `name` from formidable, browser + if (!contentType && value.name) { + contentType = mime.lookup(value.name); + } + + // or try `path` from fs-, request- streams + if (!contentType && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && typeof value == 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + + return contentType; +}; + +FormData.prototype._multiPartFooter = function() { + return function(next) { + var footer = FormData.LINE_BREAK; + + var lastPart = (this._streams.length === 0); + if (lastPart) { + footer += this._lastBoundary(); + } + + next(footer); + }.bind(this); +}; + +FormData.prototype._lastBoundary = function() { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; + +FormData.prototype.getHeaders = function(userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; + + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; + } + } + + return formHeaders; +}; + +FormData.prototype.getBoundary = function() { + if (!this._boundary) { + this._generateBoundary(); + } + + return this._boundary; +}; + +FormData.prototype._generateBoundary = function() { + // This generates a 50 character boundary similar to those used by Firefox. + // They are optimized for boyer-moore parsing. + var boundary = '--------------------------'; + for (var i = 0; i < 24; i++) { + boundary += Math.floor(Math.random() * 10).toString(16); + } + + this._boundary = boundary; +}; + +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually +// and add it as knownLength option +FormData.prototype.getLengthSync = function() { + var knownLength = this._overheadLength + this._valueLength; + + // Don't get confused, there are 3 "internal" streams for each keyval pair + // so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + // Some async length retrievers are present + // therefore synchronous length calculation is false. + // Please use getLength(callback) to get proper length + this._error(new Error('Cannot calculate proper length in synchronous way.')); + } + + return knownLength; +}; + +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function() { + var hasKnownLength = true; + + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } + + return hasKnownLength; +}; + +FormData.prototype.getLength = function(cb) { + var knownLength = this._overheadLength + this._valueLength; + + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + if (err) { + cb(err); + return; + } + + values.forEach(function(length) { + knownLength += length; + }); + + cb(null, knownLength); + }); +}; + +FormData.prototype.submit = function(params, cb) { + var request + , options + , defaults = {method: 'post'} + ; + + // parse provided url if it's string + // or treat it as options object + if (typeof params == 'string') { + + params = parseUrl(params); + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + + // use custom params + } else { + + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol == 'https:' ? 443 : 80; + } + } + + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol == 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + this.pipe(request); + if (cb) { + request.on('error', cb); + request.on('response', cb.bind(this, null)); + } + }.bind(this)); + + return request; +}; + +FormData.prototype._error = function(err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); + } +}; + +FormData.prototype.toString = function () { + return '[object FormData]'; +}; + + +/***/ }), + +/***/ 60306: +/***/ ((module) => { + +// populates missing values +module.exports = function(dst, src) { + + Object.keys(src).forEach(function(prop) + { + dst[prop] = dst[prop] || src[prop]; + }); + + return dst; +}; + + +/***/ }), + +/***/ 99612: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +const MiniPass = __nccwpck_require__(27948) +const EE = (__nccwpck_require__(82361).EventEmitter) +const fs = __nccwpck_require__(57147) + +let writev = fs.writev +/* istanbul ignore next */ +if (!writev) { + // This entire block can be removed if support for earlier than Node.js + // 12.9.0 is not needed. + const binding = process.binding('fs') + const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback + + writev = (fd, iovec, pos, cb) => { + const done = (er, bw) => cb(er, bw, iovec) + const req = new FSReqWrap() + req.oncomplete = done + binding.writeBuffers(fd, iovec, pos, req) + } +} + +const _autoClose = Symbol('_autoClose') +const _close = Symbol('_close') +const _ended = Symbol('_ended') +const _fd = Symbol('_fd') +const _finished = Symbol('_finished') +const _flags = Symbol('_flags') +const _flush = Symbol('_flush') +const _handleChunk = Symbol('_handleChunk') +const _makeBuf = Symbol('_makeBuf') +const _mode = Symbol('_mode') +const _needDrain = Symbol('_needDrain') +const _onerror = Symbol('_onerror') +const _onopen = Symbol('_onopen') +const _onread = Symbol('_onread') +const _onwrite = Symbol('_onwrite') +const _open = Symbol('_open') +const _path = Symbol('_path') +const _pos = Symbol('_pos') +const _queue = Symbol('_queue') +const _read = Symbol('_read') +const _readSize = Symbol('_readSize') +const _reading = Symbol('_reading') +const _remain = Symbol('_remain') +const _size = Symbol('_size') +const _write = Symbol('_write') +const _writing = Symbol('_writing') +const _defaultFlag = Symbol('_defaultFlag') +const _errored = Symbol('_errored') + +class ReadStream extends MiniPass { + constructor (path, opt) { + opt = opt || {} + super(opt) + + this.readable = true + this.writable = false + + if (typeof path !== 'string') + throw new TypeError('path must be a string') + + this[_errored] = false + this[_fd] = typeof opt.fd === 'number' ? opt.fd : null + this[_path] = path + this[_readSize] = opt.readSize || 16*1024*1024 + this[_reading] = false + this[_size] = typeof opt.size === 'number' ? opt.size : Infinity + this[_remain] = this[_size] + this[_autoClose] = typeof opt.autoClose === 'boolean' ? + opt.autoClose : true + + if (typeof this[_fd] === 'number') + this[_read]() + else + this[_open]() + } + + get fd () { return this[_fd] } + get path () { return this[_path] } + + write () { + throw new TypeError('this is a readable stream') + } + + end () { + throw new TypeError('this is a readable stream') + } + + [_open] () { + fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)) + } + + [_onopen] (er, fd) { + if (er) + this[_onerror](er) + else { + this[_fd] = fd + this.emit('open', fd) + this[_read]() + } + } + + [_makeBuf] () { + return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])) + } + + [_read] () { + if (!this[_reading]) { + this[_reading] = true + const buf = this[_makeBuf]() + /* istanbul ignore if */ + if (buf.length === 0) + return process.nextTick(() => this[_onread](null, 0, buf)) + fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) => + this[_onread](er, br, buf)) + } + } + + [_onread] (er, br, buf) { + this[_reading] = false + if (er) + this[_onerror](er) + else if (this[_handleChunk](br, buf)) + this[_read]() + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd] + this[_fd] = null + fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) + } + } + + [_onerror] (er) { + this[_reading] = true + this[_close]() + this.emit('error', er) + } + + [_handleChunk] (br, buf) { + let ret = false + // no effect if infinite + this[_remain] -= br + if (br > 0) + ret = super.write(br < buf.length ? buf.slice(0, br) : buf) + + if (br === 0 || this[_remain] <= 0) { + ret = false + this[_close]() + super.end() + } + + return ret + } + + emit (ev, data) { + switch (ev) { + case 'prefinish': + case 'finish': + break + + case 'drain': + if (typeof this[_fd] === 'number') + this[_read]() + break + + case 'error': + if (this[_errored]) + return + this[_errored] = true + return super.emit(ev, data) + + default: + return super.emit(ev, data) + } + } +} + +class ReadStreamSync extends ReadStream { + [_open] () { + let threw = true + try { + this[_onopen](null, fs.openSync(this[_path], 'r')) + threw = false + } finally { + if (threw) + this[_close]() + } + } + + [_read] () { + let threw = true + try { + if (!this[_reading]) { + this[_reading] = true + do { + const buf = this[_makeBuf]() + /* istanbul ignore next */ + const br = buf.length === 0 ? 0 + : fs.readSync(this[_fd], buf, 0, buf.length, null) + if (!this[_handleChunk](br, buf)) + break + } while (true) + this[_reading] = false + } + threw = false + } finally { + if (threw) + this[_close]() + } + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd] + this[_fd] = null + fs.closeSync(fd) + this.emit('close') + } + } +} + +class WriteStream extends EE { + constructor (path, opt) { + opt = opt || {} + super(opt) + this.readable = false + this.writable = true + this[_errored] = false + this[_writing] = false + this[_ended] = false + this[_needDrain] = false + this[_queue] = [] + this[_path] = path + this[_fd] = typeof opt.fd === 'number' ? opt.fd : null + this[_mode] = opt.mode === undefined ? 0o666 : opt.mode + this[_pos] = typeof opt.start === 'number' ? opt.start : null + this[_autoClose] = typeof opt.autoClose === 'boolean' ? + opt.autoClose : true + + // truncating makes no sense when writing into the middle + const defaultFlag = this[_pos] !== null ? 'r+' : 'w' + this[_defaultFlag] = opt.flags === undefined + this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags + + if (this[_fd] === null) + this[_open]() + } + + emit (ev, data) { + if (ev === 'error') { + if (this[_errored]) + return + this[_errored] = true + } + return super.emit(ev, data) + } + + + get fd () { return this[_fd] } + get path () { return this[_path] } + + [_onerror] (er) { + this[_close]() + this[_writing] = true + this.emit('error', er) + } + + [_open] () { + fs.open(this[_path], this[_flags], this[_mode], + (er, fd) => this[_onopen](er, fd)) + } + + [_onopen] (er, fd) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && er.code === 'ENOENT') { + this[_flags] = 'w' + this[_open]() + } else if (er) + this[_onerror](er) + else { + this[_fd] = fd + this.emit('open', fd) + this[_flush]() + } + } + + end (buf, enc) { + if (buf) + this.write(buf, enc) + + this[_ended] = true + + // synthetic after-write logic, where drain/finish live + if (!this[_writing] && !this[_queue].length && + typeof this[_fd] === 'number') + this[_onwrite](null, 0) + return this + } + + write (buf, enc) { + if (typeof buf === 'string') + buf = Buffer.from(buf, enc) + + if (this[_ended]) { + this.emit('error', new Error('write() after end()')) + return false + } + + if (this[_fd] === null || this[_writing] || this[_queue].length) { + this[_queue].push(buf) + this[_needDrain] = true + return false + } + + this[_writing] = true + this[_write](buf) + return true + } + + [_write] (buf) { + fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => + this[_onwrite](er, bw)) + } + + [_onwrite] (er, bw) { + if (er) + this[_onerror](er) + else { + if (this[_pos] !== null) + this[_pos] += bw + if (this[_queue].length) + this[_flush]() + else { + this[_writing] = false + + if (this[_ended] && !this[_finished]) { + this[_finished] = true + this[_close]() + this.emit('finish') + } else if (this[_needDrain]) { + this[_needDrain] = false + this.emit('drain') + } + } + } + } + + [_flush] () { + if (this[_queue].length === 0) { + if (this[_ended]) + this[_onwrite](null, 0) + } else if (this[_queue].length === 1) + this[_write](this[_queue].pop()) + else { + const iovec = this[_queue] + this[_queue] = [] + writev(this[_fd], iovec, this[_pos], + (er, bw) => this[_onwrite](er, bw)) + } + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd] + this[_fd] = null + fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) + } + } +} + +class WriteStreamSync extends WriteStream { + [_open] () { + let fd + // only wrap in a try{} block if we know we'll retry, to avoid + // the rethrow obscuring the error's source frame in most cases. + if (this[_defaultFlag] && this[_flags] === 'r+') { + try { + fd = fs.openSync(this[_path], this[_flags], this[_mode]) + } catch (er) { + if (er.code === 'ENOENT') { + this[_flags] = 'w' + return this[_open]() + } else + throw er + } + } else + fd = fs.openSync(this[_path], this[_flags], this[_mode]) + + this[_onopen](null, fd) + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd] + this[_fd] = null + fs.closeSync(fd) + this.emit('close') + } + } + + [_write] (buf) { + // throw the original, but try to close if it fails + let threw = true + try { + this[_onwrite](null, + fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos])) + threw = false + } finally { + if (threw) + try { this[_close]() } catch (_) {} + } + } +} + +exports.ReadStream = ReadStream +exports.ReadStreamSync = ReadStreamSync + +exports.WriteStream = WriteStream +exports.WriteStreamSync = WriteStreamSync + + +/***/ }), + +/***/ 47633: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = __nccwpck_require__(57147) +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = __nccwpck_require__(33217) + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} + + +/***/ }), + +/***/ 33217: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var pathModule = __nccwpck_require__(71017); +var isWindows = process.platform === 'win32'; +var fs = __nccwpck_require__(57147); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; + + +/***/ }), + +/***/ 81105: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = __nccwpck_require__(71017) +var minimatch = __nccwpck_require__(32959) +var isAbsolute = __nccwpck_require__(53317) +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + self.absolute = !!options.absolute + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + + +/***/ }), + +/***/ 65811: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = __nccwpck_require__(57147) +var rp = __nccwpck_require__(47633) +var minimatch = __nccwpck_require__(32959) +var Minimatch = minimatch.Minimatch +var inherits = __nccwpck_require__(30522) +var EE = (__nccwpck_require__(82361).EventEmitter) +var path = __nccwpck_require__(71017) +var assert = __nccwpck_require__(39491) +var isAbsolute = __nccwpck_require__(53317) +var globSync = __nccwpck_require__(76680) +var common = __nccwpck_require__(81105) +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = __nccwpck_require__(26214) +var util = __nccwpck_require__(73837) +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = __nccwpck_require__(38953) + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + + if (!pattern) + return false + + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + this._processing = 0 + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + rp.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = isAbsolute(e) ? e : this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er && er.code === 'ENOENT') + return cb() + + var isSym = lstat && lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) + return cb(null, false, stat) + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return cb() + + return cb(null, c, stat) +} + + +/***/ }), + +/***/ 76680: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = __nccwpck_require__(57147) +var rp = __nccwpck_require__(47633) +var minimatch = __nccwpck_require__(32959) +var Minimatch = minimatch.Minimatch +var Glob = (__nccwpck_require__(65811).Glob) +var util = __nccwpck_require__(73837) +var path = __nccwpck_require__(71017) +var assert = __nccwpck_require__(39491) +var isAbsolute = __nccwpck_require__(53317) +var common = __nccwpck_require__(81105) +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = rp.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return + + var abs = this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) { + e = abs + } + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } + + var isSym = lstat && lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + + +/***/ }), + +/***/ 8810: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const types_1 = __nccwpck_require__(26419); +function createRejection(error, ...beforeErrorGroups) { + const promise = (async () => { + if (error instanceof types_1.RequestError) { + try { + for (const hooks of beforeErrorGroups) { + if (hooks) { + for (const hook of hooks) { + // eslint-disable-next-line no-await-in-loop + error = await hook(error); + } + } + } + } + catch (error_) { + error = error_; + } + } + throw error; + })(); + const returnPromise = () => promise; + promise.json = returnPromise; + promise.text = returnPromise; + promise.buffer = returnPromise; + promise.on = returnPromise; + return promise; +} +exports["default"] = createRejection; + + +/***/ }), + +/***/ 25300: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const events_1 = __nccwpck_require__(82361); +const is_1 = __nccwpck_require__(59966); +const PCancelable = __nccwpck_require__(18502); +const types_1 = __nccwpck_require__(26419); +const parse_body_1 = __nccwpck_require__(86690); +const core_1 = __nccwpck_require__(9284); +const proxy_events_1 = __nccwpck_require__(50410); +const get_buffer_1 = __nccwpck_require__(1249); +const is_response_ok_1 = __nccwpck_require__(39307); +const proxiedRequestEvents = [ + 'request', + 'response', + 'redirect', + 'uploadProgress', + 'downloadProgress' +]; +function asPromise(normalizedOptions) { + let globalRequest; + let globalResponse; + const emitter = new events_1.EventEmitter(); + const promise = new PCancelable((resolve, reject, onCancel) => { + const makeRequest = (retryCount) => { + const request = new core_1.default(undefined, normalizedOptions); + request.retryCount = retryCount; + request._noPipe = true; + onCancel(() => request.destroy()); + onCancel.shouldReject = false; + onCancel(() => reject(new types_1.CancelError(request))); + globalRequest = request; + request.once('response', async (response) => { + var _a; + response.retryCount = retryCount; + if (response.request.aborted) { + // Canceled while downloading - will throw a `CancelError` or `TimeoutError` error + return; + } + // Download body + let rawBody; + try { + rawBody = await get_buffer_1.default(request); + response.rawBody = rawBody; + } + catch (_b) { + // The same error is caught below. + // See request.once('error') + return; + } + if (request._isAboutToError) { + return; + } + // Parse body + const contentEncoding = ((_a = response.headers['content-encoding']) !== null && _a !== void 0 ? _a : '').toLowerCase(); + const isCompressed = ['gzip', 'deflate', 'br'].includes(contentEncoding); + const { options } = request; + if (isCompressed && !options.decompress) { + response.body = rawBody; + } + else { + try { + response.body = parse_body_1.default(response, options.responseType, options.parseJson, options.encoding); + } + catch (error) { + // Fallback to `utf8` + response.body = rawBody.toString(); + if (is_response_ok_1.isResponseOk(response)) { + request._beforeError(error); + return; + } + } + } + try { + for (const [index, hook] of options.hooks.afterResponse.entries()) { + // @ts-expect-error TS doesn't notice that CancelableRequest is a Promise + // eslint-disable-next-line no-await-in-loop + response = await hook(response, async (updatedOptions) => { + const typedOptions = core_1.default.normalizeArguments(undefined, { + ...updatedOptions, + retry: { + calculateDelay: () => 0 + }, + throwHttpErrors: false, + resolveBodyOnly: false + }, options); + // Remove any further hooks for that request, because we'll call them anyway. + // The loop continues. We don't want duplicates (asPromise recursion). + typedOptions.hooks.afterResponse = typedOptions.hooks.afterResponse.slice(0, index); + for (const hook of typedOptions.hooks.beforeRetry) { + // eslint-disable-next-line no-await-in-loop + await hook(typedOptions); + } + const promise = asPromise(typedOptions); + onCancel(() => { + promise.catch(() => { }); + promise.cancel(); + }); + return promise; + }); + } + } + catch (error) { + request._beforeError(new types_1.RequestError(error.message, error, request)); + return; + } + if (!is_response_ok_1.isResponseOk(response)) { + request._beforeError(new types_1.HTTPError(response)); + return; + } + globalResponse = response; + resolve(request.options.resolveBodyOnly ? response.body : response); + }); + const onError = (error) => { + if (promise.isCanceled) { + return; + } + const { options } = request; + if (error instanceof types_1.HTTPError && !options.throwHttpErrors) { + const { response } = error; + resolve(request.options.resolveBodyOnly ? response.body : response); + return; + } + reject(error); + }; + request.once('error', onError); + const previousBody = request.options.body; + request.once('retry', (newRetryCount, error) => { + var _a, _b; + if (previousBody === ((_a = error.request) === null || _a === void 0 ? void 0 : _a.options.body) && is_1.default.nodeStream((_b = error.request) === null || _b === void 0 ? void 0 : _b.options.body)) { + onError(error); + return; + } + makeRequest(newRetryCount); + }); + proxy_events_1.default(request, emitter, proxiedRequestEvents); + }; + makeRequest(0); + }); + promise.on = (event, fn) => { + emitter.on(event, fn); + return promise; + }; + const shortcut = (responseType) => { + const newPromise = (async () => { + // Wait until downloading has ended + await promise; + const { options } = globalResponse.request; + return parse_body_1.default(globalResponse, responseType, options.parseJson, options.encoding); + })(); + Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promise)); + return newPromise; + }; + promise.json = () => { + const { headers } = globalRequest.options; + if (!globalRequest.writableFinished && headers.accept === undefined) { + headers.accept = 'application/json'; + } + return shortcut('json'); + }; + promise.buffer = () => shortcut('buffer'); + promise.text = () => shortcut('text'); + return promise; +} +exports["default"] = asPromise; +__exportStar(__nccwpck_require__(26419), exports); + + +/***/ }), + +/***/ 21074: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const is_1 = __nccwpck_require__(59966); +const normalizeArguments = (options, defaults) => { + if (is_1.default.null_(options.encoding)) { + throw new TypeError('To get a Buffer, set `options.responseType` to `buffer` instead'); + } + is_1.assert.any([is_1.default.string, is_1.default.undefined], options.encoding); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.resolveBodyOnly); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.methodRewriting); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.isStream); + is_1.assert.any([is_1.default.string, is_1.default.undefined], options.responseType); + // `options.responseType` + if (options.responseType === undefined) { + options.responseType = 'text'; + } + // `options.retry` + const { retry } = options; + if (defaults) { + options.retry = { ...defaults.retry }; + } + else { + options.retry = { + calculateDelay: retryObject => retryObject.computedValue, + limit: 0, + methods: [], + statusCodes: [], + errorCodes: [], + maxRetryAfter: undefined + }; + } + if (is_1.default.object(retry)) { + options.retry = { + ...options.retry, + ...retry + }; + options.retry.methods = [...new Set(options.retry.methods.map(method => method.toUpperCase()))]; + options.retry.statusCodes = [...new Set(options.retry.statusCodes)]; + options.retry.errorCodes = [...new Set(options.retry.errorCodes)]; + } + else if (is_1.default.number(retry)) { + options.retry.limit = retry; + } + if (is_1.default.undefined(options.retry.maxRetryAfter)) { + options.retry.maxRetryAfter = Math.min( + // TypeScript is not smart enough to handle `.filter(x => is.number(x))`. + // eslint-disable-next-line unicorn/no-fn-reference-in-iterator + ...[options.timeout.request, options.timeout.connect].filter(is_1.default.number)); + } + // `options.pagination` + if (is_1.default.object(options.pagination)) { + if (defaults) { + options.pagination = { + ...defaults.pagination, + ...options.pagination + }; + } + const { pagination } = options; + if (!is_1.default.function_(pagination.transform)) { + throw new Error('`options.pagination.transform` must be implemented'); + } + if (!is_1.default.function_(pagination.shouldContinue)) { + throw new Error('`options.pagination.shouldContinue` must be implemented'); + } + if (!is_1.default.function_(pagination.filter)) { + throw new TypeError('`options.pagination.filter` must be implemented'); + } + if (!is_1.default.function_(pagination.paginate)) { + throw new Error('`options.pagination.paginate` must be implemented'); + } + } + // JSON mode + if (options.responseType === 'json' && options.headers.accept === undefined) { + options.headers.accept = 'application/json'; + } + return options; +}; +exports["default"] = normalizeArguments; + + +/***/ }), + +/***/ 86690: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const types_1 = __nccwpck_require__(26419); +const parseBody = (response, responseType, parseJson, encoding) => { + const { rawBody } = response; + try { + if (responseType === 'text') { + return rawBody.toString(encoding); + } + if (responseType === 'json') { + return rawBody.length === 0 ? '' : parseJson(rawBody.toString()); + } + if (responseType === 'buffer') { + return rawBody; + } + throw new types_1.ParseError({ + message: `Unknown body type '${responseType}'`, + name: 'Error' + }, response); + } + catch (error) { + throw new types_1.ParseError(error, response); + } +}; +exports["default"] = parseBody; + + +/***/ }), + +/***/ 26419: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CancelError = exports.ParseError = void 0; +const core_1 = __nccwpck_require__(9284); +/** +An error to be thrown when server response code is 2xx, and parsing body fails. +Includes a `response` property. +*/ +class ParseError extends core_1.RequestError { + constructor(error, response) { + const { options } = response.request; + super(`${error.message} in "${options.url.toString()}"`, error, response.request); + this.name = 'ParseError'; + } +} +exports.ParseError = ParseError; +/** +An error to be thrown when the request is aborted with `.cancel()`. +*/ +class CancelError extends core_1.RequestError { + constructor(request) { + super('Promise was canceled', {}, request); + this.name = 'CancelError'; + } + get isCanceled() { + return true; + } +} +exports.CancelError = CancelError; +__exportStar(__nccwpck_require__(9284), exports); + + +/***/ }), + +/***/ 26916: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.retryAfterStatusCodes = void 0; +exports.retryAfterStatusCodes = new Set([413, 429, 503]); +const calculateRetryDelay = ({ attemptCount, retryOptions, error, retryAfter }) => { + if (attemptCount > retryOptions.limit) { + return 0; + } + const hasMethod = retryOptions.methods.includes(error.options.method); + const hasErrorCode = retryOptions.errorCodes.includes(error.code); + const hasStatusCode = error.response && retryOptions.statusCodes.includes(error.response.statusCode); + if (!hasMethod || (!hasErrorCode && !hasStatusCode)) { + return 0; + } + if (error.response) { + if (retryAfter) { + if (retryOptions.maxRetryAfter === undefined || retryAfter > retryOptions.maxRetryAfter) { + return 0; + } + return retryAfter; + } + if (error.response.statusCode === 413) { + return 0; + } + } + const noise = Math.random() * 100; + return ((2 ** (attemptCount - 1)) * 1000) + noise; +}; +exports["default"] = calculateRetryDelay; + + +/***/ }), + +/***/ 9284: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UnsupportedProtocolError = exports.ReadError = exports.TimeoutError = exports.UploadError = exports.CacheError = exports.HTTPError = exports.MaxRedirectsError = exports.RequestError = exports.setNonEnumerableProperties = exports.knownHookEvents = exports.withoutBody = exports.kIsNormalizedAlready = void 0; +const util_1 = __nccwpck_require__(73837); +const stream_1 = __nccwpck_require__(12781); +const fs_1 = __nccwpck_require__(57147); +const url_1 = __nccwpck_require__(57310); +const http = __nccwpck_require__(13685); +const http_1 = __nccwpck_require__(13685); +const https = __nccwpck_require__(95687); +const http_timer_1 = __nccwpck_require__(45978); +const cacheable_lookup_1 = __nccwpck_require__(92702); +const CacheableRequest = __nccwpck_require__(23082); +const decompressResponse = __nccwpck_require__(6133); +// @ts-expect-error Missing types +const http2wrapper = __nccwpck_require__(56728); +const lowercaseKeys = __nccwpck_require__(29955); +const is_1 = __nccwpck_require__(59966); +const get_body_size_1 = __nccwpck_require__(41241); +const is_form_data_1 = __nccwpck_require__(81812); +const proxy_events_1 = __nccwpck_require__(50410); +const timed_out_1 = __nccwpck_require__(69628); +const url_to_options_1 = __nccwpck_require__(96958); +const options_to_url_1 = __nccwpck_require__(41914); +const weakable_map_1 = __nccwpck_require__(19207); +const get_buffer_1 = __nccwpck_require__(1249); +const dns_ip_version_1 = __nccwpck_require__(22844); +const is_response_ok_1 = __nccwpck_require__(39307); +const deprecation_warning_1 = __nccwpck_require__(81757); +const normalize_arguments_1 = __nccwpck_require__(21074); +const calculate_retry_delay_1 = __nccwpck_require__(26916); +let globalDnsCache; +const kRequest = Symbol('request'); +const kResponse = Symbol('response'); +const kResponseSize = Symbol('responseSize'); +const kDownloadedSize = Symbol('downloadedSize'); +const kBodySize = Symbol('bodySize'); +const kUploadedSize = Symbol('uploadedSize'); +const kServerResponsesPiped = Symbol('serverResponsesPiped'); +const kUnproxyEvents = Symbol('unproxyEvents'); +const kIsFromCache = Symbol('isFromCache'); +const kCancelTimeouts = Symbol('cancelTimeouts'); +const kStartedReading = Symbol('startedReading'); +const kStopReading = Symbol('stopReading'); +const kTriggerRead = Symbol('triggerRead'); +const kBody = Symbol('body'); +const kJobs = Symbol('jobs'); +const kOriginalResponse = Symbol('originalResponse'); +const kRetryTimeout = Symbol('retryTimeout'); +exports.kIsNormalizedAlready = Symbol('isNormalizedAlready'); +const supportsBrotli = is_1.default.string(process.versions.brotli); +exports.withoutBody = new Set(['GET', 'HEAD']); +exports.knownHookEvents = [ + 'init', + 'beforeRequest', + 'beforeRedirect', + 'beforeError', + 'beforeRetry', + // Promise-Only + 'afterResponse' +]; +function validateSearchParameters(searchParameters) { + // eslint-disable-next-line guard-for-in + for (const key in searchParameters) { + const value = searchParameters[key]; + if (!is_1.default.string(value) && !is_1.default.number(value) && !is_1.default.boolean(value) && !is_1.default.null_(value) && !is_1.default.undefined(value)) { + throw new TypeError(`The \`searchParams\` value '${String(value)}' must be a string, number, boolean or null`); + } + } +} +function isClientRequest(clientRequest) { + return is_1.default.object(clientRequest) && !('statusCode' in clientRequest); +} +const cacheableStore = new weakable_map_1.default(); +const waitForOpenFile = async (file) => new Promise((resolve, reject) => { + const onError = (error) => { + reject(error); + }; + // Node.js 12 has incomplete types + if (!file.pending) { + resolve(); + } + file.once('error', onError); + file.once('ready', () => { + file.off('error', onError); + resolve(); + }); +}); +const redirectCodes = new Set([300, 301, 302, 303, 304, 307, 308]); +const nonEnumerableProperties = [ + 'context', + 'body', + 'json', + 'form' +]; +exports.setNonEnumerableProperties = (sources, to) => { + // Non enumerable properties shall not be merged + const properties = {}; + for (const source of sources) { + if (!source) { + continue; + } + for (const name of nonEnumerableProperties) { + if (!(name in source)) { + continue; + } + properties[name] = { + writable: true, + configurable: true, + enumerable: false, + // @ts-expect-error TS doesn't see the check above + value: source[name] + }; + } + } + Object.defineProperties(to, properties); +}; +/** +An error to be thrown when a request fails. +Contains a `code` property with error class code, like `ECONNREFUSED`. +*/ +class RequestError extends Error { + constructor(message, error, self) { + var _a; + super(message); + Error.captureStackTrace(this, this.constructor); + this.name = 'RequestError'; + this.code = error.code; + if (self instanceof Request) { + Object.defineProperty(this, 'request', { + enumerable: false, + value: self + }); + Object.defineProperty(this, 'response', { + enumerable: false, + value: self[kResponse] + }); + Object.defineProperty(this, 'options', { + // This fails because of TS 3.7.2 useDefineForClassFields + // Ref: https://github.com/microsoft/TypeScript/issues/34972 + enumerable: false, + value: self.options + }); + } + else { + Object.defineProperty(this, 'options', { + // This fails because of TS 3.7.2 useDefineForClassFields + // Ref: https://github.com/microsoft/TypeScript/issues/34972 + enumerable: false, + value: self + }); + } + this.timings = (_a = this.request) === null || _a === void 0 ? void 0 : _a.timings; + // Recover the original stacktrace + if (is_1.default.string(error.stack) && is_1.default.string(this.stack)) { + const indexOfMessage = this.stack.indexOf(this.message) + this.message.length; + const thisStackTrace = this.stack.slice(indexOfMessage).split('\n').reverse(); + const errorStackTrace = error.stack.slice(error.stack.indexOf(error.message) + error.message.length).split('\n').reverse(); + // Remove duplicated traces + while (errorStackTrace.length !== 0 && errorStackTrace[0] === thisStackTrace[0]) { + thisStackTrace.shift(); + } + this.stack = `${this.stack.slice(0, indexOfMessage)}${thisStackTrace.reverse().join('\n')}${errorStackTrace.reverse().join('\n')}`; + } + } +} +exports.RequestError = RequestError; +/** +An error to be thrown when the server redirects you more than ten times. +Includes a `response` property. +*/ +class MaxRedirectsError extends RequestError { + constructor(request) { + super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request); + this.name = 'MaxRedirectsError'; + } +} +exports.MaxRedirectsError = MaxRedirectsError; +/** +An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304. +Includes a `response` property. +*/ +class HTTPError extends RequestError { + constructor(response) { + super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request); + this.name = 'HTTPError'; + } +} +exports.HTTPError = HTTPError; +/** +An error to be thrown when a cache method fails. +For example, if the database goes down or there's a filesystem error. +*/ +class CacheError extends RequestError { + constructor(error, request) { + super(error.message, error, request); + this.name = 'CacheError'; + } +} +exports.CacheError = CacheError; +/** +An error to be thrown when the request body is a stream and an error occurs while reading from that stream. +*/ +class UploadError extends RequestError { + constructor(error, request) { + super(error.message, error, request); + this.name = 'UploadError'; + } +} +exports.UploadError = UploadError; +/** +An error to be thrown when the request is aborted due to a timeout. +Includes an `event` and `timings` property. +*/ +class TimeoutError extends RequestError { + constructor(error, timings, request) { + super(error.message, error, request); + this.name = 'TimeoutError'; + this.event = error.event; + this.timings = timings; + } +} +exports.TimeoutError = TimeoutError; +/** +An error to be thrown when reading from response stream fails. +*/ +class ReadError extends RequestError { + constructor(error, request) { + super(error.message, error, request); + this.name = 'ReadError'; + } +} +exports.ReadError = ReadError; +/** +An error to be thrown when given an unsupported protocol. +*/ +class UnsupportedProtocolError extends RequestError { + constructor(options) { + super(`Unsupported protocol "${options.url.protocol}"`, {}, options); + this.name = 'UnsupportedProtocolError'; + } +} +exports.UnsupportedProtocolError = UnsupportedProtocolError; +const proxiedRequestEvents = [ + 'socket', + 'connect', + 'continue', + 'information', + 'upgrade', + 'timeout' +]; +class Request extends stream_1.Duplex { + constructor(url, options = {}, defaults) { + super({ + // This must be false, to enable throwing after destroy + // It is used for retry logic in Promise API + autoDestroy: false, + // It needs to be zero because we're just proxying the data to another stream + highWaterMark: 0 + }); + this[kDownloadedSize] = 0; + this[kUploadedSize] = 0; + this.requestInitialized = false; + this[kServerResponsesPiped] = new Set(); + this.redirects = []; + this[kStopReading] = false; + this[kTriggerRead] = false; + this[kJobs] = []; + this.retryCount = 0; + // TODO: Remove this when targeting Node.js >= 12 + this._progressCallbacks = []; + const unlockWrite = () => this._unlockWrite(); + const lockWrite = () => this._lockWrite(); + this.on('pipe', (source) => { + source.prependListener('data', unlockWrite); + source.on('data', lockWrite); + source.prependListener('end', unlockWrite); + source.on('end', lockWrite); + }); + this.on('unpipe', (source) => { + source.off('data', unlockWrite); + source.off('data', lockWrite); + source.off('end', unlockWrite); + source.off('end', lockWrite); + }); + this.on('pipe', source => { + if (source instanceof http_1.IncomingMessage) { + this.options.headers = { + ...source.headers, + ...this.options.headers + }; + } + }); + const { json, body, form } = options; + if (json || body || form) { + this._lockWrite(); + } + if (exports.kIsNormalizedAlready in options) { + this.options = options; + } + else { + try { + // @ts-expect-error Common TypeScript bug saying that `this.constructor` is not accessible + this.options = this.constructor.normalizeArguments(url, options, defaults); + } + catch (error) { + // TODO: Move this to `_destroy()` + if (is_1.default.nodeStream(options.body)) { + options.body.destroy(); + } + this.destroy(error); + return; + } + } + (async () => { + var _a; + try { + if (this.options.body instanceof fs_1.ReadStream) { + await waitForOpenFile(this.options.body); + } + const { url: normalizedURL } = this.options; + if (!normalizedURL) { + throw new TypeError('Missing `url` property'); + } + this.requestUrl = normalizedURL.toString(); + decodeURI(this.requestUrl); + await this._finalizeBody(); + await this._makeRequest(); + if (this.destroyed) { + (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroy(); + return; + } + // Queued writes etc. + for (const job of this[kJobs]) { + job(); + } + // Prevent memory leak + this[kJobs].length = 0; + this.requestInitialized = true; + } + catch (error) { + if (error instanceof RequestError) { + this._beforeError(error); + return; + } + // This is a workaround for https://github.com/nodejs/node/issues/33335 + if (!this.destroyed) { + this.destroy(error); + } + } + })(); + } + static normalizeArguments(url, options, defaults) { + var _a, _b, _c, _d, _e; + const rawOptions = options; + if (is_1.default.object(url) && !is_1.default.urlInstance(url)) { + options = { ...defaults, ...url, ...options }; + } + else { + if (url && options && options.url !== undefined) { + throw new TypeError('The `url` option is mutually exclusive with the `input` argument'); + } + options = { ...defaults, ...options }; + if (url !== undefined) { + options.url = url; + } + if (is_1.default.urlInstance(options.url)) { + options.url = new url_1.URL(options.url.toString()); + } + } + // TODO: Deprecate URL options in Got 12. + // Support extend-specific options + if (options.cache === false) { + options.cache = undefined; + } + if (options.dnsCache === false) { + options.dnsCache = undefined; + } + // Nice type assertions + is_1.assert.any([is_1.default.string, is_1.default.undefined], options.method); + is_1.assert.any([is_1.default.object, is_1.default.undefined], options.headers); + is_1.assert.any([is_1.default.string, is_1.default.urlInstance, is_1.default.undefined], options.prefixUrl); + is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cookieJar); + is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.searchParams); + is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.cache); + is_1.assert.any([is_1.default.object, is_1.default.number, is_1.default.undefined], options.timeout); + is_1.assert.any([is_1.default.object, is_1.default.undefined], options.context); + is_1.assert.any([is_1.default.object, is_1.default.undefined], options.hooks); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.decompress); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.ignoreInvalidCookies); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.followRedirect); + is_1.assert.any([is_1.default.number, is_1.default.undefined], options.maxRedirects); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.throwHttpErrors); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.http2); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.allowGetBody); + is_1.assert.any([is_1.default.string, is_1.default.undefined], options.localAddress); + is_1.assert.any([dns_ip_version_1.isDnsLookupIpVersion, is_1.default.undefined], options.dnsLookupIpVersion); + is_1.assert.any([is_1.default.object, is_1.default.undefined], options.https); + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.rejectUnauthorized); + if (options.https) { + is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.https.rejectUnauthorized); + is_1.assert.any([is_1.default.function_, is_1.default.undefined], options.https.checkServerIdentity); + is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificateAuthority); + is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.key); + is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificate); + is_1.assert.any([is_1.default.string, is_1.default.undefined], options.https.passphrase); + is_1.assert.any([is_1.default.string, is_1.default.buffer, is_1.default.array, is_1.default.undefined], options.https.pfx); + } + is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cacheOptions); + // `options.method` + if (is_1.default.string(options.method)) { + options.method = options.method.toUpperCase(); + } + else { + options.method = 'GET'; + } + // `options.headers` + if (options.headers === (defaults === null || defaults === void 0 ? void 0 : defaults.headers)) { + options.headers = { ...options.headers }; + } + else { + options.headers = lowercaseKeys({ ...(defaults === null || defaults === void 0 ? void 0 : defaults.headers), ...options.headers }); + } + // Disallow legacy `url.Url` + if ('slashes' in options) { + throw new TypeError('The legacy `url.Url` has been deprecated. Use `URL` instead.'); + } + // `options.auth` + if ('auth' in options) { + throw new TypeError('Parameter `auth` is deprecated. Use `username` / `password` instead.'); + } + // `options.searchParams` + if ('searchParams' in options) { + if (options.searchParams && options.searchParams !== (defaults === null || defaults === void 0 ? void 0 : defaults.searchParams)) { + let searchParameters; + if (is_1.default.string(options.searchParams) || (options.searchParams instanceof url_1.URLSearchParams)) { + searchParameters = new url_1.URLSearchParams(options.searchParams); + } + else { + validateSearchParameters(options.searchParams); + searchParameters = new url_1.URLSearchParams(); + // eslint-disable-next-line guard-for-in + for (const key in options.searchParams) { + const value = options.searchParams[key]; + if (value === null) { + searchParameters.append(key, ''); + } + else if (value !== undefined) { + searchParameters.append(key, value); + } + } + } + // `normalizeArguments()` is also used to merge options + (_a = defaults === null || defaults === void 0 ? void 0 : defaults.searchParams) === null || _a === void 0 ? void 0 : _a.forEach((value, key) => { + // Only use default if one isn't already defined + if (!searchParameters.has(key)) { + searchParameters.append(key, value); + } + }); + options.searchParams = searchParameters; + } + } + // `options.username` & `options.password` + options.username = (_b = options.username) !== null && _b !== void 0 ? _b : ''; + options.password = (_c = options.password) !== null && _c !== void 0 ? _c : ''; + // `options.prefixUrl` & `options.url` + if (is_1.default.undefined(options.prefixUrl)) { + options.prefixUrl = (_d = defaults === null || defaults === void 0 ? void 0 : defaults.prefixUrl) !== null && _d !== void 0 ? _d : ''; + } + else { + options.prefixUrl = options.prefixUrl.toString(); + if (options.prefixUrl !== '' && !options.prefixUrl.endsWith('/')) { + options.prefixUrl += '/'; + } + } + if (is_1.default.string(options.url)) { + if (options.url.startsWith('/')) { + throw new Error('`input` must not start with a slash when using `prefixUrl`'); + } + options.url = options_to_url_1.default(options.prefixUrl + options.url, options); + } + else if ((is_1.default.undefined(options.url) && options.prefixUrl !== '') || options.protocol) { + options.url = options_to_url_1.default(options.prefixUrl, options); + } + if (options.url) { + if ('port' in options) { + delete options.port; + } + // Make it possible to change `options.prefixUrl` + let { prefixUrl } = options; + Object.defineProperty(options, 'prefixUrl', { + set: (value) => { + const url = options.url; + if (!url.href.startsWith(value)) { + throw new Error(`Cannot change \`prefixUrl\` from ${prefixUrl} to ${value}: ${url.href}`); + } + options.url = new url_1.URL(value + url.href.slice(prefixUrl.length)); + prefixUrl = value; + }, + get: () => prefixUrl + }); + // Support UNIX sockets + let { protocol } = options.url; + if (protocol === 'unix:') { + protocol = 'http:'; + options.url = new url_1.URL(`http://unix${options.url.pathname}${options.url.search}`); + } + // Set search params + if (options.searchParams) { + // eslint-disable-next-line @typescript-eslint/no-base-to-string + options.url.search = options.searchParams.toString(); + } + // Protocol check + if (protocol !== 'http:' && protocol !== 'https:') { + throw new UnsupportedProtocolError(options); + } + // Update `username` + if (options.username === '') { + options.username = options.url.username; + } + else { + options.url.username = options.username; + } + // Update `password` + if (options.password === '') { + options.password = options.url.password; + } + else { + options.url.password = options.password; + } + } + // `options.cookieJar` + const { cookieJar } = options; + if (cookieJar) { + let { setCookie, getCookieString } = cookieJar; + is_1.assert.function_(setCookie); + is_1.assert.function_(getCookieString); + /* istanbul ignore next: Horrible `tough-cookie` v3 check */ + if (setCookie.length === 4 && getCookieString.length === 0) { + setCookie = util_1.promisify(setCookie.bind(options.cookieJar)); + getCookieString = util_1.promisify(getCookieString.bind(options.cookieJar)); + options.cookieJar = { + setCookie, + getCookieString: getCookieString + }; + } + } + // `options.cache` + const { cache } = options; + if (cache) { + if (!cacheableStore.has(cache)) { + cacheableStore.set(cache, new CacheableRequest(((requestOptions, handler) => { + const result = requestOptions[kRequest](requestOptions, handler); + // TODO: remove this when `cacheable-request` supports async request functions. + if (is_1.default.promise(result)) { + // @ts-expect-error + // We only need to implement the error handler in order to support HTTP2 caching. + // The result will be a promise anyway. + result.once = (event, handler) => { + if (event === 'error') { + result.catch(handler); + } + else if (event === 'abort') { + // The empty catch is needed here in case when + // it rejects before it's `await`ed in `_makeRequest`. + (async () => { + try { + const request = (await result); + request.once('abort', handler); + } + catch (_a) { } + })(); + } + else { + /* istanbul ignore next: safety check */ + throw new Error(`Unknown HTTP2 promise event: ${event}`); + } + return result; + }; + } + return result; + }), cache)); + } + } + // `options.cacheOptions` + options.cacheOptions = { ...options.cacheOptions }; + // `options.dnsCache` + if (options.dnsCache === true) { + if (!globalDnsCache) { + globalDnsCache = new cacheable_lookup_1.default(); + } + options.dnsCache = globalDnsCache; + } + else if (!is_1.default.undefined(options.dnsCache) && !options.dnsCache.lookup) { + throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${is_1.default(options.dnsCache)}`); + } + // `options.timeout` + if (is_1.default.number(options.timeout)) { + options.timeout = { request: options.timeout }; + } + else if (defaults && options.timeout !== defaults.timeout) { + options.timeout = { + ...defaults.timeout, + ...options.timeout + }; + } + else { + options.timeout = { ...options.timeout }; + } + // `options.context` + if (!options.context) { + options.context = {}; + } + // `options.hooks` + const areHooksDefault = options.hooks === (defaults === null || defaults === void 0 ? void 0 : defaults.hooks); + options.hooks = { ...options.hooks }; + for (const event of exports.knownHookEvents) { + if (event in options.hooks) { + if (is_1.default.array(options.hooks[event])) { + // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044 + options.hooks[event] = [...options.hooks[event]]; + } + else { + throw new TypeError(`Parameter \`${event}\` must be an Array, got ${is_1.default(options.hooks[event])}`); + } + } + else { + options.hooks[event] = []; + } + } + if (defaults && !areHooksDefault) { + for (const event of exports.knownHookEvents) { + const defaultHooks = defaults.hooks[event]; + if (defaultHooks.length > 0) { + // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044 + options.hooks[event] = [ + ...defaults.hooks[event], + ...options.hooks[event] + ]; + } + } + } + // DNS options + if ('family' in options) { + deprecation_warning_1.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'); + } + // HTTPS options + if (defaults === null || defaults === void 0 ? void 0 : defaults.https) { + options.https = { ...defaults.https, ...options.https }; + } + if ('rejectUnauthorized' in options) { + deprecation_warning_1.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'); + } + if ('checkServerIdentity' in options) { + deprecation_warning_1.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'); + } + if ('ca' in options) { + deprecation_warning_1.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'); + } + if ('key' in options) { + deprecation_warning_1.default('"options.key" was never documented, please use "options.https.key"'); + } + if ('cert' in options) { + deprecation_warning_1.default('"options.cert" was never documented, please use "options.https.certificate"'); + } + if ('passphrase' in options) { + deprecation_warning_1.default('"options.passphrase" was never documented, please use "options.https.passphrase"'); + } + if ('pfx' in options) { + deprecation_warning_1.default('"options.pfx" was never documented, please use "options.https.pfx"'); + } + // Other options + if ('followRedirects' in options) { + throw new TypeError('The `followRedirects` option does not exist. Use `followRedirect` instead.'); + } + if (options.agent) { + for (const key in options.agent) { + if (key !== 'http' && key !== 'https' && key !== 'http2') { + throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${key}\``); + } + } + } + options.maxRedirects = (_e = options.maxRedirects) !== null && _e !== void 0 ? _e : 0; + // Set non-enumerable properties + exports.setNonEnumerableProperties([defaults, rawOptions], options); + return normalize_arguments_1.default(options, defaults); + } + _lockWrite() { + const onLockedWrite = () => { + throw new TypeError('The payload has been already provided'); + }; + this.write = onLockedWrite; + this.end = onLockedWrite; + } + _unlockWrite() { + this.write = super.write; + this.end = super.end; + } + async _finalizeBody() { + const { options } = this; + const { headers } = options; + const isForm = !is_1.default.undefined(options.form); + const isJSON = !is_1.default.undefined(options.json); + const isBody = !is_1.default.undefined(options.body); + const hasPayload = isForm || isJSON || isBody; + const cannotHaveBody = exports.withoutBody.has(options.method) && !(options.method === 'GET' && options.allowGetBody); + this._cannotHaveBody = cannotHaveBody; + if (hasPayload) { + if (cannotHaveBody) { + throw new TypeError(`The \`${options.method}\` method cannot be used with a body`); + } + if ([isBody, isForm, isJSON].filter(isTrue => isTrue).length > 1) { + throw new TypeError('The `body`, `json` and `form` options are mutually exclusive'); + } + if (isBody && + !(options.body instanceof stream_1.Readable) && + !is_1.default.string(options.body) && + !is_1.default.buffer(options.body) && + !is_form_data_1.default(options.body)) { + throw new TypeError('The `body` option must be a stream.Readable, string or Buffer'); + } + if (isForm && !is_1.default.object(options.form)) { + throw new TypeError('The `form` option must be an Object'); + } + { + // Serialize body + const noContentType = !is_1.default.string(headers['content-type']); + if (isBody) { + // Special case for https://github.com/form-data/form-data + if (is_form_data_1.default(options.body) && noContentType) { + headers['content-type'] = `multipart/form-data; boundary=${options.body.getBoundary()}`; + } + this[kBody] = options.body; + } + else if (isForm) { + if (noContentType) { + headers['content-type'] = 'application/x-www-form-urlencoded'; + } + this[kBody] = (new url_1.URLSearchParams(options.form)).toString(); + } + else { + if (noContentType) { + headers['content-type'] = 'application/json'; + } + this[kBody] = options.stringifyJson(options.json); + } + const uploadBodySize = await get_body_size_1.default(this[kBody], options.headers); + // See https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD send a Content-Length in a request message when + // no Transfer-Encoding is sent and the request method defines a meaning + // for an enclosed payload body. For example, a Content-Length header + // field is normally sent in a POST request even when the value is 0 + // (indicating an empty payload body). A user agent SHOULD NOT send a + // Content-Length header field when the request message does not contain + // a payload body and the method semantics do not anticipate such a + // body. + if (is_1.default.undefined(headers['content-length']) && is_1.default.undefined(headers['transfer-encoding'])) { + if (!cannotHaveBody && !is_1.default.undefined(uploadBodySize)) { + headers['content-length'] = String(uploadBodySize); + } + } + } + } + else if (cannotHaveBody) { + this._lockWrite(); + } + else { + this._unlockWrite(); + } + this[kBodySize] = Number(headers['content-length']) || undefined; + } + async _onResponseBase(response) { + const { options } = this; + const { url } = options; + this[kOriginalResponse] = response; + if (options.decompress) { + response = decompressResponse(response); + } + const statusCode = response.statusCode; + const typedResponse = response; + typedResponse.statusMessage = typedResponse.statusMessage ? typedResponse.statusMessage : http.STATUS_CODES[statusCode]; + typedResponse.url = options.url.toString(); + typedResponse.requestUrl = this.requestUrl; + typedResponse.redirectUrls = this.redirects; + typedResponse.request = this; + typedResponse.isFromCache = response.fromCache || false; + typedResponse.ip = this.ip; + typedResponse.retryCount = this.retryCount; + this[kIsFromCache] = typedResponse.isFromCache; + this[kResponseSize] = Number(response.headers['content-length']) || undefined; + this[kResponse] = response; + response.once('end', () => { + this[kResponseSize] = this[kDownloadedSize]; + this.emit('downloadProgress', this.downloadProgress); + }); + response.once('error', (error) => { + // Force clean-up, because some packages don't do this. + // TODO: Fix decompress-response + response.destroy(); + this._beforeError(new ReadError(error, this)); + }); + response.once('aborted', () => { + this._beforeError(new ReadError({ + name: 'Error', + message: 'The server aborted pending request', + code: 'ECONNRESET' + }, this)); + }); + this.emit('downloadProgress', this.downloadProgress); + const rawCookies = response.headers['set-cookie']; + if (is_1.default.object(options.cookieJar) && rawCookies) { + let promises = rawCookies.map(async (rawCookie) => options.cookieJar.setCookie(rawCookie, url.toString())); + if (options.ignoreInvalidCookies) { + promises = promises.map(async (p) => p.catch(() => { })); + } + try { + await Promise.all(promises); + } + catch (error) { + this._beforeError(error); + return; + } + } + if (options.followRedirect && response.headers.location && redirectCodes.has(statusCode)) { + // We're being redirected, we don't care about the response. + // It'd be best to abort the request, but we can't because + // we would have to sacrifice the TCP connection. We don't want that. + response.resume(); + if (this[kRequest]) { + this[kCancelTimeouts](); + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete this[kRequest]; + this[kUnproxyEvents](); + } + const shouldBeGet = statusCode === 303 && options.method !== 'GET' && options.method !== 'HEAD'; + if (shouldBeGet || !options.methodRewriting) { + // Server responded with "see other", indicating that the resource exists at another location, + // and the client should request it from that location via GET or HEAD. + options.method = 'GET'; + if ('body' in options) { + delete options.body; + } + if ('json' in options) { + delete options.json; + } + if ('form' in options) { + delete options.form; + } + this[kBody] = undefined; + delete options.headers['content-length']; + } + if (this.redirects.length >= options.maxRedirects) { + this._beforeError(new MaxRedirectsError(this)); + return; + } + try { + // Do not remove. See https://github.com/sindresorhus/got/pull/214 + const redirectBuffer = Buffer.from(response.headers.location, 'binary').toString(); + // Handles invalid URLs. See https://github.com/sindresorhus/got/issues/604 + const redirectUrl = new url_1.URL(redirectBuffer, url); + const redirectString = redirectUrl.toString(); + decodeURI(redirectString); + // Redirecting to a different site, clear sensitive data. + if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) { + if ('host' in options.headers) { + delete options.headers.host; + } + if ('cookie' in options.headers) { + delete options.headers.cookie; + } + if ('authorization' in options.headers) { + delete options.headers.authorization; + } + if (options.username || options.password) { + options.username = ''; + options.password = ''; + } + } + else { + redirectUrl.username = options.username; + redirectUrl.password = options.password; + } + this.redirects.push(redirectString); + options.url = redirectUrl; + for (const hook of options.hooks.beforeRedirect) { + // eslint-disable-next-line no-await-in-loop + await hook(options, typedResponse); + } + this.emit('redirect', typedResponse, options); + await this._makeRequest(); + } + catch (error) { + this._beforeError(error); + return; + } + return; + } + if (options.isStream && options.throwHttpErrors && !is_response_ok_1.isResponseOk(typedResponse)) { + this._beforeError(new HTTPError(typedResponse)); + return; + } + response.on('readable', () => { + if (this[kTriggerRead]) { + this._read(); + } + }); + this.on('resume', () => { + response.resume(); + }); + this.on('pause', () => { + response.pause(); + }); + response.once('end', () => { + this.push(null); + }); + this.emit('response', response); + for (const destination of this[kServerResponsesPiped]) { + if (destination.headersSent) { + continue; + } + // eslint-disable-next-line guard-for-in + for (const key in response.headers) { + const isAllowed = options.decompress ? key !== 'content-encoding' : true; + const value = response.headers[key]; + if (isAllowed) { + destination.setHeader(key, value); + } + } + destination.statusCode = statusCode; + } + } + async _onResponse(response) { + try { + await this._onResponseBase(response); + } + catch (error) { + /* istanbul ignore next: better safe than sorry */ + this._beforeError(error); + } + } + _onRequest(request) { + const { options } = this; + const { timeout, url } = options; + http_timer_1.default(request); + this[kCancelTimeouts] = timed_out_1.default(request, timeout, url); + const responseEventName = options.cache ? 'cacheableResponse' : 'response'; + request.once(responseEventName, (response) => { + void this._onResponse(response); + }); + request.once('error', (error) => { + var _a; + // Force clean-up, because some packages (e.g. nock) don't do this. + request.destroy(); + // Node.js <= 12.18.2 mistakenly emits the response `end` first. + (_a = request.res) === null || _a === void 0 ? void 0 : _a.removeAllListeners('end'); + error = error instanceof timed_out_1.TimeoutError ? new TimeoutError(error, this.timings, this) : new RequestError(error.message, error, this); + this._beforeError(error); + }); + this[kUnproxyEvents] = proxy_events_1.default(request, this, proxiedRequestEvents); + this[kRequest] = request; + this.emit('uploadProgress', this.uploadProgress); + // Send body + const body = this[kBody]; + const currentRequest = this.redirects.length === 0 ? this : request; + if (is_1.default.nodeStream(body)) { + body.pipe(currentRequest); + body.once('error', (error) => { + this._beforeError(new UploadError(error, this)); + }); + } + else { + this._unlockWrite(); + if (!is_1.default.undefined(body)) { + this._writeRequest(body, undefined, () => { }); + currentRequest.end(); + this._lockWrite(); + } + else if (this._cannotHaveBody || this._noPipe) { + currentRequest.end(); + this._lockWrite(); + } + } + this.emit('request', request); + } + async _createCacheableRequest(url, options) { + return new Promise((resolve, reject) => { + // TODO: Remove `utils/url-to-options.ts` when `cacheable-request` is fixed + Object.assign(options, url_to_options_1.default(url)); + // `http-cache-semantics` checks this + // TODO: Fix this ignore. + // @ts-expect-error + delete options.url; + let request; + // This is ugly + const cacheRequest = cacheableStore.get(options.cache)(options, async (response) => { + // TODO: Fix `cacheable-response` + response._readableState.autoDestroy = false; + if (request) { + (await request).emit('cacheableResponse', response); + } + resolve(response); + }); + // Restore options + options.url = url; + cacheRequest.once('error', reject); + cacheRequest.once('request', async (requestOrPromise) => { + request = requestOrPromise; + resolve(request); + }); + }); + } + async _makeRequest() { + var _a, _b, _c, _d, _e; + const { options } = this; + const { headers } = options; + for (const key in headers) { + if (is_1.default.undefined(headers[key])) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete headers[key]; + } + else if (is_1.default.null_(headers[key])) { + throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`); + } + } + if (options.decompress && is_1.default.undefined(headers['accept-encoding'])) { + headers['accept-encoding'] = supportsBrotli ? 'gzip, deflate, br' : 'gzip, deflate'; + } + // Set cookies + if (options.cookieJar) { + const cookieString = await options.cookieJar.getCookieString(options.url.toString()); + if (is_1.default.nonEmptyString(cookieString)) { + options.headers.cookie = cookieString; + } + } + for (const hook of options.hooks.beforeRequest) { + // eslint-disable-next-line no-await-in-loop + const result = await hook(options); + if (!is_1.default.undefined(result)) { + // @ts-expect-error Skip the type mismatch to support abstract responses + options.request = () => result; + break; + } + } + if (options.body && this[kBody] !== options.body) { + this[kBody] = options.body; + } + const { agent, request, timeout, url } = options; + if (options.dnsCache && !('lookup' in options)) { + options.lookup = options.dnsCache.lookup; + } + // UNIX sockets + if (url.hostname === 'unix') { + const matches = /(?.+?):(?.+)/.exec(`${url.pathname}${url.search}`); + if (matches === null || matches === void 0 ? void 0 : matches.groups) { + const { socketPath, path } = matches.groups; + Object.assign(options, { + socketPath, + path, + host: '' + }); + } + } + const isHttps = url.protocol === 'https:'; + // Fallback function + let fallbackFn; + if (options.http2) { + fallbackFn = http2wrapper.auto; + } + else { + fallbackFn = isHttps ? https.request : http.request; + } + const realFn = (_a = options.request) !== null && _a !== void 0 ? _a : fallbackFn; + // Cache support + const fn = options.cache ? this._createCacheableRequest : realFn; + // Pass an agent directly when HTTP2 is disabled + if (agent && !options.http2) { + options.agent = agent[isHttps ? 'https' : 'http']; + } + // Prepare plain HTTP request options + options[kRequest] = realFn; + delete options.request; + // TODO: Fix this ignore. + // @ts-expect-error + delete options.timeout; + const requestOptions = options; + requestOptions.shared = (_b = options.cacheOptions) === null || _b === void 0 ? void 0 : _b.shared; + requestOptions.cacheHeuristic = (_c = options.cacheOptions) === null || _c === void 0 ? void 0 : _c.cacheHeuristic; + requestOptions.immutableMinTimeToLive = (_d = options.cacheOptions) === null || _d === void 0 ? void 0 : _d.immutableMinTimeToLive; + requestOptions.ignoreCargoCult = (_e = options.cacheOptions) === null || _e === void 0 ? void 0 : _e.ignoreCargoCult; + // If `dnsLookupIpVersion` is not present do not override `family` + if (options.dnsLookupIpVersion !== undefined) { + try { + requestOptions.family = dns_ip_version_1.dnsLookupIpVersionToFamily(options.dnsLookupIpVersion); + } + catch (_f) { + throw new Error('Invalid `dnsLookupIpVersion` option value'); + } + } + // HTTPS options remapping + if (options.https) { + if ('rejectUnauthorized' in options.https) { + requestOptions.rejectUnauthorized = options.https.rejectUnauthorized; + } + if (options.https.checkServerIdentity) { + requestOptions.checkServerIdentity = options.https.checkServerIdentity; + } + if (options.https.certificateAuthority) { + requestOptions.ca = options.https.certificateAuthority; + } + if (options.https.certificate) { + requestOptions.cert = options.https.certificate; + } + if (options.https.key) { + requestOptions.key = options.https.key; + } + if (options.https.passphrase) { + requestOptions.passphrase = options.https.passphrase; + } + if (options.https.pfx) { + requestOptions.pfx = options.https.pfx; + } + } + try { + let requestOrResponse = await fn(url, requestOptions); + if (is_1.default.undefined(requestOrResponse)) { + requestOrResponse = fallbackFn(url, requestOptions); + } + // Restore options + options.request = request; + options.timeout = timeout; + options.agent = agent; + // HTTPS options restore + if (options.https) { + if ('rejectUnauthorized' in options.https) { + delete requestOptions.rejectUnauthorized; + } + if (options.https.checkServerIdentity) { + // @ts-expect-error - This one will be removed when we remove the alias. + delete requestOptions.checkServerIdentity; + } + if (options.https.certificateAuthority) { + delete requestOptions.ca; + } + if (options.https.certificate) { + delete requestOptions.cert; + } + if (options.https.key) { + delete requestOptions.key; + } + if (options.https.passphrase) { + delete requestOptions.passphrase; + } + if (options.https.pfx) { + delete requestOptions.pfx; + } + } + if (isClientRequest(requestOrResponse)) { + this._onRequest(requestOrResponse); + // Emit the response after the stream has been ended + } + else if (this.writable) { + this.once('finish', () => { + void this._onResponse(requestOrResponse); + }); + this._unlockWrite(); + this.end(); + this._lockWrite(); + } + else { + void this._onResponse(requestOrResponse); + } + } + catch (error) { + if (error instanceof CacheableRequest.CacheError) { + throw new CacheError(error, this); + } + throw new RequestError(error.message, error, this); + } + } + async _error(error) { + try { + for (const hook of this.options.hooks.beforeError) { + // eslint-disable-next-line no-await-in-loop + error = await hook(error); + } + } + catch (error_) { + error = new RequestError(error_.message, error_, this); + } + this.destroy(error); + } + _beforeError(error) { + if (this[kStopReading]) { + return; + } + const { options } = this; + const retryCount = this.retryCount + 1; + this[kStopReading] = true; + if (!(error instanceof RequestError)) { + error = new RequestError(error.message, error, this); + } + const typedError = error; + const { response } = typedError; + void (async () => { + if (response && !response.body) { + response.setEncoding(this._readableState.encoding); + try { + response.rawBody = await get_buffer_1.default(response); + response.body = response.rawBody.toString(); + } + catch (_a) { } + } + if (this.listenerCount('retry') !== 0) { + let backoff; + try { + let retryAfter; + if (response && 'retry-after' in response.headers) { + retryAfter = Number(response.headers['retry-after']); + if (Number.isNaN(retryAfter)) { + retryAfter = Date.parse(response.headers['retry-after']) - Date.now(); + if (retryAfter <= 0) { + retryAfter = 1; + } + } + else { + retryAfter *= 1000; + } + } + backoff = await options.retry.calculateDelay({ + attemptCount: retryCount, + retryOptions: options.retry, + error: typedError, + retryAfter, + computedValue: calculate_retry_delay_1.default({ + attemptCount: retryCount, + retryOptions: options.retry, + error: typedError, + retryAfter, + computedValue: 0 + }) + }); + } + catch (error_) { + void this._error(new RequestError(error_.message, error_, this)); + return; + } + if (backoff) { + const retry = async () => { + try { + for (const hook of this.options.hooks.beforeRetry) { + // eslint-disable-next-line no-await-in-loop + await hook(this.options, typedError, retryCount); + } + } + catch (error_) { + void this._error(new RequestError(error_.message, error, this)); + return; + } + // Something forced us to abort the retry + if (this.destroyed) { + return; + } + this.destroy(); + this.emit('retry', retryCount, error); + }; + this[kRetryTimeout] = setTimeout(retry, backoff); + return; + } + } + void this._error(typedError); + })(); + } + _read() { + this[kTriggerRead] = true; + const response = this[kResponse]; + if (response && !this[kStopReading]) { + // We cannot put this in the `if` above + // because `.read()` also triggers the `end` event + if (response.readableLength) { + this[kTriggerRead] = false; + } + let data; + while ((data = response.read()) !== null) { + this[kDownloadedSize] += data.length; + this[kStartedReading] = true; + const progress = this.downloadProgress; + if (progress.percent < 1) { + this.emit('downloadProgress', progress); + } + this.push(data); + } + } + } + // Node.js 12 has incorrect types, so the encoding must be a string + _write(chunk, encoding, callback) { + const write = () => { + this._writeRequest(chunk, encoding, callback); + }; + if (this.requestInitialized) { + write(); + } + else { + this[kJobs].push(write); + } + } + _writeRequest(chunk, encoding, callback) { + if (this[kRequest].destroyed) { + // Probably the `ClientRequest` instance will throw + return; + } + this._progressCallbacks.push(() => { + this[kUploadedSize] += Buffer.byteLength(chunk, encoding); + const progress = this.uploadProgress; + if (progress.percent < 1) { + this.emit('uploadProgress', progress); + } + }); + // TODO: What happens if it's from cache? Then this[kRequest] won't be defined. + this[kRequest].write(chunk, encoding, (error) => { + if (!error && this._progressCallbacks.length > 0) { + this._progressCallbacks.shift()(); + } + callback(error); + }); + } + _final(callback) { + const endRequest = () => { + // FIX: Node.js 10 calls the write callback AFTER the end callback! + while (this._progressCallbacks.length !== 0) { + this._progressCallbacks.shift()(); + } + // We need to check if `this[kRequest]` is present, + // because it isn't when we use cache. + if (!(kRequest in this)) { + callback(); + return; + } + if (this[kRequest].destroyed) { + callback(); + return; + } + this[kRequest].end((error) => { + if (!error) { + this[kBodySize] = this[kUploadedSize]; + this.emit('uploadProgress', this.uploadProgress); + this[kRequest].emit('upload-complete'); + } + callback(error); + }); + }; + if (this.requestInitialized) { + endRequest(); + } + else { + this[kJobs].push(endRequest); + } + } + _destroy(error, callback) { + var _a; + this[kStopReading] = true; + // Prevent further retries + clearTimeout(this[kRetryTimeout]); + if (kRequest in this) { + this[kCancelTimeouts](); + // TODO: Remove the next `if` when these get fixed: + // - https://github.com/nodejs/node/issues/32851 + if (!((_a = this[kResponse]) === null || _a === void 0 ? void 0 : _a.complete)) { + this[kRequest].destroy(); + } + } + if (error !== null && !is_1.default.undefined(error) && !(error instanceof RequestError)) { + error = new RequestError(error.message, error, this); + } + callback(error); + } + get _isAboutToError() { + return this[kStopReading]; + } + /** + The remote IP address. + */ + get ip() { + var _a; + return (_a = this.socket) === null || _a === void 0 ? void 0 : _a.remoteAddress; + } + /** + Indicates whether the request has been aborted or not. + */ + get aborted() { + var _a, _b, _c; + return ((_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroyed) !== null && _b !== void 0 ? _b : this.destroyed) && !((_c = this[kOriginalResponse]) === null || _c === void 0 ? void 0 : _c.complete); + } + get socket() { + var _a, _b; + return (_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.socket) !== null && _b !== void 0 ? _b : undefined; + } + /** + Progress event for downloading (receiving a response). + */ + get downloadProgress() { + let percent; + if (this[kResponseSize]) { + percent = this[kDownloadedSize] / this[kResponseSize]; + } + else if (this[kResponseSize] === this[kDownloadedSize]) { + percent = 1; + } + else { + percent = 0; + } + return { + percent, + transferred: this[kDownloadedSize], + total: this[kResponseSize] + }; + } + /** + Progress event for uploading (sending a request). + */ + get uploadProgress() { + let percent; + if (this[kBodySize]) { + percent = this[kUploadedSize] / this[kBodySize]; + } + else if (this[kBodySize] === this[kUploadedSize]) { + percent = 1; + } + else { + percent = 0; + } + return { + percent, + transferred: this[kUploadedSize], + total: this[kBodySize] + }; + } + /** + The object contains the following properties: + + - `start` - Time when the request started. + - `socket` - Time when a socket was assigned to the request. + - `lookup` - Time when the DNS lookup finished. + - `connect` - Time when the socket successfully connected. + - `secureConnect` - Time when the socket securely connected. + - `upload` - Time when the request finished uploading. + - `response` - Time when the request fired `response` event. + - `end` - Time when the response fired `end` event. + - `error` - Time when the request fired `error` event. + - `abort` - Time when the request fired `abort` event. + - `phases` + - `wait` - `timings.socket - timings.start` + - `dns` - `timings.lookup - timings.socket` + - `tcp` - `timings.connect - timings.lookup` + - `tls` - `timings.secureConnect - timings.connect` + - `request` - `timings.upload - (timings.secureConnect || timings.connect)` + - `firstByte` - `timings.response - timings.upload` + - `download` - `timings.end - timings.response` + - `total` - `(timings.end || timings.error || timings.abort) - timings.start` + + If something has not been measured yet, it will be `undefined`. + + __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch. + */ + get timings() { + var _a; + return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings; + } + /** + Whether the response was retrieved from the cache. + */ + get isFromCache() { + return this[kIsFromCache]; + } + pipe(destination, options) { + if (this[kStartedReading]) { + throw new Error('Failed to pipe. The response has been emitted already.'); + } + if (destination instanceof http_1.ServerResponse) { + this[kServerResponsesPiped].add(destination); + } + return super.pipe(destination, options); + } + unpipe(destination) { + if (destination instanceof http_1.ServerResponse) { + this[kServerResponsesPiped].delete(destination); + } + super.unpipe(destination); + return this; + } +} +exports["default"] = Request; + + +/***/ }), + +/***/ 22844: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.dnsLookupIpVersionToFamily = exports.isDnsLookupIpVersion = void 0; +const conversionTable = { + auto: 0, + ipv4: 4, + ipv6: 6 +}; +exports.isDnsLookupIpVersion = (value) => { + return value in conversionTable; +}; +exports.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => { + if (exports.isDnsLookupIpVersion(dnsLookupIpVersion)) { + return conversionTable[dnsLookupIpVersion]; + } + throw new Error('Invalid DNS lookup IP version'); +}; + + +/***/ }), + +/***/ 41241: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const fs_1 = __nccwpck_require__(57147); +const util_1 = __nccwpck_require__(73837); +const is_1 = __nccwpck_require__(59966); +const is_form_data_1 = __nccwpck_require__(81812); +const statAsync = util_1.promisify(fs_1.stat); +exports["default"] = async (body, headers) => { + if (headers && 'content-length' in headers) { + return Number(headers['content-length']); + } + if (!body) { + return 0; + } + if (is_1.default.string(body)) { + return Buffer.byteLength(body); + } + if (is_1.default.buffer(body)) { + return body.length; + } + if (is_form_data_1.default(body)) { + return util_1.promisify(body.getLength.bind(body))(); + } + if (body instanceof fs_1.ReadStream) { + const { size } = await statAsync(body.path); + if (size === 0) { + return undefined; + } + return size; + } + return undefined; +}; + + +/***/ }), + +/***/ 1249: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +// TODO: Update https://github.com/sindresorhus/get-stream +const getBuffer = async (stream) => { + const chunks = []; + let length = 0; + for await (const chunk of stream) { + chunks.push(chunk); + length += Buffer.byteLength(chunk); + } + if (Buffer.isBuffer(chunks[0])) { + return Buffer.concat(chunks, length); + } + return Buffer.from(chunks.join('')); +}; +exports["default"] = getBuffer; + + +/***/ }), + +/***/ 81812: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const is_1 = __nccwpck_require__(59966); +exports["default"] = (body) => is_1.default.nodeStream(body) && is_1.default.function_(body.getBoundary); + + +/***/ }), + +/***/ 39307: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isResponseOk = void 0; +exports.isResponseOk = (response) => { + const { statusCode } = response; + const limitStatusCode = response.request.options.followRedirect ? 299 : 399; + return (statusCode >= 200 && statusCode <= limitStatusCode) || statusCode === 304; +}; + + +/***/ }), + +/***/ 41914: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/* istanbul ignore file: deprecated */ +const url_1 = __nccwpck_require__(57310); +const keys = [ + 'protocol', + 'host', + 'hostname', + 'port', + 'pathname', + 'search' +]; +exports["default"] = (origin, options) => { + var _a, _b; + if (options.path) { + if (options.pathname) { + throw new TypeError('Parameters `path` and `pathname` are mutually exclusive.'); + } + if (options.search) { + throw new TypeError('Parameters `path` and `search` are mutually exclusive.'); + } + if (options.searchParams) { + throw new TypeError('Parameters `path` and `searchParams` are mutually exclusive.'); + } + } + if (options.search && options.searchParams) { + throw new TypeError('Parameters `search` and `searchParams` are mutually exclusive.'); + } + if (!origin) { + if (!options.protocol) { + throw new TypeError('No URL protocol specified'); + } + origin = `${options.protocol}//${(_b = (_a = options.hostname) !== null && _a !== void 0 ? _a : options.host) !== null && _b !== void 0 ? _b : ''}`; + } + const url = new url_1.URL(origin); + if (options.path) { + const searchIndex = options.path.indexOf('?'); + if (searchIndex === -1) { + options.pathname = options.path; + } + else { + options.pathname = options.path.slice(0, searchIndex); + options.search = options.path.slice(searchIndex + 1); + } + delete options.path; + } + for (const key of keys) { + if (options[key]) { + url[key] = options[key].toString(); + } + } + return url; +}; + + +/***/ }), + +/***/ 50410: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +function default_1(from, to, events) { + const fns = {}; + for (const event of events) { + fns[event] = (...args) => { + to.emit(event, ...args); + }; + from.on(event, fns[event]); + } + return () => { + for (const event of events) { + from.off(event, fns[event]); + } + }; +} +exports["default"] = default_1; + + +/***/ }), + +/***/ 69628: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TimeoutError = void 0; +const net = __nccwpck_require__(41808); +const unhandle_1 = __nccwpck_require__(89558); +const reentry = Symbol('reentry'); +const noop = () => { }; +class TimeoutError extends Error { + constructor(threshold, event) { + super(`Timeout awaiting '${event}' for ${threshold}ms`); + this.event = event; + this.name = 'TimeoutError'; + this.code = 'ETIMEDOUT'; + } +} +exports.TimeoutError = TimeoutError; +exports["default"] = (request, delays, options) => { + if (reentry in request) { + return noop; + } + request[reentry] = true; + const cancelers = []; + const { once, unhandleAll } = unhandle_1.default(); + const addTimeout = (delay, callback, event) => { + var _a; + const timeout = setTimeout(callback, delay, delay, event); + (_a = timeout.unref) === null || _a === void 0 ? void 0 : _a.call(timeout); + const cancel = () => { + clearTimeout(timeout); + }; + cancelers.push(cancel); + return cancel; + }; + const { host, hostname } = options; + const timeoutHandler = (delay, event) => { + request.destroy(new TimeoutError(delay, event)); + }; + const cancelTimeouts = () => { + for (const cancel of cancelers) { + cancel(); + } + unhandleAll(); + }; + request.once('error', error => { + cancelTimeouts(); + // Save original behavior + /* istanbul ignore next */ + if (request.listenerCount('error') === 0) { + throw error; + } + }); + request.once('close', cancelTimeouts); + once(request, 'response', (response) => { + once(response, 'end', cancelTimeouts); + }); + if (typeof delays.request !== 'undefined') { + addTimeout(delays.request, timeoutHandler, 'request'); + } + if (typeof delays.socket !== 'undefined') { + const socketTimeoutHandler = () => { + timeoutHandler(delays.socket, 'socket'); + }; + request.setTimeout(delays.socket, socketTimeoutHandler); + // `request.setTimeout(0)` causes a memory leak. + // We can just remove the listener and forget about the timer - it's unreffed. + // See https://github.com/sindresorhus/got/issues/690 + cancelers.push(() => { + request.removeListener('timeout', socketTimeoutHandler); + }); + } + once(request, 'socket', (socket) => { + var _a; + const { socketPath } = request; + /* istanbul ignore next: hard to test */ + if (socket.connecting) { + const hasPath = Boolean(socketPath !== null && socketPath !== void 0 ? socketPath : net.isIP((_a = hostname !== null && hostname !== void 0 ? hostname : host) !== null && _a !== void 0 ? _a : '') !== 0); + if (typeof delays.lookup !== 'undefined' && !hasPath && typeof socket.address().address === 'undefined') { + const cancelTimeout = addTimeout(delays.lookup, timeoutHandler, 'lookup'); + once(socket, 'lookup', cancelTimeout); + } + if (typeof delays.connect !== 'undefined') { + const timeConnect = () => addTimeout(delays.connect, timeoutHandler, 'connect'); + if (hasPath) { + once(socket, 'connect', timeConnect()); + } + else { + once(socket, 'lookup', (error) => { + if (error === null) { + once(socket, 'connect', timeConnect()); + } + }); + } + } + if (typeof delays.secureConnect !== 'undefined' && options.protocol === 'https:') { + once(socket, 'connect', () => { + const cancelTimeout = addTimeout(delays.secureConnect, timeoutHandler, 'secureConnect'); + once(socket, 'secureConnect', cancelTimeout); + }); + } + } + if (typeof delays.send !== 'undefined') { + const timeRequest = () => addTimeout(delays.send, timeoutHandler, 'send'); + /* istanbul ignore next: hard to test */ + if (socket.connecting) { + once(socket, 'connect', () => { + once(request, 'upload-complete', timeRequest()); + }); + } + else { + once(request, 'upload-complete', timeRequest()); + } + } + }); + if (typeof delays.response !== 'undefined') { + once(request, 'upload-complete', () => { + const cancelTimeout = addTimeout(delays.response, timeoutHandler, 'response'); + once(request, 'response', cancelTimeout); + }); + } + return cancelTimeouts; +}; + + +/***/ }), + +/***/ 89558: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +// When attaching listeners, it's very easy to forget about them. +// Especially if you do error handling and set timeouts. +// So instead of checking if it's proper to throw an error on every timeout ever, +// use this simple tool which will remove all listeners you have attached. +exports["default"] = () => { + const handlers = []; + return { + once(origin, event, fn) { + origin.once(event, fn); + handlers.push({ origin, event, fn }); + }, + unhandleAll() { + for (const handler of handlers) { + const { origin, event, fn } = handler; + origin.removeListener(event, fn); + } + handlers.length = 0; + } + }; +}; + + +/***/ }), + +/***/ 96958: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const is_1 = __nccwpck_require__(59966); +exports["default"] = (url) => { + // Cast to URL + url = url; + const options = { + protocol: url.protocol, + hostname: is_1.default.string(url.hostname) && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, + host: url.host, + hash: url.hash, + search: url.search, + pathname: url.pathname, + href: url.href, + path: `${url.pathname || ''}${url.search || ''}` + }; + if (is_1.default.string(url.port) && url.port.length > 0) { + options.port = Number(url.port); + } + if (url.username || url.password) { + options.auth = `${url.username || ''}:${url.password || ''}`; + } + return options; +}; + + +/***/ }), + +/***/ 19207: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +class WeakableMap { + constructor() { + this.weakMap = new WeakMap(); + this.map = new Map(); + } + set(key, value) { + if (typeof key === 'object') { + this.weakMap.set(key, value); + } + else { + this.map.set(key, value); + } + } + get(key) { + if (typeof key === 'object') { + return this.weakMap.get(key); + } + return this.map.get(key); + } + has(key) { + if (typeof key === 'object') { + return this.weakMap.has(key); + } + return this.map.has(key); + } +} +exports["default"] = WeakableMap; + + +/***/ }), + +/***/ 24320: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultHandler = void 0; +const is_1 = __nccwpck_require__(59966); +const as_promise_1 = __nccwpck_require__(25300); +const create_rejection_1 = __nccwpck_require__(8810); +const core_1 = __nccwpck_require__(9284); +const deep_freeze_1 = __nccwpck_require__(81310); +const errors = { + RequestError: as_promise_1.RequestError, + CacheError: as_promise_1.CacheError, + ReadError: as_promise_1.ReadError, + HTTPError: as_promise_1.HTTPError, + MaxRedirectsError: as_promise_1.MaxRedirectsError, + TimeoutError: as_promise_1.TimeoutError, + ParseError: as_promise_1.ParseError, + CancelError: as_promise_1.CancelError, + UnsupportedProtocolError: as_promise_1.UnsupportedProtocolError, + UploadError: as_promise_1.UploadError +}; +// The `delay` package weighs 10KB (!) +const delay = async (ms) => new Promise(resolve => { + setTimeout(resolve, ms); +}); +const { normalizeArguments } = core_1.default; +const mergeOptions = (...sources) => { + let mergedOptions; + for (const source of sources) { + mergedOptions = normalizeArguments(undefined, source, mergedOptions); + } + return mergedOptions; +}; +const getPromiseOrStream = (options) => options.isStream ? new core_1.default(undefined, options) : as_promise_1.default(options); +const isGotInstance = (value) => ('defaults' in value && 'options' in value.defaults); +const aliases = [ + 'get', + 'post', + 'put', + 'patch', + 'head', + 'delete' +]; +exports.defaultHandler = (options, next) => next(options); +const callInitHooks = (hooks, options) => { + if (hooks) { + for (const hook of hooks) { + hook(options); + } + } +}; +const create = (defaults) => { + // Proxy properties from next handlers + defaults._rawHandlers = defaults.handlers; + defaults.handlers = defaults.handlers.map(fn => ((options, next) => { + // This will be assigned by assigning result + let root; + const result = fn(options, newOptions => { + root = next(newOptions); + return root; + }); + if (result !== root && !options.isStream && root) { + const typedResult = result; + const { then: promiseThen, catch: promiseCatch, finally: promiseFianlly } = typedResult; + Object.setPrototypeOf(typedResult, Object.getPrototypeOf(root)); + Object.defineProperties(typedResult, Object.getOwnPropertyDescriptors(root)); + // These should point to the new promise + // eslint-disable-next-line promise/prefer-await-to-then + typedResult.then = promiseThen; + typedResult.catch = promiseCatch; + typedResult.finally = promiseFianlly; + } + return result; + })); + // Got interface + const got = ((url, options = {}, _defaults) => { + var _a, _b; + let iteration = 0; + const iterateHandlers = (newOptions) => { + return defaults.handlers[iteration++](newOptions, iteration === defaults.handlers.length ? getPromiseOrStream : iterateHandlers); + }; + // TODO: Remove this in Got 12. + if (is_1.default.plainObject(url)) { + const mergedOptions = { + ...url, + ...options + }; + core_1.setNonEnumerableProperties([url, options], mergedOptions); + options = mergedOptions; + url = undefined; + } + try { + // Call `init` hooks + let initHookError; + try { + callInitHooks(defaults.options.hooks.init, options); + callInitHooks((_a = options.hooks) === null || _a === void 0 ? void 0 : _a.init, options); + } + catch (error) { + initHookError = error; + } + // Normalize options & call handlers + const normalizedOptions = normalizeArguments(url, options, _defaults !== null && _defaults !== void 0 ? _defaults : defaults.options); + normalizedOptions[core_1.kIsNormalizedAlready] = true; + if (initHookError) { + throw new as_promise_1.RequestError(initHookError.message, initHookError, normalizedOptions); + } + return iterateHandlers(normalizedOptions); + } + catch (error) { + if (options.isStream) { + throw error; + } + else { + return create_rejection_1.default(error, defaults.options.hooks.beforeError, (_b = options.hooks) === null || _b === void 0 ? void 0 : _b.beforeError); + } + } + }); + got.extend = (...instancesOrOptions) => { + const optionsArray = [defaults.options]; + let handlers = [...defaults._rawHandlers]; + let isMutableDefaults; + for (const value of instancesOrOptions) { + if (isGotInstance(value)) { + optionsArray.push(value.defaults.options); + handlers.push(...value.defaults._rawHandlers); + isMutableDefaults = value.defaults.mutableDefaults; + } + else { + optionsArray.push(value); + if ('handlers' in value) { + handlers.push(...value.handlers); + } + isMutableDefaults = value.mutableDefaults; + } + } + handlers = handlers.filter(handler => handler !== exports.defaultHandler); + if (handlers.length === 0) { + handlers.push(exports.defaultHandler); + } + return create({ + options: mergeOptions(...optionsArray), + handlers, + mutableDefaults: Boolean(isMutableDefaults) + }); + }; + // Pagination + const paginateEach = (async function* (url, options) { + // TODO: Remove this `@ts-expect-error` when upgrading to TypeScript 4. + // Error: Argument of type 'Merge> | undefined' is not assignable to parameter of type 'Options | undefined'. + // @ts-expect-error + let normalizedOptions = normalizeArguments(url, options, defaults.options); + normalizedOptions.resolveBodyOnly = false; + const pagination = normalizedOptions.pagination; + if (!is_1.default.object(pagination)) { + throw new TypeError('`options.pagination` must be implemented'); + } + const all = []; + let { countLimit } = pagination; + let numberOfRequests = 0; + while (numberOfRequests < pagination.requestLimit) { + if (numberOfRequests !== 0) { + // eslint-disable-next-line no-await-in-loop + await delay(pagination.backoff); + } + // @ts-expect-error FIXME! + // TODO: Throw when result is not an instance of Response + // eslint-disable-next-line no-await-in-loop + const result = (await got(undefined, undefined, normalizedOptions)); + // eslint-disable-next-line no-await-in-loop + const parsed = await pagination.transform(result); + const current = []; + for (const item of parsed) { + if (pagination.filter(item, all, current)) { + if (!pagination.shouldContinue(item, all, current)) { + return; + } + yield item; + if (pagination.stackAllItems) { + all.push(item); + } + current.push(item); + if (--countLimit <= 0) { + return; + } + } + } + const optionsToMerge = pagination.paginate(result, all, current); + if (optionsToMerge === false) { + return; + } + if (optionsToMerge === result.request.options) { + normalizedOptions = result.request.options; + } + else if (optionsToMerge !== undefined) { + normalizedOptions = normalizeArguments(undefined, optionsToMerge, normalizedOptions); + } + numberOfRequests++; + } + }); + got.paginate = paginateEach; + got.paginate.all = (async (url, options) => { + const results = []; + for await (const item of paginateEach(url, options)) { + results.push(item); + } + return results; + }); + // For those who like very descriptive names + got.paginate.each = paginateEach; + // Stream API + got.stream = ((url, options) => got(url, { ...options, isStream: true })); + // Shortcuts + for (const method of aliases) { + got[method] = ((url, options) => got(url, { ...options, method })); + got.stream[method] = ((url, options) => { + return got(url, { ...options, method, isStream: true }); + }); + } + Object.assign(got, errors); + Object.defineProperty(got, 'defaults', { + value: defaults.mutableDefaults ? defaults : deep_freeze_1.default(defaults), + writable: defaults.mutableDefaults, + configurable: defaults.mutableDefaults, + enumerable: true + }); + got.mergeOptions = mergeOptions; + return got; +}; +exports["default"] = create; +__exportStar(__nccwpck_require__(75194), exports); + + +/***/ }), + +/***/ 2562: +/***/ (function(module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const url_1 = __nccwpck_require__(57310); +const create_1 = __nccwpck_require__(24320); +const defaults = { + options: { + method: 'GET', + retry: { + limit: 2, + methods: [ + 'GET', + 'PUT', + 'HEAD', + 'DELETE', + 'OPTIONS', + 'TRACE' + ], + statusCodes: [ + 408, + 413, + 429, + 500, + 502, + 503, + 504, + 521, + 522, + 524 + ], + errorCodes: [ + 'ETIMEDOUT', + 'ECONNRESET', + 'EADDRINUSE', + 'ECONNREFUSED', + 'EPIPE', + 'ENOTFOUND', + 'ENETUNREACH', + 'EAI_AGAIN' + ], + maxRetryAfter: undefined, + calculateDelay: ({ computedValue }) => computedValue + }, + timeout: {}, + headers: { + 'user-agent': 'got (https://github.com/sindresorhus/got)' + }, + hooks: { + init: [], + beforeRequest: [], + beforeRedirect: [], + beforeRetry: [], + beforeError: [], + afterResponse: [] + }, + cache: undefined, + dnsCache: undefined, + decompress: true, + throwHttpErrors: true, + followRedirect: true, + isStream: false, + responseType: 'text', + resolveBodyOnly: false, + maxRedirects: 10, + prefixUrl: '', + methodRewriting: true, + ignoreInvalidCookies: false, + context: {}, + // TODO: Set this to `true` when Got 12 gets released + http2: false, + allowGetBody: false, + https: undefined, + pagination: { + transform: (response) => { + if (response.request.options.responseType === 'json') { + return response.body; + } + return JSON.parse(response.body); + }, + paginate: response => { + if (!Reflect.has(response.headers, 'link')) { + return false; + } + const items = response.headers.link.split(','); + let next; + for (const item of items) { + const parsed = item.split(';'); + if (parsed[1].includes('next')) { + next = parsed[0].trimStart().trim(); + next = next.slice(1, -1); + break; + } + } + if (next) { + const options = { + url: new url_1.URL(next) + }; + return options; + } + return false; + }, + filter: () => true, + shouldContinue: () => true, + countLimit: Infinity, + backoff: 0, + requestLimit: 10000, + stackAllItems: true + }, + parseJson: (text) => JSON.parse(text), + stringifyJson: (object) => JSON.stringify(object), + cacheOptions: {} + }, + handlers: [create_1.defaultHandler], + mutableDefaults: false +}; +const got = create_1.default(defaults); +exports["default"] = got; +// For CommonJS default export support +module.exports = got; +module.exports["default"] = got; +module.exports.__esModule = true; // Workaround for TS issue: https://github.com/sindresorhus/got/pull/1267 +__exportStar(__nccwpck_require__(24320), exports); +__exportStar(__nccwpck_require__(25300), exports); + + +/***/ }), + +/***/ 75194: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 81310: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const is_1 = __nccwpck_require__(59966); +function deepFreeze(object) { + for (const value of Object.values(object)) { + if (is_1.default.plainObject(value) || is_1.default.array(value)) { + deepFreeze(value); + } + } + return Object.freeze(object); +} +exports["default"] = deepFreeze; + + +/***/ }), + +/***/ 81757: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const alreadyWarned = new Set(); +exports["default"] = (message) => { + if (alreadyWarned.has(message)) { + return; + } + alreadyWarned.add(message); + // @ts-expect-error Missing types. + process.emitWarning(`Got: ${message}`, { + type: 'DeprecationWarning' + }); +}; + + +/***/ }), + +/***/ 56983: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = { + afterRequest: __nccwpck_require__(83932), + beforeRequest: __nccwpck_require__(36136), + browser: __nccwpck_require__(805), + cache: __nccwpck_require__(51632), + content: __nccwpck_require__(61567), + cookie: __nccwpck_require__(25725), + creator: __nccwpck_require__(47218), + entry: __nccwpck_require__(74560), + har: __nccwpck_require__(75579), + header: __nccwpck_require__(75147), + log: __nccwpck_require__(53013), + page: __nccwpck_require__(34777), + pageTimings: __nccwpck_require__(5538), + postData: __nccwpck_require__(12096), + query: __nccwpck_require__(21251), + request: __nccwpck_require__(99646), + response: __nccwpck_require__(9103), + timings: __nccwpck_require__(22007) +} + + +/***/ }), + +/***/ 35047: +/***/ ((module) => { + +function HARError (errors) { + var message = 'validation failed' + + this.name = 'HARError' + this.message = message + this.errors = errors + + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, this.constructor) + } else { + this.stack = (new Error(message)).stack + } +} + +HARError.prototype = Error.prototype + +module.exports = HARError + + +/***/ }), + +/***/ 37033: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +var Ajv = __nccwpck_require__(99318) +var HARError = __nccwpck_require__(35047) +var schemas = __nccwpck_require__(56983) + +var ajv + +function createAjvInstance () { + var ajv = new Ajv({ + allErrors: true + }) + ajv.addMetaSchema(__nccwpck_require__(96273)) + ajv.addSchema(schemas) + + return ajv +} + +function validate (name, data) { + data = data || {} + + // validator config + ajv = ajv || createAjvInstance() + + var validate = ajv.getSchema(name + '.json') + + return new Promise(function (resolve, reject) { + var valid = validate(data) + + !valid ? reject(new HARError(validate.errors)) : resolve(data) + }) +} + +exports.afterRequest = function (data) { + return validate('afterRequest', data) +} + +exports.beforeRequest = function (data) { + return validate('beforeRequest', data) +} + +exports.browser = function (data) { + return validate('browser', data) +} + +exports.cache = function (data) { + return validate('cache', data) +} + +exports.content = function (data) { + return validate('content', data) +} + +exports.cookie = function (data) { + return validate('cookie', data) +} + +exports.creator = function (data) { + return validate('creator', data) +} + +exports.entry = function (data) { + return validate('entry', data) +} + +exports.har = function (data) { + return validate('har', data) +} + +exports.header = function (data) { + return validate('header', data) +} + +exports.log = function (data) { + return validate('log', data) +} + +exports.page = function (data) { + return validate('page', data) +} + +exports.pageTimings = function (data) { + return validate('pageTimings', data) +} + +exports.postData = function (data) { + return validate('postData', data) +} + +exports.query = function (data) { + return validate('query', data) +} + +exports.request = function (data) { + return validate('request', data) +} + +exports.response = function (data) { + return validate('response', data) +} + +exports.timings = function (data) { + return validate('timings', data) +} + + +/***/ }), + +/***/ 67332: +/***/ ((module) => { + +"use strict"; + +// rfc7231 6.1 +const statusCodeCacheableByDefault = new Set([ + 200, + 203, + 204, + 206, + 300, + 301, + 404, + 405, + 410, + 414, + 501, +]); + +// This implementation does not understand partial responses (206) +const understoodStatuses = new Set([ + 200, + 203, + 204, + 300, + 301, + 302, + 303, + 307, + 308, + 404, + 405, + 410, + 414, + 501, +]); + +const errorStatusCodes = new Set([ + 500, + 502, + 503, + 504, +]); + +const hopByHopHeaders = { + date: true, // included, because we add Age update Date + connection: true, + 'keep-alive': true, + 'proxy-authenticate': true, + 'proxy-authorization': true, + te: true, + trailer: true, + 'transfer-encoding': true, + upgrade: true, +}; + +const excludedFromRevalidationUpdate = { + // Since the old body is reused, it doesn't make sense to change properties of the body + 'content-length': true, + 'content-encoding': true, + 'transfer-encoding': true, + 'content-range': true, +}; + +function toNumberOrZero(s) { + const n = parseInt(s, 10); + return isFinite(n) ? n : 0; +} + +// RFC 5861 +function isErrorResponse(response) { + // consider undefined response as faulty + if(!response) { + return true + } + return errorStatusCodes.has(response.status); +} + +function parseCacheControl(header) { + const cc = {}; + if (!header) return cc; + + // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), + // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale + const parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing + for (const part of parts) { + const [k, v] = part.split(/\s*=\s*/, 2); + cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting + } + + return cc; +} + +function formatCacheControl(cc) { + let parts = []; + for (const k in cc) { + const v = cc[k]; + parts.push(v === true ? k : k + '=' + v); + } + if (!parts.length) { + return undefined; + } + return parts.join(', '); +} + +module.exports = class CachePolicy { + constructor( + req, + res, + { + shared, + cacheHeuristic, + immutableMinTimeToLive, + ignoreCargoCult, + _fromObject, + } = {} + ) { + if (_fromObject) { + this._fromObject(_fromObject); + return; + } + + if (!res || !res.headers) { + throw Error('Response headers missing'); + } + this._assertRequestHasHeaders(req); + + this._responseTime = this.now(); + this._isShared = shared !== false; + this._cacheHeuristic = + undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE + this._immutableMinTtl = + undefined !== immutableMinTimeToLive + ? immutableMinTimeToLive + : 24 * 3600 * 1000; + + this._status = 'status' in res ? res.status : 200; + this._resHeaders = res.headers; + this._rescc = parseCacheControl(res.headers['cache-control']); + this._method = 'method' in req ? req.method : 'GET'; + this._url = req.url; + this._host = req.headers.host; + this._noAuthorization = !req.headers.authorization; + this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used + this._reqcc = parseCacheControl(req.headers['cache-control']); + + // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching, + // so there's no point stricly adhering to the blindly copy&pasted directives. + if ( + ignoreCargoCult && + 'pre-check' in this._rescc && + 'post-check' in this._rescc + ) { + delete this._rescc['pre-check']; + delete this._rescc['post-check']; + delete this._rescc['no-cache']; + delete this._rescc['no-store']; + delete this._rescc['must-revalidate']; + this._resHeaders = Object.assign({}, this._resHeaders, { + 'cache-control': formatCacheControl(this._rescc), + }); + delete this._resHeaders.expires; + delete this._resHeaders.pragma; + } + + // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive + // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1). + if ( + res.headers['cache-control'] == null && + /no-cache/.test(res.headers.pragma) + ) { + this._rescc['no-cache'] = true; + } + } + + now() { + return Date.now(); + } + + storable() { + // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it. + return !!( + !this._reqcc['no-store'] && + // A cache MUST NOT store a response to any request, unless: + // The request method is understood by the cache and defined as being cacheable, and + ('GET' === this._method || + 'HEAD' === this._method || + ('POST' === this._method && this._hasExplicitExpiration())) && + // the response status code is understood by the cache, and + understoodStatuses.has(this._status) && + // the "no-store" cache directive does not appear in request or response header fields, and + !this._rescc['no-store'] && + // the "private" response directive does not appear in the response, if the cache is shared, and + (!this._isShared || !this._rescc.private) && + // the Authorization header field does not appear in the request, if the cache is shared, + (!this._isShared || + this._noAuthorization || + this._allowsStoringAuthenticated()) && + // the response either: + // contains an Expires header field, or + (this._resHeaders.expires || + // contains a max-age response directive, or + // contains a s-maxage response directive and the cache is shared, or + // contains a public response directive. + this._rescc['max-age'] || + (this._isShared && this._rescc['s-maxage']) || + this._rescc.public || + // has a status code that is defined as cacheable by default + statusCodeCacheableByDefault.has(this._status)) + ); + } + + _hasExplicitExpiration() { + // 4.2.1 Calculating Freshness Lifetime + return ( + (this._isShared && this._rescc['s-maxage']) || + this._rescc['max-age'] || + this._resHeaders.expires + ); + } + + _assertRequestHasHeaders(req) { + if (!req || !req.headers) { + throw Error('Request headers missing'); + } + } + + satisfiesWithoutRevalidation(req) { + this._assertRequestHasHeaders(req); + + // When presented with a request, a cache MUST NOT reuse a stored response, unless: + // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive, + // unless the stored response is successfully validated (Section 4.3), and + const requestCC = parseCacheControl(req.headers['cache-control']); + if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) { + return false; + } + + if (requestCC['max-age'] && this.age() > requestCC['max-age']) { + return false; + } + + if ( + requestCC['min-fresh'] && + this.timeToLive() < 1000 * requestCC['min-fresh'] + ) { + return false; + } + + // the stored response is either: + // fresh, or allowed to be served stale + if (this.stale()) { + const allowsStale = + requestCC['max-stale'] && + !this._rescc['must-revalidate'] && + (true === requestCC['max-stale'] || + requestCC['max-stale'] > this.age() - this.maxAge()); + if (!allowsStale) { + return false; + } + } + + return this._requestMatches(req, false); + } + + _requestMatches(req, allowHeadMethod) { + // The presented effective request URI and that of the stored response match, and + return ( + (!this._url || this._url === req.url) && + this._host === req.headers.host && + // the request method associated with the stored response allows it to be used for the presented request, and + (!req.method || + this._method === req.method || + (allowHeadMethod && 'HEAD' === req.method)) && + // selecting header fields nominated by the stored response (if any) match those presented, and + this._varyMatches(req) + ); + } + + _allowsStoringAuthenticated() { + // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage. + return ( + this._rescc['must-revalidate'] || + this._rescc.public || + this._rescc['s-maxage'] + ); + } + + _varyMatches(req) { + if (!this._resHeaders.vary) { + return true; + } + + // A Vary header field-value of "*" always fails to match + if (this._resHeaders.vary === '*') { + return false; + } + + const fields = this._resHeaders.vary + .trim() + .toLowerCase() + .split(/\s*,\s*/); + for (const name of fields) { + if (req.headers[name] !== this._reqHeaders[name]) return false; + } + return true; + } + + _copyWithoutHopByHopHeaders(inHeaders) { + const headers = {}; + for (const name in inHeaders) { + if (hopByHopHeaders[name]) continue; + headers[name] = inHeaders[name]; + } + // 9.1. Connection + if (inHeaders.connection) { + const tokens = inHeaders.connection.trim().split(/\s*,\s*/); + for (const name of tokens) { + delete headers[name]; + } + } + if (headers.warning) { + const warnings = headers.warning.split(/,/).filter(warning => { + return !/^\s*1[0-9][0-9]/.test(warning); + }); + if (!warnings.length) { + delete headers.warning; + } else { + headers.warning = warnings.join(',').trim(); + } + } + return headers; + } + + responseHeaders() { + const headers = this._copyWithoutHopByHopHeaders(this._resHeaders); + const age = this.age(); + + // A cache SHOULD generate 113 warning if it heuristically chose a freshness + // lifetime greater than 24 hours and the response's age is greater than 24 hours. + if ( + age > 3600 * 24 && + !this._hasExplicitExpiration() && + this.maxAge() > 3600 * 24 + ) { + headers.warning = + (headers.warning ? `${headers.warning}, ` : '') + + '113 - "rfc7234 5.5.4"'; + } + headers.age = `${Math.round(age)}`; + headers.date = new Date(this.now()).toUTCString(); + return headers; + } + + /** + * Value of the Date response header or current time if Date was invalid + * @return timestamp + */ + date() { + const serverDate = Date.parse(this._resHeaders.date); + if (isFinite(serverDate)) { + return serverDate; + } + return this._responseTime; + } + + /** + * Value of the Age header, in seconds, updated for the current time. + * May be fractional. + * + * @return Number + */ + age() { + let age = this._ageValue(); + + const residentTime = (this.now() - this._responseTime) / 1000; + return age + residentTime; + } + + _ageValue() { + return toNumberOrZero(this._resHeaders.age); + } + + /** + * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`. + * + * For an up-to-date value, see `timeToLive()`. + * + * @return Number + */ + maxAge() { + if (!this.storable() || this._rescc['no-cache']) { + return 0; + } + + // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default + // so this implementation requires explicit opt-in via public header + if ( + this._isShared && + (this._resHeaders['set-cookie'] && + !this._rescc.public && + !this._rescc.immutable) + ) { + return 0; + } + + if (this._resHeaders.vary === '*') { + return 0; + } + + if (this._isShared) { + if (this._rescc['proxy-revalidate']) { + return 0; + } + // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field. + if (this._rescc['s-maxage']) { + return toNumberOrZero(this._rescc['s-maxage']); + } + } + + // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field. + if (this._rescc['max-age']) { + return toNumberOrZero(this._rescc['max-age']); + } + + const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0; + + const serverDate = this.date(); + if (this._resHeaders.expires) { + const expires = Date.parse(this._resHeaders.expires); + // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired"). + if (Number.isNaN(expires) || expires < serverDate) { + return 0; + } + return Math.max(defaultMinTtl, (expires - serverDate) / 1000); + } + + if (this._resHeaders['last-modified']) { + const lastModified = Date.parse(this._resHeaders['last-modified']); + if (isFinite(lastModified) && serverDate > lastModified) { + return Math.max( + defaultMinTtl, + ((serverDate - lastModified) / 1000) * this._cacheHeuristic + ); + } + } + + return defaultMinTtl; + } + + timeToLive() { + const age = this.maxAge() - this.age(); + const staleIfErrorAge = age + toNumberOrZero(this._rescc['stale-if-error']); + const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc['stale-while-revalidate']); + return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1000; + } + + stale() { + return this.maxAge() <= this.age(); + } + + _useStaleIfError() { + return this.maxAge() + toNumberOrZero(this._rescc['stale-if-error']) > this.age(); + } + + useStaleWhileRevalidate() { + return this.maxAge() + toNumberOrZero(this._rescc['stale-while-revalidate']) > this.age(); + } + + static fromObject(obj) { + return new this(undefined, undefined, { _fromObject: obj }); + } + + _fromObject(obj) { + if (this._responseTime) throw Error('Reinitialized'); + if (!obj || obj.v !== 1) throw Error('Invalid serialization'); + + this._responseTime = obj.t; + this._isShared = obj.sh; + this._cacheHeuristic = obj.ch; + this._immutableMinTtl = + obj.imm !== undefined ? obj.imm : 24 * 3600 * 1000; + this._status = obj.st; + this._resHeaders = obj.resh; + this._rescc = obj.rescc; + this._method = obj.m; + this._url = obj.u; + this._host = obj.h; + this._noAuthorization = obj.a; + this._reqHeaders = obj.reqh; + this._reqcc = obj.reqcc; + } + + toObject() { + return { + v: 1, + t: this._responseTime, + sh: this._isShared, + ch: this._cacheHeuristic, + imm: this._immutableMinTtl, + st: this._status, + resh: this._resHeaders, + rescc: this._rescc, + m: this._method, + u: this._url, + h: this._host, + a: this._noAuthorization, + reqh: this._reqHeaders, + reqcc: this._reqcc, + }; + } + + /** + * Headers for sending to the origin server to revalidate stale response. + * Allows server to return 304 to allow reuse of the previous response. + * + * Hop by hop headers are always stripped. + * Revalidation headers may be added or removed, depending on request. + */ + revalidationHeaders(incomingReq) { + this._assertRequestHasHeaders(incomingReq); + const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers); + + // This implementation does not understand range requests + delete headers['if-range']; + + if (!this._requestMatches(incomingReq, true) || !this.storable()) { + // revalidation allowed via HEAD + // not for the same resource, or wasn't allowed to be cached anyway + delete headers['if-none-match']; + delete headers['if-modified-since']; + return headers; + } + + /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */ + if (this._resHeaders.etag) { + headers['if-none-match'] = headers['if-none-match'] + ? `${headers['if-none-match']}, ${this._resHeaders.etag}` + : this._resHeaders.etag; + } + + // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request. + const forbidsWeakValidators = + headers['accept-ranges'] || + headers['if-match'] || + headers['if-unmodified-since'] || + (this._method && this._method != 'GET'); + + /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server. + Note: This implementation does not understand partial responses (206) */ + if (forbidsWeakValidators) { + delete headers['if-modified-since']; + + if (headers['if-none-match']) { + const etags = headers['if-none-match'] + .split(/,/) + .filter(etag => { + return !/^\s*W\//.test(etag); + }); + if (!etags.length) { + delete headers['if-none-match']; + } else { + headers['if-none-match'] = etags.join(',').trim(); + } + } + } else if ( + this._resHeaders['last-modified'] && + !headers['if-modified-since'] + ) { + headers['if-modified-since'] = this._resHeaders['last-modified']; + } + + return headers; + } + + /** + * Creates new CachePolicy with information combined from the previews response, + * and the new revalidation response. + * + * Returns {policy, modified} where modified is a boolean indicating + * whether the response body has been modified, and old cached body can't be used. + * + * @return {Object} {policy: CachePolicy, modified: Boolean} + */ + revalidatedPolicy(request, response) { + this._assertRequestHasHeaders(request); + if(this._useStaleIfError() && isErrorResponse(response)) { // I consider the revalidation request unsuccessful + return { + modified: false, + matches: false, + policy: this, + }; + } + if (!response || !response.headers) { + throw Error('Response headers missing'); + } + + // These aren't going to be supported exactly, since one CachePolicy object + // doesn't know about all the other cached objects. + let matches = false; + if (response.status !== undefined && response.status != 304) { + matches = false; + } else if ( + response.headers.etag && + !/^\s*W\//.test(response.headers.etag) + ) { + // "All of the stored responses with the same strong validator are selected. + // If none of the stored responses contain the same strong validator, + // then the cache MUST NOT use the new response to update any stored responses." + matches = + this._resHeaders.etag && + this._resHeaders.etag.replace(/^\s*W\//, '') === + response.headers.etag; + } else if (this._resHeaders.etag && response.headers.etag) { + // "If the new response contains a weak validator and that validator corresponds + // to one of the cache's stored responses, + // then the most recent of those matching stored responses is selected for update." + matches = + this._resHeaders.etag.replace(/^\s*W\//, '') === + response.headers.etag.replace(/^\s*W\//, ''); + } else if (this._resHeaders['last-modified']) { + matches = + this._resHeaders['last-modified'] === + response.headers['last-modified']; + } else { + // If the new response does not include any form of validator (such as in the case where + // a client generates an If-Modified-Since request from a source other than the Last-Modified + // response header field), and there is only one stored response, and that stored response also + // lacks a validator, then that stored response is selected for update. + if ( + !this._resHeaders.etag && + !this._resHeaders['last-modified'] && + !response.headers.etag && + !response.headers['last-modified'] + ) { + matches = true; + } + } + + if (!matches) { + return { + policy: new this.constructor(request, response), + // Client receiving 304 without body, even if it's invalid/mismatched has no option + // but to reuse a cached body. We don't have a good way to tell clients to do + // error recovery in such case. + modified: response.status != 304, + matches: false, + }; + } + + // use other header fields provided in the 304 (Not Modified) response to replace all instances + // of the corresponding header fields in the stored response. + const headers = {}; + for (const k in this._resHeaders) { + headers[k] = + k in response.headers && !excludedFromRevalidationUpdate[k] + ? response.headers[k] + : this._resHeaders[k]; + } + + const newResponse = Object.assign({}, response, { + status: this._status, + method: this._method, + headers, + }); + return { + policy: new this.constructor(request, newResponse, { + shared: this._isShared, + cacheHeuristic: this._cacheHeuristic, + immutableMinTimeToLive: this._immutableMinTtl, + }), + modified: false, + matches: true, + }; + } +}; + + +/***/ }), + +/***/ 25396: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +var parser = __nccwpck_require__(89278); +var signer = __nccwpck_require__(29549); +var verify = __nccwpck_require__(65491); +var utils = __nccwpck_require__(51617); + + + +///--- API + +module.exports = { + + parse: parser.parseRequest, + parseRequest: parser.parseRequest, + + sign: signer.signRequest, + signRequest: signer.signRequest, + createSigner: signer.createSigner, + isSigner: signer.isSigner, + + sshKeyToPEM: utils.sshKeyToPEM, + sshKeyFingerprint: utils.fingerprint, + pemToRsaSSHKey: utils.pemToRsaSSHKey, + + verify: verify.verifySignature, + verifySignature: verify.verifySignature, + verifyHMAC: verify.verifyHMAC +}; + + +/***/ }), + +/***/ 89278: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2012 Joyent, Inc. All rights reserved. + +var assert = __nccwpck_require__(41706); +var util = __nccwpck_require__(73837); +var utils = __nccwpck_require__(51617); + + + +///--- Globals + +var HASH_ALGOS = utils.HASH_ALGOS; +var PK_ALGOS = utils.PK_ALGOS; +var HttpSignatureError = utils.HttpSignatureError; +var InvalidAlgorithmError = utils.InvalidAlgorithmError; +var validateAlgorithm = utils.validateAlgorithm; + +var State = { + New: 0, + Params: 1 +}; + +var ParamsState = { + Name: 0, + Quote: 1, + Value: 2, + Comma: 3 +}; + + +///--- Specific Errors + + +function ExpiredRequestError(message) { + HttpSignatureError.call(this, message, ExpiredRequestError); +} +util.inherits(ExpiredRequestError, HttpSignatureError); + + +function InvalidHeaderError(message) { + HttpSignatureError.call(this, message, InvalidHeaderError); +} +util.inherits(InvalidHeaderError, HttpSignatureError); + + +function InvalidParamsError(message) { + HttpSignatureError.call(this, message, InvalidParamsError); +} +util.inherits(InvalidParamsError, HttpSignatureError); + + +function MissingHeaderError(message) { + HttpSignatureError.call(this, message, MissingHeaderError); +} +util.inherits(MissingHeaderError, HttpSignatureError); + +function StrictParsingError(message) { + HttpSignatureError.call(this, message, StrictParsingError); +} +util.inherits(StrictParsingError, HttpSignatureError); + +///--- Exported API + +module.exports = { + + /** + * Parses the 'Authorization' header out of an http.ServerRequest object. + * + * Note that this API will fully validate the Authorization header, and throw + * on any error. It will not however check the signature, or the keyId format + * as those are specific to your environment. You can use the options object + * to pass in extra constraints. + * + * As a response object you can expect this: + * + * { + * "scheme": "Signature", + * "params": { + * "keyId": "foo", + * "algorithm": "rsa-sha256", + * "headers": [ + * "date" or "x-date", + * "digest" + * ], + * "signature": "base64" + * }, + * "signingString": "ready to be passed to crypto.verify()" + * } + * + * @param {Object} request an http.ServerRequest. + * @param {Object} options an optional options object with: + * - clockSkew: allowed clock skew in seconds (default 300). + * - headers: required header names (def: date or x-date) + * - algorithms: algorithms to support (default: all). + * - strict: should enforce latest spec parsing + * (default: false). + * @return {Object} parsed out object (see above). + * @throws {TypeError} on invalid input. + * @throws {InvalidHeaderError} on an invalid Authorization header error. + * @throws {InvalidParamsError} if the params in the scheme are invalid. + * @throws {MissingHeaderError} if the params indicate a header not present, + * either in the request headers from the params, + * or not in the params from a required header + * in options. + * @throws {StrictParsingError} if old attributes are used in strict parsing + * mode. + * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew. + */ + parseRequest: function parseRequest(request, options) { + assert.object(request, 'request'); + assert.object(request.headers, 'request.headers'); + if (options === undefined) { + options = {}; + } + if (options.headers === undefined) { + options.headers = [request.headers['x-date'] ? 'x-date' : 'date']; + } + assert.object(options, 'options'); + assert.arrayOfString(options.headers, 'options.headers'); + assert.optionalFinite(options.clockSkew, 'options.clockSkew'); + + var authzHeaderName = options.authorizationHeaderName || 'authorization'; + + if (!request.headers[authzHeaderName]) { + throw new MissingHeaderError('no ' + authzHeaderName + ' header ' + + 'present in the request'); + } + + options.clockSkew = options.clockSkew || 300; + + + var i = 0; + var state = State.New; + var substate = ParamsState.Name; + var tmpName = ''; + var tmpValue = ''; + + var parsed = { + scheme: '', + params: {}, + signingString: '' + }; + + var authz = request.headers[authzHeaderName]; + for (i = 0; i < authz.length; i++) { + var c = authz.charAt(i); + + switch (Number(state)) { + + case State.New: + if (c !== ' ') parsed.scheme += c; + else state = State.Params; + break; + + case State.Params: + switch (Number(substate)) { + + case ParamsState.Name: + var code = c.charCodeAt(0); + // restricted name of A-Z / a-z + if ((code >= 0x41 && code <= 0x5a) || // A-Z + (code >= 0x61 && code <= 0x7a)) { // a-z + tmpName += c; + } else if (c === '=') { + if (tmpName.length === 0) + throw new InvalidHeaderError('bad param format'); + substate = ParamsState.Quote; + } else { + throw new InvalidHeaderError('bad param format'); + } + break; + + case ParamsState.Quote: + if (c === '"') { + tmpValue = ''; + substate = ParamsState.Value; + } else { + throw new InvalidHeaderError('bad param format'); + } + break; + + case ParamsState.Value: + if (c === '"') { + parsed.params[tmpName] = tmpValue; + substate = ParamsState.Comma; + } else { + tmpValue += c; + } + break; + + case ParamsState.Comma: + if (c === ',') { + tmpName = ''; + substate = ParamsState.Name; + } else { + throw new InvalidHeaderError('bad param format'); + } + break; + + default: + throw new Error('Invalid substate'); + } + break; + + default: + throw new Error('Invalid substate'); + } + + } + + if (!parsed.params.headers || parsed.params.headers === '') { + if (request.headers['x-date']) { + parsed.params.headers = ['x-date']; + } else { + parsed.params.headers = ['date']; + } + } else { + parsed.params.headers = parsed.params.headers.split(' '); + } + + // Minimally validate the parsed object + if (!parsed.scheme || parsed.scheme !== 'Signature') + throw new InvalidHeaderError('scheme was not "Signature"'); + + if (!parsed.params.keyId) + throw new InvalidHeaderError('keyId was not specified'); + + if (!parsed.params.algorithm) + throw new InvalidHeaderError('algorithm was not specified'); + + if (!parsed.params.signature) + throw new InvalidHeaderError('signature was not specified'); + + // Check the algorithm against the official list + parsed.params.algorithm = parsed.params.algorithm.toLowerCase(); + try { + validateAlgorithm(parsed.params.algorithm); + } catch (e) { + if (e instanceof InvalidAlgorithmError) + throw (new InvalidParamsError(parsed.params.algorithm + ' is not ' + + 'supported')); + else + throw (e); + } + + // Build the signingString + for (i = 0; i < parsed.params.headers.length; i++) { + var h = parsed.params.headers[i].toLowerCase(); + parsed.params.headers[i] = h; + + if (h === 'request-line') { + if (!options.strict) { + /* + * We allow headers from the older spec drafts if strict parsing isn't + * specified in options. + */ + parsed.signingString += + request.method + ' ' + request.url + ' HTTP/' + request.httpVersion; + } else { + /* Strict parsing doesn't allow older draft headers. */ + throw (new StrictParsingError('request-line is not a valid header ' + + 'with strict parsing enabled.')); + } + } else if (h === '(request-target)') { + parsed.signingString += + '(request-target): ' + request.method.toLowerCase() + ' ' + + request.url; + } else { + var value = request.headers[h]; + if (value === undefined) + throw new MissingHeaderError(h + ' was not in the request'); + parsed.signingString += h + ': ' + value; + } + + if ((i + 1) < parsed.params.headers.length) + parsed.signingString += '\n'; + } + + // Check against the constraints + var date; + if (request.headers.date || request.headers['x-date']) { + if (request.headers['x-date']) { + date = new Date(request.headers['x-date']); + } else { + date = new Date(request.headers.date); + } + var now = new Date(); + var skew = Math.abs(now.getTime() - date.getTime()); + + if (skew > options.clockSkew * 1000) { + throw new ExpiredRequestError('clock skew of ' + + (skew / 1000) + + 's was greater than ' + + options.clockSkew + 's'); + } + } + + options.headers.forEach(function (hdr) { + // Remember that we already checked any headers in the params + // were in the request, so if this passes we're good. + if (parsed.params.headers.indexOf(hdr.toLowerCase()) < 0) + throw new MissingHeaderError(hdr + ' was not a signed header'); + }); + + if (options.algorithms) { + if (options.algorithms.indexOf(parsed.params.algorithm) === -1) + throw new InvalidParamsError(parsed.params.algorithm + + ' is not a supported algorithm'); + } + + parsed.algorithm = parsed.params.algorithm.toUpperCase(); + parsed.keyId = parsed.params.keyId; + return parsed; + } + +}; + + +/***/ }), + +/***/ 29549: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2012 Joyent, Inc. All rights reserved. + +var assert = __nccwpck_require__(41706); +var crypto = __nccwpck_require__(6113); +var http = __nccwpck_require__(13685); +var util = __nccwpck_require__(73837); +var sshpk = __nccwpck_require__(8547); +var jsprim = __nccwpck_require__(25738); +var utils = __nccwpck_require__(51617); + +var sprintf = (__nccwpck_require__(73837).format); + +var HASH_ALGOS = utils.HASH_ALGOS; +var PK_ALGOS = utils.PK_ALGOS; +var InvalidAlgorithmError = utils.InvalidAlgorithmError; +var HttpSignatureError = utils.HttpSignatureError; +var validateAlgorithm = utils.validateAlgorithm; + +///--- Globals + +var AUTHZ_FMT = + 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"'; + +///--- Specific Errors + +function MissingHeaderError(message) { + HttpSignatureError.call(this, message, MissingHeaderError); +} +util.inherits(MissingHeaderError, HttpSignatureError); + +function StrictParsingError(message) { + HttpSignatureError.call(this, message, StrictParsingError); +} +util.inherits(StrictParsingError, HttpSignatureError); + +/* See createSigner() */ +function RequestSigner(options) { + assert.object(options, 'options'); + + var alg = []; + if (options.algorithm !== undefined) { + assert.string(options.algorithm, 'options.algorithm'); + alg = validateAlgorithm(options.algorithm); + } + this.rs_alg = alg; + + /* + * RequestSigners come in two varieties: ones with an rs_signFunc, and ones + * with an rs_signer. + * + * rs_signFunc-based RequestSigners have to build up their entire signing + * string within the rs_lines array and give it to rs_signFunc as a single + * concat'd blob. rs_signer-based RequestSigners can add a line at a time to + * their signing state by using rs_signer.update(), thus only needing to + * buffer the hash function state and one line at a time. + */ + if (options.sign !== undefined) { + assert.func(options.sign, 'options.sign'); + this.rs_signFunc = options.sign; + + } else if (alg[0] === 'hmac' && options.key !== undefined) { + assert.string(options.keyId, 'options.keyId'); + this.rs_keyId = options.keyId; + + if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key)) + throw (new TypeError('options.key for HMAC must be a string or Buffer')); + + /* + * Make an rs_signer for HMACs, not a rs_signFunc -- HMACs digest their + * data in chunks rather than requiring it all to be given in one go + * at the end, so they are more similar to signers than signFuncs. + */ + this.rs_signer = crypto.createHmac(alg[1].toUpperCase(), options.key); + this.rs_signer.sign = function () { + var digest = this.digest('base64'); + return ({ + hashAlgorithm: alg[1], + toString: function () { return (digest); } + }); + }; + + } else if (options.key !== undefined) { + var key = options.key; + if (typeof (key) === 'string' || Buffer.isBuffer(key)) + key = sshpk.parsePrivateKey(key); + + assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]), + 'options.key must be a sshpk.PrivateKey'); + this.rs_key = key; + + assert.string(options.keyId, 'options.keyId'); + this.rs_keyId = options.keyId; + + if (!PK_ALGOS[key.type]) { + throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' + + 'keys are not supported')); + } + + if (alg[0] !== undefined && key.type !== alg[0]) { + throw (new InvalidAlgorithmError('options.key must be a ' + + alg[0].toUpperCase() + ' key, was given a ' + + key.type.toUpperCase() + ' key instead')); + } + + this.rs_signer = key.createSign(alg[1]); + + } else { + throw (new TypeError('options.sign (func) or options.key is required')); + } + + this.rs_headers = []; + this.rs_lines = []; +} + +/** + * Adds a header to be signed, with its value, into this signer. + * + * @param {String} header + * @param {String} value + * @return {String} value written + */ +RequestSigner.prototype.writeHeader = function (header, value) { + assert.string(header, 'header'); + header = header.toLowerCase(); + assert.string(value, 'value'); + + this.rs_headers.push(header); + + if (this.rs_signFunc) { + this.rs_lines.push(header + ': ' + value); + + } else { + var line = header + ': ' + value; + if (this.rs_headers.length > 0) + line = '\n' + line; + this.rs_signer.update(line); + } + + return (value); +}; + +/** + * Adds a default Date header, returning its value. + * + * @return {String} + */ +RequestSigner.prototype.writeDateHeader = function () { + return (this.writeHeader('date', jsprim.rfc1123(new Date()))); +}; + +/** + * Adds the request target line to be signed. + * + * @param {String} method, HTTP method (e.g. 'get', 'post', 'put') + * @param {String} path + */ +RequestSigner.prototype.writeTarget = function (method, path) { + assert.string(method, 'method'); + assert.string(path, 'path'); + method = method.toLowerCase(); + this.writeHeader('(request-target)', method + ' ' + path); +}; + +/** + * Calculate the value for the Authorization header on this request + * asynchronously. + * + * @param {Func} callback (err, authz) + */ +RequestSigner.prototype.sign = function (cb) { + assert.func(cb, 'callback'); + + if (this.rs_headers.length < 1) + throw (new Error('At least one header must be signed')); + + var alg, authz; + if (this.rs_signFunc) { + var data = this.rs_lines.join('\n'); + var self = this; + this.rs_signFunc(data, function (err, sig) { + if (err) { + cb(err); + return; + } + try { + assert.object(sig, 'signature'); + assert.string(sig.keyId, 'signature.keyId'); + assert.string(sig.algorithm, 'signature.algorithm'); + assert.string(sig.signature, 'signature.signature'); + alg = validateAlgorithm(sig.algorithm); + + authz = sprintf(AUTHZ_FMT, + sig.keyId, + sig.algorithm, + self.rs_headers.join(' '), + sig.signature); + } catch (e) { + cb(e); + return; + } + cb(null, authz); + }); + + } else { + try { + var sigObj = this.rs_signer.sign(); + } catch (e) { + cb(e); + return; + } + alg = (this.rs_alg[0] || this.rs_key.type) + '-' + sigObj.hashAlgorithm; + var signature = sigObj.toString(); + authz = sprintf(AUTHZ_FMT, + this.rs_keyId, + alg, + this.rs_headers.join(' '), + signature); + cb(null, authz); + } +}; + +///--- Exported API + +module.exports = { + /** + * Identifies whether a given object is a request signer or not. + * + * @param {Object} object, the object to identify + * @returns {Boolean} + */ + isSigner: function (obj) { + if (typeof (obj) === 'object' && obj instanceof RequestSigner) + return (true); + return (false); + }, + + /** + * Creates a request signer, used to asynchronously build a signature + * for a request (does not have to be an http.ClientRequest). + * + * @param {Object} options, either: + * - {String} keyId + * - {String|Buffer} key + * - {String} algorithm (optional, required for HMAC) + * or: + * - {Func} sign (data, cb) + * @return {RequestSigner} + */ + createSigner: function createSigner(options) { + return (new RequestSigner(options)); + }, + + /** + * Adds an 'Authorization' header to an http.ClientRequest object. + * + * Note that this API will add a Date header if it's not already set. Any + * other headers in the options.headers array MUST be present, or this + * will throw. + * + * You shouldn't need to check the return type; it's just there if you want + * to be pedantic. + * + * The optional flag indicates whether parsing should use strict enforcement + * of the version draft-cavage-http-signatures-04 of the spec or beyond. + * The default is to be loose and support + * older versions for compatibility. + * + * @param {Object} request an instance of http.ClientRequest. + * @param {Object} options signing parameters object: + * - {String} keyId required. + * - {String} key required (either a PEM or HMAC key). + * - {Array} headers optional; defaults to ['date']. + * - {String} algorithm optional (unless key is HMAC); + * default is the same as the sshpk default + * signing algorithm for the type of key given + * - {String} httpVersion optional; defaults to '1.1'. + * - {Boolean} strict optional; defaults to 'false'. + * @return {Boolean} true if Authorization (and optionally Date) were added. + * @throws {TypeError} on bad parameter types (input). + * @throws {InvalidAlgorithmError} if algorithm was bad or incompatible with + * the given key. + * @throws {sshpk.KeyParseError} if key was bad. + * @throws {MissingHeaderError} if a header to be signed was specified but + * was not present. + */ + signRequest: function signRequest(request, options) { + assert.object(request, 'request'); + assert.object(options, 'options'); + assert.optionalString(options.algorithm, 'options.algorithm'); + assert.string(options.keyId, 'options.keyId'); + assert.optionalArrayOfString(options.headers, 'options.headers'); + assert.optionalString(options.httpVersion, 'options.httpVersion'); + + if (!request.getHeader('Date')) + request.setHeader('Date', jsprim.rfc1123(new Date())); + if (!options.headers) + options.headers = ['date']; + if (!options.httpVersion) + options.httpVersion = '1.1'; + + var alg = []; + if (options.algorithm) { + options.algorithm = options.algorithm.toLowerCase(); + alg = validateAlgorithm(options.algorithm); + } + + var i; + var stringToSign = ''; + for (i = 0; i < options.headers.length; i++) { + if (typeof (options.headers[i]) !== 'string') + throw new TypeError('options.headers must be an array of Strings'); + + var h = options.headers[i].toLowerCase(); + + if (h === 'request-line') { + if (!options.strict) { + /** + * We allow headers from the older spec drafts if strict parsing isn't + * specified in options. + */ + stringToSign += + request.method + ' ' + request.path + ' HTTP/' + + options.httpVersion; + } else { + /* Strict parsing doesn't allow older draft headers. */ + throw (new StrictParsingError('request-line is not a valid header ' + + 'with strict parsing enabled.')); + } + } else if (h === '(request-target)') { + stringToSign += + '(request-target): ' + request.method.toLowerCase() + ' ' + + request.path; + } else { + var value = request.getHeader(h); + if (value === undefined || value === '') { + throw new MissingHeaderError(h + ' was not in the request'); + } + stringToSign += h + ': ' + value; + } + + if ((i + 1) < options.headers.length) + stringToSign += '\n'; + } + + /* This is just for unit tests. */ + if (request.hasOwnProperty('_stringToSign')) { + request._stringToSign = stringToSign; + } + + var signature; + if (alg[0] === 'hmac') { + if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key)) + throw (new TypeError('options.key must be a string or Buffer')); + + var hmac = crypto.createHmac(alg[1].toUpperCase(), options.key); + hmac.update(stringToSign); + signature = hmac.digest('base64'); + + } else { + var key = options.key; + if (typeof (key) === 'string' || Buffer.isBuffer(key)) + key = sshpk.parsePrivateKey(options.key); + + assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]), + 'options.key must be a sshpk.PrivateKey'); + + if (!PK_ALGOS[key.type]) { + throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' + + 'keys are not supported')); + } + + if (alg[0] !== undefined && key.type !== alg[0]) { + throw (new InvalidAlgorithmError('options.key must be a ' + + alg[0].toUpperCase() + ' key, was given a ' + + key.type.toUpperCase() + ' key instead')); + } + + var signer = key.createSign(alg[1]); + signer.update(stringToSign); + var sigObj = signer.sign(); + if (!HASH_ALGOS[sigObj.hashAlgorithm]) { + throw (new InvalidAlgorithmError(sigObj.hashAlgorithm.toUpperCase() + + ' is not a supported hash algorithm')); + } + options.algorithm = key.type + '-' + sigObj.hashAlgorithm; + signature = sigObj.toString(); + assert.notStrictEqual(signature, '', 'empty signature produced'); + } + + var authzHeaderName = options.authorizationHeaderName || 'Authorization'; + + request.setHeader(authzHeaderName, sprintf(AUTHZ_FMT, + options.keyId, + options.algorithm, + options.headers.join(' '), + signature)); + + return true; + } + +}; + + +/***/ }), + +/***/ 51617: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2012 Joyent, Inc. All rights reserved. + +var assert = __nccwpck_require__(41706); +var sshpk = __nccwpck_require__(8547); +var util = __nccwpck_require__(73837); + +var HASH_ALGOS = { + 'sha1': true, + 'sha256': true, + 'sha512': true +}; + +var PK_ALGOS = { + 'rsa': true, + 'dsa': true, + 'ecdsa': true +}; + +function HttpSignatureError(message, caller) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, caller || HttpSignatureError); + + this.message = message; + this.name = caller.name; +} +util.inherits(HttpSignatureError, Error); + +function InvalidAlgorithmError(message) { + HttpSignatureError.call(this, message, InvalidAlgorithmError); +} +util.inherits(InvalidAlgorithmError, HttpSignatureError); + +function validateAlgorithm(algorithm) { + var alg = algorithm.toLowerCase().split('-'); + + if (alg.length !== 2) { + throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' is not a ' + + 'valid algorithm')); + } + + if (alg[0] !== 'hmac' && !PK_ALGOS[alg[0]]) { + throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' type keys ' + + 'are not supported')); + } + + if (!HASH_ALGOS[alg[1]]) { + throw (new InvalidAlgorithmError(alg[1].toUpperCase() + ' is not a ' + + 'supported hash algorithm')); + } + + return (alg); +} + +///--- API + +module.exports = { + + HASH_ALGOS: HASH_ALGOS, + PK_ALGOS: PK_ALGOS, + + HttpSignatureError: HttpSignatureError, + InvalidAlgorithmError: InvalidAlgorithmError, + + validateAlgorithm: validateAlgorithm, + + /** + * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file. + * + * The intent of this module is to interoperate with OpenSSL only, + * specifically the node crypto module's `verify` method. + * + * @param {String} key an OpenSSH public key. + * @return {String} PEM encoded form of the RSA public key. + * @throws {TypeError} on bad input. + * @throws {Error} on invalid ssh key formatted data. + */ + sshKeyToPEM: function sshKeyToPEM(key) { + assert.string(key, 'ssh_key'); + + var k = sshpk.parseKey(key, 'ssh'); + return (k.toString('pem')); + }, + + + /** + * Generates an OpenSSH fingerprint from an ssh public key. + * + * @param {String} key an OpenSSH public key. + * @return {String} key fingerprint. + * @throws {TypeError} on bad input. + * @throws {Error} if what you passed doesn't look like an ssh public key. + */ + fingerprint: function fingerprint(key) { + assert.string(key, 'ssh_key'); + + var k = sshpk.parseKey(key, 'ssh'); + return (k.fingerprint('md5').toString('hex')); + }, + + /** + * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa) + * + * The reverse of the above function. + */ + pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) { + assert.equal('string', typeof (pem), 'typeof pem'); + + var k = sshpk.parseKey(pem, 'pem'); + k.comment = comment; + return (k.toString('ssh')); + } +}; + + +/***/ }), + +/***/ 65491: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +var assert = __nccwpck_require__(41706); +var crypto = __nccwpck_require__(6113); +var sshpk = __nccwpck_require__(8547); +var utils = __nccwpck_require__(51617); + +var HASH_ALGOS = utils.HASH_ALGOS; +var PK_ALGOS = utils.PK_ALGOS; +var InvalidAlgorithmError = utils.InvalidAlgorithmError; +var HttpSignatureError = utils.HttpSignatureError; +var validateAlgorithm = utils.validateAlgorithm; + +///--- Exported API + +module.exports = { + /** + * Verify RSA/DSA signature against public key. You are expected to pass in + * an object that was returned from `parse()`. + * + * @param {Object} parsedSignature the object you got from `parse`. + * @param {String} pubkey RSA/DSA private key PEM. + * @return {Boolean} true if valid, false otherwise. + * @throws {TypeError} if you pass in bad arguments. + * @throws {InvalidAlgorithmError} + */ + verifySignature: function verifySignature(parsedSignature, pubkey) { + assert.object(parsedSignature, 'parsedSignature'); + if (typeof (pubkey) === 'string' || Buffer.isBuffer(pubkey)) + pubkey = sshpk.parseKey(pubkey); + assert.ok(sshpk.Key.isKey(pubkey, [1, 1]), 'pubkey must be a sshpk.Key'); + + var alg = validateAlgorithm(parsedSignature.algorithm); + if (alg[0] === 'hmac' || alg[0] !== pubkey.type) + return (false); + + var v = pubkey.createVerify(alg[1]); + v.update(parsedSignature.signingString); + return (v.verify(parsedSignature.params.signature, 'base64')); + }, + + /** + * Verify HMAC against shared secret. You are expected to pass in an object + * that was returned from `parse()`. + * + * @param {Object} parsedSignature the object you got from `parse`. + * @param {String} secret HMAC shared secret. + * @return {Boolean} true if valid, false otherwise. + * @throws {TypeError} if you pass in bad arguments. + * @throws {InvalidAlgorithmError} + */ + verifyHMAC: function verifyHMAC(parsedSignature, secret) { + assert.object(parsedSignature, 'parsedHMAC'); + assert.string(secret, 'secret'); + + var alg = validateAlgorithm(parsedSignature.algorithm); + if (alg[0] !== 'hmac') + return (false); + + var hashAlg = alg[1].toUpperCase(); + + var hmac = crypto.createHmac(hashAlg, secret); + hmac.update(parsedSignature.signingString); + + /* + * Now double-hash to avoid leaking timing information - there's + * no easy constant-time compare in JS, so we use this approach + * instead. See for more info: + * https://www.isecpartners.com/blog/2011/february/double-hmac- + * verification.aspx + */ + var h1 = crypto.createHmac(hashAlg, secret); + h1.update(hmac.digest()); + h1 = h1.digest(); + var h2 = crypto.createHmac(hashAlg, secret); + h2.update(new Buffer(parsedSignature.params.signature, 'base64')); + h2 = h2.digest(); + + /* Node 0.8 returns strings from .digest(). */ + if (typeof (h1) === 'string') + return (h1 === h2); + /* And node 0.10 lacks the .equals() method on Buffers. */ + if (Buffer.isBuffer(h1) && !h1.equals) + return (h1.toString('binary') === h2.toString('binary')); + + return (h1.equals(h2)); + } +}; + + +/***/ }), + +/***/ 93546: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const EventEmitter = __nccwpck_require__(82361); +const tls = __nccwpck_require__(24404); +const http2 = __nccwpck_require__(85158); +const QuickLRU = __nccwpck_require__(87119); + +const kCurrentStreamsCount = Symbol('currentStreamsCount'); +const kRequest = Symbol('request'); +const kOriginSet = Symbol('cachedOriginSet'); +const kGracefullyClosing = Symbol('gracefullyClosing'); + +const nameKeys = [ + // `http2.connect()` options + 'maxDeflateDynamicTableSize', + 'maxSessionMemory', + 'maxHeaderListPairs', + 'maxOutstandingPings', + 'maxReservedRemoteStreams', + 'maxSendHeaderBlockLength', + 'paddingStrategy', + + // `tls.connect()` options + 'localAddress', + 'path', + 'rejectUnauthorized', + 'minDHSize', + + // `tls.createSecureContext()` options + 'ca', + 'cert', + 'clientCertEngine', + 'ciphers', + 'key', + 'pfx', + 'servername', + 'minVersion', + 'maxVersion', + 'secureProtocol', + 'crl', + 'honorCipherOrder', + 'ecdhCurve', + 'dhparam', + 'secureOptions', + 'sessionIdContext' +]; + +const getSortedIndex = (array, value, compare) => { + let low = 0; + let high = array.length; + + while (low < high) { + const mid = (low + high) >>> 1; + + /* istanbul ignore next */ + if (compare(array[mid], value)) { + // This never gets called because we use descending sort. Better to have this anyway. + low = mid + 1; + } else { + high = mid; + } + } + + return low; +}; + +const compareSessions = (a, b) => { + return a.remoteSettings.maxConcurrentStreams > b.remoteSettings.maxConcurrentStreams; +}; + +// See https://tools.ietf.org/html/rfc8336 +const closeCoveredSessions = (where, session) => { + // Clients SHOULD NOT emit new requests on any connection whose Origin + // Set is a proper subset of another connection's Origin Set, and they + // SHOULD close it once all outstanding requests are satisfied. + for (const coveredSession of where) { + if ( + // The set is a proper subset when its length is less than the other set. + coveredSession[kOriginSet].length < session[kOriginSet].length && + + // And the other set includes all elements of the subset. + coveredSession[kOriginSet].every(origin => session[kOriginSet].includes(origin)) && + + // Makes sure that the session can handle all requests from the covered session. + coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams + ) { + // This allows pending requests to finish and prevents making new requests. + gracefullyClose(coveredSession); + } + } +}; + +// This is basically inverted `closeCoveredSessions(...)`. +const closeSessionIfCovered = (where, coveredSession) => { + for (const session of where) { + if ( + coveredSession[kOriginSet].length < session[kOriginSet].length && + coveredSession[kOriginSet].every(origin => session[kOriginSet].includes(origin)) && + coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams + ) { + gracefullyClose(coveredSession); + } + } +}; + +const getSessions = ({agent, isFree}) => { + const result = {}; + + // eslint-disable-next-line guard-for-in + for (const normalizedOptions in agent.sessions) { + const sessions = agent.sessions[normalizedOptions]; + + const filtered = sessions.filter(session => { + const result = session[Agent.kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams; + + return isFree ? result : !result; + }); + + if (filtered.length !== 0) { + result[normalizedOptions] = filtered; + } + } + + return result; +}; + +const gracefullyClose = session => { + session[kGracefullyClosing] = true; + + if (session[kCurrentStreamsCount] === 0) { + session.close(); + } +}; + +class Agent extends EventEmitter { + constructor({timeout = 60000, maxSessions = Infinity, maxFreeSessions = 10, maxCachedTlsSessions = 100} = {}) { + super(); + + // A session is considered busy when its current streams count + // is equal to or greater than the `maxConcurrentStreams` value. + + // A session is considered free when its current streams count + // is less than the `maxConcurrentStreams` value. + + // SESSIONS[NORMALIZED_OPTIONS] = []; + this.sessions = {}; + + // The queue for creating new sessions. It looks like this: + // QUEUE[NORMALIZED_OPTIONS][NORMALIZED_ORIGIN] = ENTRY_FUNCTION + // + // The entry function has `listeners`, `completed` and `destroyed` properties. + // `listeners` is an array of objects containing `resolve` and `reject` functions. + // `completed` is a boolean. It's set to true after ENTRY_FUNCTION is executed. + // `destroyed` is a boolean. If it's set to true, the session will be destroyed if hasn't connected yet. + this.queue = {}; + + // Each session will use this timeout value. + this.timeout = timeout; + + // Max sessions in total + this.maxSessions = maxSessions; + + // Max free sessions in total + // TODO: decreasing `maxFreeSessions` should close some sessions + this.maxFreeSessions = maxFreeSessions; + + this._freeSessionsCount = 0; + this._sessionsCount = 0; + + // We don't support push streams by default. + this.settings = { + enablePush: false + }; + + // Reusing TLS sessions increases performance. + this.tlsSessionCache = new QuickLRU({maxSize: maxCachedTlsSessions}); + } + + static normalizeOrigin(url, servername) { + if (typeof url === 'string') { + url = new URL(url); + } + + if (servername && url.hostname !== servername) { + url.hostname = servername; + } + + return url.origin; + } + + normalizeOptions(options) { + let normalized = ''; + + if (options) { + for (const key of nameKeys) { + if (options[key]) { + normalized += `:${options[key]}`; + } + } + } + + return normalized; + } + + _tryToCreateNewSession(normalizedOptions, normalizedOrigin) { + if (!(normalizedOptions in this.queue) || !(normalizedOrigin in this.queue[normalizedOptions])) { + return; + } + + const item = this.queue[normalizedOptions][normalizedOrigin]; + + // The entry function can be run only once. + // BUG: The session may be never created when: + // - the first condition is false AND + // - this function is never called with the same arguments in the future. + if (this._sessionsCount < this.maxSessions && !item.completed) { + item.completed = true; + + item(); + } + } + + getSession(origin, options, listeners) { + return new Promise((resolve, reject) => { + if (Array.isArray(listeners)) { + listeners = [...listeners]; + + // Resolve the current promise ASAP, we're just moving the listeners. + // They will be executed at a different time. + resolve(); + } else { + listeners = [{resolve, reject}]; + } + + const normalizedOptions = this.normalizeOptions(options); + const normalizedOrigin = Agent.normalizeOrigin(origin, options && options.servername); + + if (normalizedOrigin === undefined) { + for (const {reject} of listeners) { + reject(new TypeError('The `origin` argument needs to be a string or an URL object')); + } + + return; + } + + if (normalizedOptions in this.sessions) { + const sessions = this.sessions[normalizedOptions]; + + let maxConcurrentStreams = -1; + let currentStreamsCount = -1; + let optimalSession; + + // We could just do this.sessions[normalizedOptions].find(...) but that isn't optimal. + // Additionally, we are looking for session which has biggest current pending streams count. + for (const session of sessions) { + const sessionMaxConcurrentStreams = session.remoteSettings.maxConcurrentStreams; + + if (sessionMaxConcurrentStreams < maxConcurrentStreams) { + break; + } + + if (session[kOriginSet].includes(normalizedOrigin)) { + const sessionCurrentStreamsCount = session[kCurrentStreamsCount]; + + if ( + sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || + session[kGracefullyClosing] || + // Unfortunately the `close` event isn't called immediately, + // so `session.destroyed` is `true`, but `session.closed` is `false`. + session.destroyed + ) { + continue; + } + + // We only need set this once. + if (!optimalSession) { + maxConcurrentStreams = sessionMaxConcurrentStreams; + } + + // We're looking for the session which has biggest current pending stream count, + // in order to minimalize the amount of active sessions. + if (sessionCurrentStreamsCount > currentStreamsCount) { + optimalSession = session; + currentStreamsCount = sessionCurrentStreamsCount; + } + } + } + + if (optimalSession) { + /* istanbul ignore next: safety check */ + if (listeners.length !== 1) { + for (const {reject} of listeners) { + const error = new Error( + `Expected the length of listeners to be 1, got ${listeners.length}.\n` + + 'Please report this to https://github.com/szmarczak/http2-wrapper/' + ); + + reject(error); + } + + return; + } + + listeners[0].resolve(optimalSession); + return; + } + } + + if (normalizedOptions in this.queue) { + if (normalizedOrigin in this.queue[normalizedOptions]) { + // There's already an item in the queue, just attach ourselves to it. + this.queue[normalizedOptions][normalizedOrigin].listeners.push(...listeners); + + // This shouldn't be executed here. + // See the comment inside _tryToCreateNewSession. + this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); + return; + } + } else { + this.queue[normalizedOptions] = {}; + } + + // The entry must be removed from the queue IMMEDIATELY when: + // 1. the session connects successfully, + // 2. an error occurs. + const removeFromQueue = () => { + // Our entry can be replaced. We cannot remove the new one. + if (normalizedOptions in this.queue && this.queue[normalizedOptions][normalizedOrigin] === entry) { + delete this.queue[normalizedOptions][normalizedOrigin]; + + if (Object.keys(this.queue[normalizedOptions]).length === 0) { + delete this.queue[normalizedOptions]; + } + } + }; + + // The main logic is here + const entry = () => { + const name = `${normalizedOrigin}:${normalizedOptions}`; + let receivedSettings = false; + + try { + const session = http2.connect(origin, { + createConnection: this.createConnection, + settings: this.settings, + session: this.tlsSessionCache.get(name), + ...options + }); + session[kCurrentStreamsCount] = 0; + session[kGracefullyClosing] = false; + + const isFree = () => session[kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams; + let wasFree = true; + + session.socket.once('session', tlsSession => { + this.tlsSessionCache.set(name, tlsSession); + }); + + session.once('error', error => { + // Listeners are empty when the session successfully connected. + for (const {reject} of listeners) { + reject(error); + } + + // The connection got broken, purge the cache. + this.tlsSessionCache.delete(name); + }); + + session.setTimeout(this.timeout, () => { + // Terminates all streams owned by this session. + // TODO: Maybe the streams should have a "Session timed out" error? + session.destroy(); + }); + + session.once('close', () => { + if (receivedSettings) { + // 1. If it wasn't free then no need to decrease because + // it has been decreased already in session.request(). + // 2. `stream.once('close')` won't increment the count + // because the session is already closed. + if (wasFree) { + this._freeSessionsCount--; + } + + this._sessionsCount--; + + // This cannot be moved to the stream logic, + // because there may be a session that hadn't made a single request. + const where = this.sessions[normalizedOptions]; + where.splice(where.indexOf(session), 1); + + if (where.length === 0) { + delete this.sessions[normalizedOptions]; + } + } else { + // Broken connection + const error = new Error('Session closed without receiving a SETTINGS frame'); + error.code = 'HTTP2WRAPPER_NOSETTINGS'; + + for (const {reject} of listeners) { + reject(error); + } + + removeFromQueue(); + } + + // There may be another session awaiting. + this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); + }); + + // Iterates over the queue and processes listeners. + const processListeners = () => { + if (!(normalizedOptions in this.queue) || !isFree()) { + return; + } + + for (const origin of session[kOriginSet]) { + if (origin in this.queue[normalizedOptions]) { + const {listeners} = this.queue[normalizedOptions][origin]; + + // Prevents session overloading. + while (listeners.length !== 0 && isFree()) { + // We assume `resolve(...)` calls `request(...)` *directly*, + // otherwise the session will get overloaded. + listeners.shift().resolve(session); + } + + const where = this.queue[normalizedOptions]; + if (where[origin].listeners.length === 0) { + delete where[origin]; + + if (Object.keys(where).length === 0) { + delete this.queue[normalizedOptions]; + break; + } + } + + // We're no longer free, no point in continuing. + if (!isFree()) { + break; + } + } + } + }; + + // The Origin Set cannot shrink. No need to check if it suddenly became covered by another one. + session.on('origin', () => { + session[kOriginSet] = session.originSet; + + if (!isFree()) { + // The session is full. + return; + } + + processListeners(); + + // Close covered sessions (if possible). + closeCoveredSessions(this.sessions[normalizedOptions], session); + }); + + session.once('remoteSettings', () => { + // Fix Node.js bug preventing the process from exiting + session.ref(); + session.unref(); + + this._sessionsCount++; + + // The Agent could have been destroyed already. + if (entry.destroyed) { + const error = new Error('Agent has been destroyed'); + + for (const listener of listeners) { + listener.reject(error); + } + + session.destroy(); + return; + } + + session[kOriginSet] = session.originSet; + + { + const where = this.sessions; + + if (normalizedOptions in where) { + const sessions = where[normalizedOptions]; + sessions.splice(getSortedIndex(sessions, session, compareSessions), 0, session); + } else { + where[normalizedOptions] = [session]; + } + } + + this._freeSessionsCount += 1; + receivedSettings = true; + + this.emit('session', session); + + processListeners(); + removeFromQueue(); + + // TODO: Close last recently used (or least used?) session + if (session[kCurrentStreamsCount] === 0 && this._freeSessionsCount > this.maxFreeSessions) { + session.close(); + } + + // Check if we haven't managed to execute all listeners. + if (listeners.length !== 0) { + // Request for a new session with predefined listeners. + this.getSession(normalizedOrigin, options, listeners); + listeners.length = 0; + } + + // `session.remoteSettings.maxConcurrentStreams` might get increased + session.on('remoteSettings', () => { + processListeners(); + + // In case the Origin Set changes + closeCoveredSessions(this.sessions[normalizedOptions], session); + }); + }); + + // Shim `session.request()` in order to catch all streams + session[kRequest] = session.request; + session.request = (headers, streamOptions) => { + if (session[kGracefullyClosing]) { + throw new Error('The session is gracefully closing. No new streams are allowed.'); + } + + const stream = session[kRequest](headers, streamOptions); + + // The process won't exit until the session is closed or all requests are gone. + session.ref(); + + ++session[kCurrentStreamsCount]; + + if (session[kCurrentStreamsCount] === session.remoteSettings.maxConcurrentStreams) { + this._freeSessionsCount--; + } + + stream.once('close', () => { + wasFree = isFree(); + + --session[kCurrentStreamsCount]; + + if (!session.destroyed && !session.closed) { + closeSessionIfCovered(this.sessions[normalizedOptions], session); + + if (isFree() && !session.closed) { + if (!wasFree) { + this._freeSessionsCount++; + + wasFree = true; + } + + const isEmpty = session[kCurrentStreamsCount] === 0; + + if (isEmpty) { + session.unref(); + } + + if ( + isEmpty && + ( + this._freeSessionsCount > this.maxFreeSessions || + session[kGracefullyClosing] + ) + ) { + session.close(); + } else { + closeCoveredSessions(this.sessions[normalizedOptions], session); + processListeners(); + } + } + } + }); + + return stream; + }; + } catch (error) { + for (const listener of listeners) { + listener.reject(error); + } + + removeFromQueue(); + } + }; + + entry.listeners = listeners; + entry.completed = false; + entry.destroyed = false; + + this.queue[normalizedOptions][normalizedOrigin] = entry; + this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); + }); + } + + request(origin, options, headers, streamOptions) { + return new Promise((resolve, reject) => { + this.getSession(origin, options, [{ + reject, + resolve: session => { + try { + resolve(session.request(headers, streamOptions)); + } catch (error) { + reject(error); + } + } + }]); + }); + } + + createConnection(origin, options) { + return Agent.connect(origin, options); + } + + static connect(origin, options) { + options.ALPNProtocols = ['h2']; + + const port = origin.port || 443; + const host = origin.hostname || origin.host; + + if (typeof options.servername === 'undefined') { + options.servername = host; + } + + return tls.connect(port, host, options); + } + + closeFreeSessions() { + for (const sessions of Object.values(this.sessions)) { + for (const session of sessions) { + if (session[kCurrentStreamsCount] === 0) { + session.close(); + } + } + } + } + + destroy(reason) { + for (const sessions of Object.values(this.sessions)) { + for (const session of sessions) { + session.destroy(reason); + } + } + + for (const entriesOfAuthority of Object.values(this.queue)) { + for (const entry of Object.values(entriesOfAuthority)) { + entry.destroyed = true; + } + } + + // New requests should NOT attach to destroyed sessions + this.queue = {}; + } + + get freeSessions() { + return getSessions({agent: this, isFree: true}); + } + + get busySessions() { + return getSessions({agent: this, isFree: false}); + } +} + +Agent.kCurrentStreamsCount = kCurrentStreamsCount; +Agent.kGracefullyClosing = kGracefullyClosing; + +module.exports = { + Agent, + globalAgent: new Agent() +}; + + +/***/ }), + +/***/ 90940: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const http = __nccwpck_require__(13685); +const https = __nccwpck_require__(95687); +const resolveALPN = __nccwpck_require__(3557); +const QuickLRU = __nccwpck_require__(87119); +const Http2ClientRequest = __nccwpck_require__(53636); +const calculateServerName = __nccwpck_require__(61124); +const urlToOptions = __nccwpck_require__(25024); + +const cache = new QuickLRU({maxSize: 100}); +const queue = new Map(); + +const installSocket = (agent, socket, options) => { + socket._httpMessage = {shouldKeepAlive: true}; + + const onFree = () => { + agent.emit('free', socket, options); + }; + + socket.on('free', onFree); + + const onClose = () => { + agent.removeSocket(socket, options); + }; + + socket.on('close', onClose); + + const onRemove = () => { + agent.removeSocket(socket, options); + socket.off('close', onClose); + socket.off('free', onFree); + socket.off('agentRemove', onRemove); + }; + + socket.on('agentRemove', onRemove); + + agent.emit('free', socket, options); +}; + +const resolveProtocol = async options => { + const name = `${options.host}:${options.port}:${options.ALPNProtocols.sort()}`; + + if (!cache.has(name)) { + if (queue.has(name)) { + const result = await queue.get(name); + return result.alpnProtocol; + } + + const {path, agent} = options; + options.path = options.socketPath; + + const resultPromise = resolveALPN(options); + queue.set(name, resultPromise); + + try { + const {socket, alpnProtocol} = await resultPromise; + cache.set(name, alpnProtocol); + + options.path = path; + + if (alpnProtocol === 'h2') { + // https://github.com/nodejs/node/issues/33343 + socket.destroy(); + } else { + const {globalAgent} = https; + const defaultCreateConnection = https.Agent.prototype.createConnection; + + if (agent) { + if (agent.createConnection === defaultCreateConnection) { + installSocket(agent, socket, options); + } else { + socket.destroy(); + } + } else if (globalAgent.createConnection === defaultCreateConnection) { + installSocket(globalAgent, socket, options); + } else { + socket.destroy(); + } + } + + queue.delete(name); + + return alpnProtocol; + } catch (error) { + queue.delete(name); + + throw error; + } + } + + return cache.get(name); +}; + +module.exports = async (input, options, callback) => { + if (typeof input === 'string' || input instanceof URL) { + input = urlToOptions(new URL(input)); + } + + if (typeof options === 'function') { + callback = options; + options = undefined; + } + + options = { + ALPNProtocols: ['h2', 'http/1.1'], + ...input, + ...options, + resolveSocket: true + }; + + if (!Array.isArray(options.ALPNProtocols) || options.ALPNProtocols.length === 0) { + throw new Error('The `ALPNProtocols` option must be an Array with at least one entry'); + } + + options.protocol = options.protocol || 'https:'; + const isHttps = options.protocol === 'https:'; + + options.host = options.hostname || options.host || 'localhost'; + options.session = options.tlsSession; + options.servername = options.servername || calculateServerName(options); + options.port = options.port || (isHttps ? 443 : 80); + options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent; + + const agents = options.agent; + + if (agents) { + if (agents.addRequest) { + throw new Error('The `options.agent` object can contain only `http`, `https` or `http2` properties'); + } + + options.agent = agents[isHttps ? 'https' : 'http']; + } + + if (isHttps) { + const protocol = await resolveProtocol(options); + + if (protocol === 'h2') { + if (agents) { + options.agent = agents.http2; + } + + return new Http2ClientRequest(options, callback); + } + } + + return http.request(options, callback); +}; + +module.exports.protocolCache = cache; + + +/***/ }), + +/***/ 53636: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const http2 = __nccwpck_require__(85158); +const {Writable} = __nccwpck_require__(12781); +const {Agent, globalAgent} = __nccwpck_require__(93546); +const IncomingMessage = __nccwpck_require__(12208); +const urlToOptions = __nccwpck_require__(25024); +const proxyEvents = __nccwpck_require__(50408); +const isRequestPseudoHeader = __nccwpck_require__(54714); +const { + ERR_INVALID_ARG_TYPE, + ERR_INVALID_PROTOCOL, + ERR_HTTP_HEADERS_SENT, + ERR_INVALID_HTTP_TOKEN, + ERR_HTTP_INVALID_HEADER_VALUE, + ERR_INVALID_CHAR +} = __nccwpck_require__(55767); + +const { + HTTP2_HEADER_STATUS, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_METHOD_CONNECT +} = http2.constants; + +const kHeaders = Symbol('headers'); +const kOrigin = Symbol('origin'); +const kSession = Symbol('session'); +const kOptions = Symbol('options'); +const kFlushedHeaders = Symbol('flushedHeaders'); +const kJobs = Symbol('jobs'); + +const isValidHttpToken = /^[\^`\-\w!#$%&*+.|~]+$/; +const isInvalidHeaderValue = /[^\t\u0020-\u007E\u0080-\u00FF]/; + +class ClientRequest extends Writable { + constructor(input, options, callback) { + super({ + autoDestroy: false + }); + + const hasInput = typeof input === 'string' || input instanceof URL; + if (hasInput) { + input = urlToOptions(input instanceof URL ? input : new URL(input)); + } + + if (typeof options === 'function' || options === undefined) { + // (options, callback) + callback = options; + options = hasInput ? input : {...input}; + } else { + // (input, options, callback) + options = {...input, ...options}; + } + + if (options.h2session) { + this[kSession] = options.h2session; + } else if (options.agent === false) { + this.agent = new Agent({maxFreeSessions: 0}); + } else if (typeof options.agent === 'undefined' || options.agent === null) { + if (typeof options.createConnection === 'function') { + // This is a workaround - we don't have to create the session on our own. + this.agent = new Agent({maxFreeSessions: 0}); + this.agent.createConnection = options.createConnection; + } else { + this.agent = globalAgent; + } + } else if (typeof options.agent.request === 'function') { + this.agent = options.agent; + } else { + throw new ERR_INVALID_ARG_TYPE('options.agent', ['Agent-like Object', 'undefined', 'false'], options.agent); + } + + if (options.protocol && options.protocol !== 'https:') { + throw new ERR_INVALID_PROTOCOL(options.protocol, 'https:'); + } + + const port = options.port || options.defaultPort || (this.agent && this.agent.defaultPort) || 443; + const host = options.hostname || options.host || 'localhost'; + + // Don't enforce the origin via options. It may be changed in an Agent. + delete options.hostname; + delete options.host; + delete options.port; + + const {timeout} = options; + options.timeout = undefined; + + this[kHeaders] = Object.create(null); + this[kJobs] = []; + + this.socket = null; + this.connection = null; + + this.method = options.method || 'GET'; + this.path = options.path; + + this.res = null; + this.aborted = false; + this.reusedSocket = false; + + if (options.headers) { + for (const [header, value] of Object.entries(options.headers)) { + this.setHeader(header, value); + } + } + + if (options.auth && !('authorization' in this[kHeaders])) { + this[kHeaders].authorization = 'Basic ' + Buffer.from(options.auth).toString('base64'); + } + + options.session = options.tlsSession; + options.path = options.socketPath; + + this[kOptions] = options; + + // Clients that generate HTTP/2 requests directly SHOULD use the :authority pseudo-header field instead of the Host header field. + if (port === 443) { + this[kOrigin] = `https://${host}`; + + if (!(':authority' in this[kHeaders])) { + this[kHeaders][':authority'] = host; + } + } else { + this[kOrigin] = `https://${host}:${port}`; + + if (!(':authority' in this[kHeaders])) { + this[kHeaders][':authority'] = `${host}:${port}`; + } + } + + if (timeout) { + this.setTimeout(timeout); + } + + if (callback) { + this.once('response', callback); + } + + this[kFlushedHeaders] = false; + } + + get method() { + return this[kHeaders][HTTP2_HEADER_METHOD]; + } + + set method(value) { + if (value) { + this[kHeaders][HTTP2_HEADER_METHOD] = value.toUpperCase(); + } + } + + get path() { + return this[kHeaders][HTTP2_HEADER_PATH]; + } + + set path(value) { + if (value) { + this[kHeaders][HTTP2_HEADER_PATH] = value; + } + } + + get _mustNotHaveABody() { + return this.method === 'GET' || this.method === 'HEAD' || this.method === 'DELETE'; + } + + _write(chunk, encoding, callback) { + // https://github.com/nodejs/node/blob/654df09ae0c5e17d1b52a900a545f0664d8c7627/lib/internal/http2/util.js#L148-L156 + if (this._mustNotHaveABody) { + callback(new Error('The GET, HEAD and DELETE methods must NOT have a body')); + /* istanbul ignore next: Node.js 12 throws directly */ + return; + } + + this.flushHeaders(); + + const callWrite = () => this._request.write(chunk, encoding, callback); + if (this._request) { + callWrite(); + } else { + this[kJobs].push(callWrite); + } + } + + _final(callback) { + if (this.destroyed) { + return; + } + + this.flushHeaders(); + + const callEnd = () => { + // For GET, HEAD and DELETE + if (this._mustNotHaveABody) { + callback(); + return; + } + + this._request.end(callback); + }; + + if (this._request) { + callEnd(); + } else { + this[kJobs].push(callEnd); + } + } + + abort() { + if (this.res && this.res.complete) { + return; + } + + if (!this.aborted) { + process.nextTick(() => this.emit('abort')); + } + + this.aborted = true; + + this.destroy(); + } + + _destroy(error, callback) { + if (this.res) { + this.res._dump(); + } + + if (this._request) { + this._request.destroy(); + } + + callback(error); + } + + async flushHeaders() { + if (this[kFlushedHeaders] || this.destroyed) { + return; + } + + this[kFlushedHeaders] = true; + + const isConnectMethod = this.method === HTTP2_METHOD_CONNECT; + + // The real magic is here + const onStream = stream => { + this._request = stream; + + if (this.destroyed) { + stream.destroy(); + return; + } + + // Forwards `timeout`, `continue`, `close` and `error` events to this instance. + if (!isConnectMethod) { + proxyEvents(stream, this, ['timeout', 'continue', 'close', 'error']); + } + + // Wait for the `finish` event. We don't want to emit the `response` event + // before `request.end()` is called. + const waitForEnd = fn => { + return (...args) => { + if (!this.writable && !this.destroyed) { + fn(...args); + } else { + this.once('finish', () => { + fn(...args); + }); + } + }; + }; + + // This event tells we are ready to listen for the data. + stream.once('response', waitForEnd((headers, flags, rawHeaders) => { + // If we were to emit raw request stream, it would be as fast as the native approach. + // Note that wrapping the raw stream in a Proxy instance won't improve the performance (already tested it). + const response = new IncomingMessage(this.socket, stream.readableHighWaterMark); + this.res = response; + + response.req = this; + response.statusCode = headers[HTTP2_HEADER_STATUS]; + response.headers = headers; + response.rawHeaders = rawHeaders; + + response.once('end', () => { + if (this.aborted) { + response.aborted = true; + response.emit('aborted'); + } else { + response.complete = true; + + // Has no effect, just be consistent with the Node.js behavior + response.socket = null; + response.connection = null; + } + }); + + if (isConnectMethod) { + response.upgrade = true; + + // The HTTP1 API says the socket is detached here, + // but we can't do that so we pass the original HTTP2 request. + if (this.emit('connect', response, stream, Buffer.alloc(0))) { + this.emit('close'); + } else { + // No listeners attached, destroy the original request. + stream.destroy(); + } + } else { + // Forwards data + stream.on('data', chunk => { + if (!response._dumped && !response.push(chunk)) { + stream.pause(); + } + }); + + stream.once('end', () => { + response.push(null); + }); + + if (!this.emit('response', response)) { + // No listeners attached, dump the response. + response._dump(); + } + } + })); + + // Emits `information` event + stream.once('headers', waitForEnd( + headers => this.emit('information', {statusCode: headers[HTTP2_HEADER_STATUS]}) + )); + + stream.once('trailers', waitForEnd((trailers, flags, rawTrailers) => { + const {res} = this; + + // Assigns trailers to the response object. + res.trailers = trailers; + res.rawTrailers = rawTrailers; + })); + + const {socket} = stream.session; + this.socket = socket; + this.connection = socket; + + for (const job of this[kJobs]) { + job(); + } + + this.emit('socket', this.socket); + }; + + // Makes a HTTP2 request + if (this[kSession]) { + try { + onStream(this[kSession].request(this[kHeaders])); + } catch (error) { + this.emit('error', error); + } + } else { + this.reusedSocket = true; + + try { + onStream(await this.agent.request(this[kOrigin], this[kOptions], this[kHeaders])); + } catch (error) { + this.emit('error', error); + } + } + } + + getHeader(name) { + if (typeof name !== 'string') { + throw new ERR_INVALID_ARG_TYPE('name', 'string', name); + } + + return this[kHeaders][name.toLowerCase()]; + } + + get headersSent() { + return this[kFlushedHeaders]; + } + + removeHeader(name) { + if (typeof name !== 'string') { + throw new ERR_INVALID_ARG_TYPE('name', 'string', name); + } + + if (this.headersSent) { + throw new ERR_HTTP_HEADERS_SENT('remove'); + } + + delete this[kHeaders][name.toLowerCase()]; + } + + setHeader(name, value) { + if (this.headersSent) { + throw new ERR_HTTP_HEADERS_SENT('set'); + } + + if (typeof name !== 'string' || (!isValidHttpToken.test(name) && !isRequestPseudoHeader(name))) { + throw new ERR_INVALID_HTTP_TOKEN('Header name', name); + } + + if (typeof value === 'undefined') { + throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name); + } + + if (isInvalidHeaderValue.test(value)) { + throw new ERR_INVALID_CHAR('header content', name); + } + + this[kHeaders][name.toLowerCase()] = value; + } + + setNoDelay() { + // HTTP2 sockets cannot be malformed, do nothing. + } + + setSocketKeepAlive() { + // HTTP2 sockets cannot be malformed, do nothing. + } + + setTimeout(ms, callback) { + const applyTimeout = () => this._request.setTimeout(ms, callback); + + if (this._request) { + applyTimeout(); + } else { + this[kJobs].push(applyTimeout); + } + + return this; + } + + get maxHeadersCount() { + if (!this.destroyed && this._request) { + return this._request.session.localSettings.maxHeaderListSize; + } + + return undefined; + } + + set maxHeadersCount(_value) { + // Updating HTTP2 settings would affect all requests, do nothing. + } +} + +module.exports = ClientRequest; + + +/***/ }), + +/***/ 12208: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const {Readable} = __nccwpck_require__(12781); + +class IncomingMessage extends Readable { + constructor(socket, highWaterMark) { + super({ + highWaterMark, + autoDestroy: false + }); + + this.statusCode = null; + this.statusMessage = ''; + this.httpVersion = '2.0'; + this.httpVersionMajor = 2; + this.httpVersionMinor = 0; + this.headers = {}; + this.trailers = {}; + this.req = null; + + this.aborted = false; + this.complete = false; + this.upgrade = null; + + this.rawHeaders = []; + this.rawTrailers = []; + + this.socket = socket; + this.connection = socket; + + this._dumped = false; + } + + _destroy(error) { + this.req._request.destroy(error); + } + + setTimeout(ms, callback) { + this.req.setTimeout(ms, callback); + return this; + } + + _dump() { + if (!this._dumped) { + this._dumped = true; + + this.removeAllListeners('data'); + this.resume(); + } + } + + _read() { + if (this.req) { + this.req._request.resume(); + } + } +} + +module.exports = IncomingMessage; + + +/***/ }), + +/***/ 56728: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const http2 = __nccwpck_require__(85158); +const agent = __nccwpck_require__(93546); +const ClientRequest = __nccwpck_require__(53636); +const IncomingMessage = __nccwpck_require__(12208); +const auto = __nccwpck_require__(90940); + +const request = (url, options, callback) => { + return new ClientRequest(url, options, callback); +}; + +const get = (url, options, callback) => { + // eslint-disable-next-line unicorn/prevent-abbreviations + const req = new ClientRequest(url, options, callback); + req.end(); + + return req; +}; + +module.exports = { + ...http2, + ClientRequest, + IncomingMessage, + ...agent, + request, + get, + auto +}; + + +/***/ }), + +/***/ 61124: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const net = __nccwpck_require__(41808); +/* istanbul ignore file: https://github.com/nodejs/node/blob/v13.0.1/lib/_http_agent.js */ + +module.exports = options => { + let servername = options.host; + const hostHeader = options.headers && options.headers.host; + + if (hostHeader) { + if (hostHeader.startsWith('[')) { + const index = hostHeader.indexOf(']'); + if (index === -1) { + servername = hostHeader; + } else { + servername = hostHeader.slice(1, -1); + } + } else { + servername = hostHeader.split(':', 1)[0]; + } + } + + if (net.isIP(servername)) { + return ''; + } + + return servername; +}; + + +/***/ }), + +/***/ 55767: +/***/ ((module) => { + +"use strict"; + +/* istanbul ignore file: https://github.com/nodejs/node/blob/master/lib/internal/errors.js */ + +const makeError = (Base, key, getMessage) => { + module.exports[key] = class NodeError extends Base { + constructor(...args) { + super(typeof getMessage === 'string' ? getMessage : getMessage(args)); + this.name = `${super.name} [${key}]`; + this.code = key; + } + }; +}; + +makeError(TypeError, 'ERR_INVALID_ARG_TYPE', args => { + const type = args[0].includes('.') ? 'property' : 'argument'; + + let valid = args[1]; + const isManyTypes = Array.isArray(valid); + + if (isManyTypes) { + valid = `${valid.slice(0, -1).join(', ')} or ${valid.slice(-1)}`; + } + + return `The "${args[0]}" ${type} must be ${isManyTypes ? 'one of' : 'of'} type ${valid}. Received ${typeof args[2]}`; +}); + +makeError(TypeError, 'ERR_INVALID_PROTOCOL', args => { + return `Protocol "${args[0]}" not supported. Expected "${args[1]}"`; +}); + +makeError(Error, 'ERR_HTTP_HEADERS_SENT', args => { + return `Cannot ${args[0]} headers after they are sent to the client`; +}); + +makeError(TypeError, 'ERR_INVALID_HTTP_TOKEN', args => { + return `${args[0]} must be a valid HTTP token [${args[1]}]`; +}); + +makeError(TypeError, 'ERR_HTTP_INVALID_HEADER_VALUE', args => { + return `Invalid value "${args[0]} for header "${args[1]}"`; +}); + +makeError(TypeError, 'ERR_INVALID_CHAR', args => { + return `Invalid character in ${args[0]} [${args[1]}]`; +}); + + +/***/ }), + +/***/ 54714: +/***/ ((module) => { + +"use strict"; + + +module.exports = header => { + switch (header) { + case ':method': + case ':scheme': + case ':authority': + case ':path': + return true; + default: + return false; + } +}; + + +/***/ }), + +/***/ 50408: +/***/ ((module) => { + +"use strict"; + + +module.exports = (from, to, events) => { + for (const event of events) { + from.on(event, (...args) => to.emit(event, ...args)); + } +}; + + +/***/ }), + +/***/ 25024: +/***/ ((module) => { + +"use strict"; + +/* istanbul ignore file: https://github.com/nodejs/node/blob/a91293d4d9ab403046ab5eb022332e4e3d249bd3/lib/internal/url.js#L1257 */ + +module.exports = url => { + const options = { + protocol: url.protocol, + hostname: typeof url.hostname === 'string' && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, + host: url.host, + hash: url.hash, + search: url.search, + pathname: url.pathname, + href: url.href, + path: `${url.pathname || ''}${url.search || ''}` + }; + + if (typeof url.port === 'string' && url.port.length !== 0) { + options.port = Number(url.port); + } + + if (url.username || url.password) { + options.auth = `${url.username || ''}:${url.password || ''}`; + } + + return options; +}; + + +/***/ }), + +/***/ 1761: +/***/ ((module) => { + +"use strict"; + + +module.exports = (string, count = 1, options) => { + options = { + indent: ' ', + includeEmptyLines: false, + ...options + }; + + if (typeof string !== 'string') { + throw new TypeError( + `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` + ); + } + + if (typeof count !== 'number') { + throw new TypeError( + `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` + ); + } + + if (typeof options.indent !== 'string') { + throw new TypeError( + `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` + ); + } + + if (count === 0) { + return string; + } + + const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + + return string.replace(regex, options.indent.repeat(count)); +}; + + +/***/ }), + +/***/ 26214: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(23985) +var reqs = Object.create(null) +var once = __nccwpck_require__(38953) + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} + + +/***/ }), + +/***/ 30522: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +try { + var util = __nccwpck_require__(73837); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = __nccwpck_require__(34645); +} + + +/***/ }), + +/***/ 34645: +/***/ ((module) => { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} + + +/***/ }), + +/***/ 21720: +/***/ ((module) => { + +module.exports = isTypedArray +isTypedArray.strict = isStrictTypedArray +isTypedArray.loose = isLooseTypedArray + +var toString = Object.prototype.toString +var names = { + '[object Int8Array]': true + , '[object Int16Array]': true + , '[object Int32Array]': true + , '[object Uint8Array]': true + , '[object Uint8ClampedArray]': true + , '[object Uint16Array]': true + , '[object Uint32Array]': true + , '[object Float32Array]': true + , '[object Float64Array]': true +} + +function isTypedArray(arr) { + return ( + isStrictTypedArray(arr) + || isLooseTypedArray(arr) + ) +} + +function isStrictTypedArray(arr) { + return ( + arr instanceof Int8Array + || arr instanceof Int16Array + || arr instanceof Int32Array + || arr instanceof Uint8Array + || arr instanceof Uint8ClampedArray + || arr instanceof Uint16Array + || arr instanceof Uint32Array + || arr instanceof Float32Array + || arr instanceof Float64Array + ) +} + +function isLooseTypedArray(arr) { + return names[toString.call(arr)] +} + + +/***/ }), + +/***/ 81119: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var fs = __nccwpck_require__(57147) +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = __nccwpck_require__(31309) +} else { + core = __nccwpck_require__(60929) +} + +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 + } + } +} + + +/***/ }), + +/***/ 60929: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = isexe +isexe.sync = sync + +var fs = __nccwpck_require__(57147) + +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 +} + + +/***/ }), + +/***/ 31309: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = isexe +isexe.sync = sync + +var fs = __nccwpck_require__(57147) + +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) +} + + +/***/ }), + +/***/ 38474: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(19807); + +/***/ }), + +/***/ 98201: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var stream = __nccwpck_require__(12781) + + +function isStream (obj) { + return obj instanceof stream.Stream +} + + +function isReadable (obj) { + return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object' +} + + +function isWritable (obj) { + return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object' +} + + +function isDuplex (obj) { + return isReadable(obj) && isWritable(obj) +} + + +module.exports = isStream +module.exports.isReadable = isReadable +module.exports.isWritable = isWritable +module.exports.isDuplex = isDuplex + + +/***/ }), + +/***/ 94269: +/***/ ((module) => { + +const CODES = { + JOSEAlgNotWhitelisted: 'ERR_JOSE_ALG_NOT_WHITELISTED', + JOSECritNotUnderstood: 'ERR_JOSE_CRIT_NOT_UNDERSTOOD', + JOSEInvalidEncoding: 'ERR_JOSE_INVALID_ENCODING', + JOSEMultiError: 'ERR_JOSE_MULTIPLE_ERRORS', + JOSENotSupported: 'ERR_JOSE_NOT_SUPPORTED', + JWEDecryptionFailed: 'ERR_JWE_DECRYPTION_FAILED', + JWEInvalid: 'ERR_JWE_INVALID', + JWKImportFailed: 'ERR_JWK_IMPORT_FAILED', + JWKInvalid: 'ERR_JWK_INVALID', + JWKKeySupport: 'ERR_JWK_KEY_SUPPORT', + JWKSNoMatchingKey: 'ERR_JWKS_NO_MATCHING_KEY', + JWSInvalid: 'ERR_JWS_INVALID', + JWSVerificationFailed: 'ERR_JWS_VERIFICATION_FAILED', + JWTClaimInvalid: 'ERR_JWT_CLAIM_INVALID', + JWTExpired: 'ERR_JWT_EXPIRED', + JWTMalformed: 'ERR_JWT_MALFORMED' +} + +const DEFAULT_MESSAGES = { + JWEDecryptionFailed: 'decryption operation failed', + JWEInvalid: 'JWE invalid', + JWKSNoMatchingKey: 'no matching key found in the KeyStore', + JWSInvalid: 'JWS invalid', + JWSVerificationFailed: 'signature verification failed' +} + +class JOSEError extends Error { + constructor (message) { + super(message) + if (message === undefined) { + this.message = DEFAULT_MESSAGES[this.constructor.name] + } + this.name = this.constructor.name + this.code = CODES[this.constructor.name] + Error.captureStackTrace(this, this.constructor) + } +} + +const isMulti = e => e instanceof JOSEMultiError +class JOSEMultiError extends JOSEError { + constructor (errors) { + super() + let i + while ((i = errors.findIndex(isMulti)) && i !== -1) { + errors.splice(i, 1, ...errors[i]) + } + Object.defineProperty(this, 'errors', { value: errors }) + } + + * [Symbol.iterator] () { + for (const error of this.errors) { + yield error + } + } +} +module.exports.JOSEError = JOSEError + +module.exports.JOSEAlgNotWhitelisted = class JOSEAlgNotWhitelisted extends JOSEError {} +module.exports.JOSECritNotUnderstood = class JOSECritNotUnderstood extends JOSEError {} +module.exports.JOSEInvalidEncoding = class JOSEInvalidEncoding extends JOSEError {} +module.exports.JOSEMultiError = JOSEMultiError +module.exports.JOSENotSupported = class JOSENotSupported extends JOSEError {} + +module.exports.JWEDecryptionFailed = class JWEDecryptionFailed extends JOSEError {} +module.exports.JWEInvalid = class JWEInvalid extends JOSEError {} + +module.exports.JWKImportFailed = class JWKImportFailed extends JOSEError {} +module.exports.JWKInvalid = class JWKInvalid extends JOSEError {} +module.exports.JWKKeySupport = class JWKKeySupport extends JOSEError {} + +module.exports.JWKSNoMatchingKey = class JWKSNoMatchingKey extends JOSEError {} + +module.exports.JWSInvalid = class JWSInvalid extends JOSEError {} +module.exports.JWSVerificationFailed = class JWSVerificationFailed extends JOSEError {} + +class JWTClaimInvalid extends JOSEError { + constructor (message, claim = 'unspecified', reason = 'unspecified') { + super(message) + this.claim = claim + this.reason = reason + } +} +module.exports.JWTClaimInvalid = JWTClaimInvalid +module.exports.JWTExpired = class JWTExpired extends JWTClaimInvalid {} +module.exports.JWTMalformed = class JWTMalformed extends JOSEError {} + + +/***/ }), + +/***/ 35117: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const oids = __nccwpck_require__(37974) + +module.exports = function () { + this.seq().obj( + this.key('algorithm').objid(oids), + this.key('parameters').optional().choice({ namedCurve: this.objid(oids), null: this.null_() }) + ) +} + + +/***/ }), + +/***/ 84112: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const oids = __nccwpck_require__(37974) + +module.exports = function () { + this.seq().obj( + this.key('version').int(), + this.key('privateKey').octstr(), + this.key('parameters').explicit(0).optional().choice({ namedCurve: this.objid(oids) }), + this.key('publicKey').explicit(1).optional().bitstr() + ) +} + + +/***/ }), + +/***/ 75075: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const asn1 = __nccwpck_require__(27737) + +const types = new Map() + +const AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', __nccwpck_require__(35117)) +types.set('AlgorithmIdentifier', AlgorithmIdentifier) + +const ECPrivateKey = asn1.define('ECPrivateKey', __nccwpck_require__(84112)) +types.set('ECPrivateKey', ECPrivateKey) + +const PrivateKeyInfo = asn1.define('PrivateKeyInfo', __nccwpck_require__(62779)(AlgorithmIdentifier)) +types.set('PrivateKeyInfo', PrivateKeyInfo) + +const PublicKeyInfo = asn1.define('PublicKeyInfo', __nccwpck_require__(9843)(AlgorithmIdentifier)) +types.set('PublicKeyInfo', PublicKeyInfo) + +const PrivateKey = asn1.define('PrivateKey', __nccwpck_require__(24850)) +types.set('PrivateKey', PrivateKey) + +const OneAsymmetricKey = asn1.define('OneAsymmetricKey', __nccwpck_require__(72930)(AlgorithmIdentifier, PrivateKey)) +types.set('OneAsymmetricKey', OneAsymmetricKey) + +const RSAPrivateKey = asn1.define('RSAPrivateKey', __nccwpck_require__(92469)) +types.set('RSAPrivateKey', RSAPrivateKey) + +const RSAPublicKey = asn1.define('RSAPublicKey', __nccwpck_require__(83502)) +types.set('RSAPublicKey', RSAPublicKey) + +module.exports = types + + +/***/ }), + +/***/ 37974: +/***/ ((module) => { + +const oids = { + '1 2 840 10045 3 1 7': 'P-256', + '1 3 132 0 10': 'secp256k1', + '1 3 132 0 34': 'P-384', + '1 3 132 0 35': 'P-521', + '1 2 840 10045 2 1': 'ecPublicKey', + '1 2 840 113549 1 1 1': 'rsaEncryption', + '1 3 101 110': 'X25519', + '1 3 101 111': 'X448', + '1 3 101 112': 'Ed25519', + '1 3 101 113': 'Ed448' +} + +module.exports = oids + + +/***/ }), + +/***/ 72930: +/***/ ((module) => { + +module.exports = (AlgorithmIdentifier, PrivateKey) => function () { + this.seq().obj( + this.key('version').int(), + this.key('algorithm').use(AlgorithmIdentifier), + this.key('privateKey').use(PrivateKey) + ) +} + + +/***/ }), + +/***/ 24850: +/***/ ((module) => { + +module.exports = function () { + this.octstr().contains().obj( + this.key('privateKey').octstr() + ) +} + + +/***/ }), + +/***/ 62779: +/***/ ((module) => { + +module.exports = (AlgorithmIdentifier) => function () { + this.seq().obj( + this.key('version').int(), + this.key('algorithm').use(AlgorithmIdentifier), + this.key('privateKey').octstr() + ) +} + + +/***/ }), + +/***/ 9843: +/***/ ((module) => { + +module.exports = AlgorithmIdentifier => function () { + this.seq().obj( + this.key('algorithm').use(AlgorithmIdentifier), + this.key('publicKey').bitstr() + ) +} + + +/***/ }), + +/***/ 92469: +/***/ ((module) => { + +module.exports = function () { + this.seq().obj( + this.key('version').int({ 0: 'two-prime', 1: 'multi' }), + this.key('n').int(), + this.key('e').int(), + this.key('d').int(), + this.key('p').int(), + this.key('q').int(), + this.key('dp').int(), + this.key('dq').int(), + this.key('qi').int() + ) +} + + +/***/ }), + +/***/ 83502: +/***/ ((module) => { + +module.exports = function () { + this.seq().obj( + this.key('n').int(), + this.key('e').int() + ) +} + + +/***/ }), + +/***/ 90112: +/***/ ((module) => { + +let encode +let encodeBuffer +if (Buffer.isEncoding('base64url')) { + encode = (input, encoding = 'utf8') => Buffer.from(input, encoding).toString('base64url') + encodeBuffer = (buf) => buf.toString('base64url') +} else { + const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_') + encode = (input, encoding = 'utf8') => fromBase64(Buffer.from(input, encoding).toString('base64')) + encodeBuffer = (buf) => fromBase64(buf.toString('base64')) +} + +const decodeToBuffer = (input) => { + return Buffer.from(input, 'base64') +} + +const decode = (input, encoding = 'utf8') => { + return decodeToBuffer(input).toString(encoding) +} + +const b64uJSON = { + encode: (input) => { + return encode(JSON.stringify(input)) + }, + decode: (input, encoding = 'utf8') => { + return JSON.parse(decode(input, encoding)) + } +} + +b64uJSON.decode.try = (input, encoding = 'utf8') => { + try { + return b64uJSON.decode(input, encoding) + } catch (err) { + return decode(input, encoding) + } +} + +const bnToBuf = (bn) => { + let hex = BigInt(bn).toString(16) + if (hex.length % 2) { + hex = `0${hex}` + } + + const len = hex.length / 2 + const u8 = new Uint8Array(len) + + let i = 0 + let j = 0 + while (i < len) { + u8[i] = parseInt(hex.slice(j, j + 2), 16) + i += 1 + j += 2 + } + + return u8 +} + +const encodeBigInt = (bn) => encodeBuffer(Buffer.from(bnToBuf(bn))) + +module.exports.decode = decode +module.exports.decodeToBuffer = decodeToBuffer +module.exports.encode = encode +module.exports.encodeBuffer = encodeBuffer +module.exports.JSON = b64uJSON +module.exports.encodeBigInt = encodeBigInt + + +/***/ }), + +/***/ 12152: +/***/ ((module) => { + +module.exports.KEYOBJECT = Symbol('KEYOBJECT') +module.exports.PRIVATE_MEMBERS = Symbol('PRIVATE_MEMBERS') +module.exports.PUBLIC_MEMBERS = Symbol('PUBLIC_MEMBERS') +module.exports.THUMBPRINT_MATERIAL = Symbol('THUMBPRINT_MATERIAL') +module.exports.JWK_MEMBERS = Symbol('JWK_MEMBERS') +module.exports.KEY_MANAGEMENT_ENCRYPT = Symbol('KEY_MANAGEMENT_ENCRYPT') +module.exports.KEY_MANAGEMENT_DECRYPT = Symbol('KEY_MANAGEMENT_DECRYPT') + +const USES_MAPPING = { + sig: new Set(['sign', 'verify']), + enc: new Set(['encrypt', 'decrypt', 'wrapKey', 'unwrapKey', 'deriveKey']) +} +const OPS = new Set([...USES_MAPPING.sig, ...USES_MAPPING.enc]) +const USES = new Set(Object.keys(USES_MAPPING)) + +module.exports.USES_MAPPING = USES_MAPPING +module.exports.OPS = OPS +module.exports.USES = USES + + +/***/ }), + +/***/ 28596: +/***/ ((module) => { + +module.exports = obj => JSON.parse(JSON.stringify(obj)) + + +/***/ }), + +/***/ 18019: +/***/ ((module) => { + +const MAX_OCTET = 0x80 +const CLASS_UNIVERSAL = 0 +const PRIMITIVE_BIT = 0x20 +const TAG_SEQ = 0x10 +const TAG_INT = 0x02 +const ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6) +const ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6) + +const getParamSize = keySize => ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1) + +const paramBytesForAlg = { + ES256: getParamSize(256), + ES256K: getParamSize(256), + ES384: getParamSize(384), + ES512: getParamSize(521) +} + +const countPadding = (buf, start, stop) => { + let padding = 0 + while (start + padding < stop && buf[start + padding] === 0) { + ++padding + } + + const needsSign = buf[start + padding] >= MAX_OCTET + if (needsSign) { + --padding + } + + return padding +} + +module.exports.derToJose = (signature, alg) => { + if (!Buffer.isBuffer(signature)) { + throw new TypeError('ECDSA signature must be a Buffer') + } + + if (!paramBytesForAlg[alg]) { + throw new Error(`Unknown algorithm "${alg}"`) + } + + const paramBytes = paramBytesForAlg[alg] + + // the DER encoded param should at most be the param size, plus a padding + // zero, since due to being a signed integer + const maxEncodedParamLength = paramBytes + 1 + + const inputLength = signature.length + + let offset = 0 + if (signature[offset++] !== ENCODED_TAG_SEQ) { + throw new Error('Could not find expected "seq"') + } + + let seqLength = signature[offset++] + if (seqLength === (MAX_OCTET | 1)) { + seqLength = signature[offset++] + } + + if (inputLength - offset < seqLength) { + throw new Error(`"seq" specified length of ${seqLength}", only ${inputLength - offset}" remaining`) + } + + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "r"') + } + + const rLength = signature[offset++] + + if (inputLength - offset - 2 < rLength) { + throw new Error(`"r" specified length of "${rLength}", only "${inputLength - offset - 2}" available`) + } + + if (maxEncodedParamLength < rLength) { + throw new Error(`"r" specified length of "${rLength}", max of "${maxEncodedParamLength}" is acceptable`) + } + + const rOffset = offset + offset += rLength + + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "s"') + } + + const sLength = signature[offset++] + + if (inputLength - offset !== sLength) { + throw new Error(`"s" specified length of "${sLength}", expected "${inputLength - offset}"`) + } + + if (maxEncodedParamLength < sLength) { + throw new Error(`"s" specified length of "${sLength}", max of "${maxEncodedParamLength}" is acceptable`) + } + + const sOffset = offset + offset += sLength + + if (offset !== inputLength) { + throw new Error(`Expected to consume entire buffer, but "${inputLength - offset}" bytes remain`) + } + + const rPadding = paramBytes - rLength + + const sPadding = paramBytes - sLength + + const dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength) + + for (offset = 0; offset < rPadding; ++offset) { + dst[offset] = 0 + } + signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength) + + offset = paramBytes + + for (const o = offset; offset < o + sPadding; ++offset) { + dst[offset] = 0 + } + signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength) + + return dst +} + +module.exports.joseToDer = (signature, alg) => { + if (!Buffer.isBuffer(signature)) { + throw new TypeError('ECDSA signature must be a Buffer') + } + + if (!paramBytesForAlg[alg]) { + throw new TypeError(`Unknown algorithm "${alg}"`) + } + + const paramBytes = paramBytesForAlg[alg] + + const signatureBytes = signature.length + if (signatureBytes !== paramBytes * 2) { + throw new Error(`"${alg}" signatures must be "${paramBytes * 2}" bytes, saw "${signatureBytes}"`) + } + + const rPadding = countPadding(signature, 0, paramBytes) + const sPadding = countPadding(signature, paramBytes, signature.length) + const rLength = paramBytes - rPadding + const sLength = paramBytes - sPadding + + const rsBytes = 1 + 1 + rLength + 1 + 1 + sLength + + const shortLength = rsBytes < MAX_OCTET + + const dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes) + + let offset = 0 + dst[offset++] = ENCODED_TAG_SEQ + if (shortLength) { + // Bit 8 has value "0" + // bits 7-1 give the length. + dst[offset++] = rsBytes + } else { + // Bit 8 of first octet has value "1" + // bits 7-1 give the number of additional length octets. + dst[offset++] = MAX_OCTET | 1 // eslint-disable-line no-tabs + // length, base 256 + dst[offset++] = rsBytes & 0xff + } + dst[offset++] = ENCODED_TAG_INT + dst[offset++] = rLength + if (rPadding < 0) { + dst[offset++] = 0 + offset += signature.copy(dst, offset, 0, paramBytes) + } else { + offset += signature.copy(dst, offset, rPadding, paramBytes) + } + dst[offset++] = ENCODED_TAG_INT + dst[offset++] = sLength + if (sPadding < 0) { + dst[offset++] = 0 + signature.copy(dst, offset, paramBytes) + } else { + signature.copy(dst, offset, paramBytes + sPadding) + } + + return dst +} + + +/***/ }), + +/***/ 82066: +/***/ ((module) => { + +module.exports = (date) => Math.floor(date.getTime() / 1000) + + +/***/ }), + +/***/ 61744: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { randomBytes } = __nccwpck_require__(6113) + +const { IVLENGTHS } = __nccwpck_require__(32075) + +module.exports = alg => randomBytes(IVLENGTHS.get(alg) / 8) + + +/***/ }), + +/***/ 77217: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const errors = __nccwpck_require__(94269) +const Key = __nccwpck_require__(88901) +const importKey = __nccwpck_require__(96317) +const { KeyStore } = __nccwpck_require__(91754) + +module.exports = (input, keyStoreAllowed = false) => { + if (input instanceof Key) { + return input + } + + if (input instanceof KeyStore) { + if (!keyStoreAllowed) { + throw new TypeError('key argument for this operation must not be a JWKS.KeyStore instance') + } + + return input + } + + try { + return importKey(input) + } catch (err) { + if (err instanceof errors.JOSEError && !(err instanceof errors.JWKImportFailed)) { + throw err + } + + let msg + if (keyStoreAllowed) { + msg = 'key must be an instance of a key instantiated by JWK.asKey, a valid JWK.asKey input, or a JWKS.KeyStore instance' + } else { + msg = 'key must be an instance of a key instantiated by JWK.asKey, or a valid JWK.asKey input' + } + + throw new TypeError(msg) + } +} + + +/***/ }), + +/***/ 17968: +/***/ ((module) => { + +module.exports = (a = {}, b = {}) => { + const keysA = Object.keys(a) + const keysB = new Set(Object.keys(b)) + return !keysA.some((ka) => keysB.has(ka)) +} + + +/***/ }), + +/***/ 80281: +/***/ ((module) => { + +module.exports = a => !!a && a.constructor === Object + + +/***/ }), + +/***/ 82286: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { keyObjectSupported } = __nccwpck_require__(16054) + +let createPublicKey +let createPrivateKey +let createSecretKey +let KeyObject +let asInput + +if (keyObjectSupported) { + ({ createPublicKey, createPrivateKey, createSecretKey, KeyObject } = __nccwpck_require__(6113)) + asInput = (input) => input +} else { + const { EOL } = __nccwpck_require__(22037) + + const errors = __nccwpck_require__(94269) + const isObject = __nccwpck_require__(80281) + const asn1 = __nccwpck_require__(75075) + const toInput = Symbol('toInput') + + const namedCurve = Symbol('namedCurve') + + asInput = (keyObject, needsPublic) => { + if (keyObject instanceof KeyObject) { + return keyObject[toInput](needsPublic) + } + + return createSecretKey(keyObject)[toInput](needsPublic) + } + + const pemToDer = pem => Buffer.from(pem.replace(/(?:-----(?:BEGIN|END)(?: (?:RSA|EC))? (?:PRIVATE|PUBLIC) KEY-----|\s)/g, ''), 'base64') + const derToPem = (der, label) => `-----BEGIN ${label}-----${EOL}${(der.toString('base64').match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END ${label}-----` + const unsupported = (input) => { + const label = typeof input === 'string' ? input : `OID ${input.join('.')}` + throw new errors.JOSENotSupported(`${label} is not supported in your Node.js runtime version`) + } + + KeyObject = class KeyObject { + export ({ cipher, passphrase, type, format } = {}) { + if (this._type === 'secret') { + return this._buffer + } + + if (this._type === 'public') { + if (this.asymmetricKeyType === 'rsa') { + switch (type) { + case 'pkcs1': + if (format === 'pem') { + return this._pem + } + + return pemToDer(this._pem) + case 'spki': { + const PublicKeyInfo = asn1.get('PublicKeyInfo') + const pem = PublicKeyInfo.encode({ + algorithm: { + algorithm: 'rsaEncryption', + parameters: { type: 'null' } + }, + publicKey: { + unused: 0, + data: pemToDer(this._pem) + } + }, 'pem', { label: 'PUBLIC KEY' }) + + return format === 'pem' ? pem : pemToDer(pem) + } + default: + throw new TypeError(`The value ${type} is invalid for option "type"`) + } + } + + if (this.asymmetricKeyType === 'ec') { + if (type !== 'spki') { + throw new TypeError(`The value ${type} is invalid for option "type"`) + } + + if (format === 'pem') { + return this._pem + } + + return pemToDer(this._pem) + } + } + + if (this._type === 'private') { + if (passphrase !== undefined || cipher !== undefined) { + throw new errors.JOSENotSupported('encrypted private keys are not supported in your Node.js runtime version') + } + + if (type === 'pkcs8') { + if (this._pkcs8) { + if (format === 'der' && typeof this._pkcs8 === 'string') { + return pemToDer(this._pkcs8) + } + + if (format === 'pem' && Buffer.isBuffer(this._pkcs8)) { + return derToPem(this._pkcs8, 'PRIVATE KEY') + } + + return this._pkcs8 + } + + if (this.asymmetricKeyType === 'rsa') { + const parsed = this._asn1 + const RSAPrivateKey = asn1.get('RSAPrivateKey') + const privateKey = RSAPrivateKey.encode(parsed) + const PrivateKeyInfo = asn1.get('PrivateKeyInfo') + const pkcs8 = PrivateKeyInfo.encode({ + version: 0, + privateKey, + algorithm: { + algorithm: 'rsaEncryption', + parameters: { type: 'null' } + } + }) + + this._pkcs8 = pkcs8 + + return this.export({ type, format }) + } + + if (this.asymmetricKeyType === 'ec') { + const parsed = this._asn1 + const ECPrivateKey = asn1.get('ECPrivateKey') + const privateKey = ECPrivateKey.encode({ + version: parsed.version, + privateKey: parsed.privateKey, + publicKey: parsed.publicKey + }) + const PrivateKeyInfo = asn1.get('PrivateKeyInfo') + const pkcs8 = PrivateKeyInfo.encode({ + version: 0, + privateKey, + algorithm: { + algorithm: 'ecPublicKey', + parameters: this._asn1.parameters + } + }) + + this._pkcs8 = pkcs8 + + return this.export({ type, format }) + } + } + + if (this.asymmetricKeyType === 'rsa' && type === 'pkcs1') { + if (format === 'pem') { + return this._pem + } + + return pemToDer(this._pem) + } else if (this.asymmetricKeyType === 'ec' && type === 'sec1') { + if (format === 'pem') { + return this._pem + } + + return pemToDer(this._pem) + } else { + throw new TypeError(`The value ${type} is invalid for option "type"`) + } + } + } + + get type () { + return this._type + } + + get asymmetricKeyType () { + return this._asymmetricKeyType + } + + get symmetricKeySize () { + return this._symmetricKeySize + } + + [toInput] (needsPublic) { + switch (this._type) { + case 'secret': + return this._buffer + case 'public': + return this._pem + default: + if (needsPublic) { + if (!('_pub' in this)) { + this._pub = createPublicKey(this) + } + + return this._pub[toInput](false) + } + + return this._pem + } + } + } + + createSecretKey = (buffer) => { + if (!Buffer.isBuffer(buffer) || !buffer.length) { + throw new TypeError('input must be a non-empty Buffer instance') + } + + const keyObject = new KeyObject() + keyObject._buffer = Buffer.from(buffer) + keyObject._symmetricKeySize = buffer.length + keyObject._type = 'secret' + + return keyObject + } + + createPublicKey = (input) => { + if (input instanceof KeyObject) { + if (input.type !== 'private') { + throw new TypeError(`Invalid key object type ${input.type}, expected private.`) + } + + switch (input.asymmetricKeyType) { + case 'ec': { + const PublicKeyInfo = asn1.get('PublicKeyInfo') + const key = PublicKeyInfo.encode({ + algorithm: { + algorithm: 'ecPublicKey', + parameters: input._asn1.parameters + }, + publicKey: input._asn1.publicKey + }) + + return createPublicKey({ key, format: 'der', type: 'spki' }) + } + case 'rsa': { + const RSAPublicKey = asn1.get('RSAPublicKey') + const key = RSAPublicKey.encode(input._asn1) + return createPublicKey({ key, format: 'der', type: 'pkcs1' }) + } + } + } + + if (typeof input === 'string' || Buffer.isBuffer(input)) { + input = { key: input, format: 'pem' } + } + + if (!isObject(input)) { + throw new TypeError('input must be a string, Buffer or an object') + } + + const { format, passphrase } = input + let { key, type } = input + + if (typeof key !== 'string' && !Buffer.isBuffer(key)) { + throw new TypeError('key must be a string or Buffer') + } + + if (format !== 'pem' && format !== 'der') { + throw new TypeError('format must be one of "pem" or "der"') + } + + let label + if (format === 'pem') { + key = key.toString() + switch (key.split(/\r?\n/g)[0].toString()) { + case '-----BEGIN PUBLIC KEY-----': + type = 'spki' + label = 'PUBLIC KEY' + break + case '-----BEGIN RSA PUBLIC KEY-----': + type = 'pkcs1' + label = 'RSA PUBLIC KEY' + break + case '-----BEGIN CERTIFICATE-----': + throw new errors.JOSENotSupported('X.509 certificates are not supported in your Node.js runtime version') + case '-----BEGIN PRIVATE KEY-----': + case '-----BEGIN EC PRIVATE KEY-----': + case '-----BEGIN RSA PRIVATE KEY-----': + return createPublicKey(createPrivateKey(key)) + default: + throw new TypeError('unknown/unsupported PEM type') + } + } + + switch (type) { + case 'spki': { + const PublicKeyInfo = asn1.get('PublicKeyInfo') + const parsed = PublicKeyInfo.decode(key, format, { label }) + + let type, keyObject + switch (parsed.algorithm.algorithm) { + case 'ecPublicKey': { + keyObject = new KeyObject() + keyObject._asn1 = parsed + keyObject._asymmetricKeyType = 'ec' + keyObject._type = 'public' + keyObject._pem = PublicKeyInfo.encode(parsed, 'pem', { label: 'PUBLIC KEY' }) + + break + } + case 'rsaEncryption': { + type = 'pkcs1' + keyObject = createPublicKey({ type, key: parsed.publicKey.data, format: 'der' }) + break + } + default: + unsupported(parsed.algorithm.algorithm) + } + + return keyObject + } + case 'pkcs1': { + const RSAPublicKey = asn1.get('RSAPublicKey') + const parsed = RSAPublicKey.decode(key, format, { label }) + + // special case when private pkcs1 PEM / DER is used with createPublicKey + if (parsed.n === BigInt(0)) { + return createPublicKey(createPrivateKey({ key, format, type, passphrase })) + } + + const keyObject = new KeyObject() + keyObject._asn1 = parsed + keyObject._asymmetricKeyType = 'rsa' + keyObject._type = 'public' + keyObject._pem = RSAPublicKey.encode(parsed, 'pem', { label: 'RSA PUBLIC KEY' }) + + return keyObject + } + case 'pkcs8': + case 'sec1': + return createPublicKey(createPrivateKey({ format, key, type, passphrase })) + default: + throw new TypeError(`The value ${type} is invalid for option "type"`) + } + } + + createPrivateKey = (input, hints) => { + if (typeof input === 'string' || Buffer.isBuffer(input)) { + input = { key: input, format: 'pem' } + } + + if (!isObject(input)) { + throw new TypeError('input must be a string, Buffer or an object') + } + + const { format, passphrase } = input + let { key, type } = input + + if (typeof key !== 'string' && !Buffer.isBuffer(key)) { + throw new TypeError('key must be a string or Buffer') + } + + if (passphrase !== undefined) { + throw new errors.JOSENotSupported('encrypted private keys are not supported in your Node.js runtime version') + } + + if (format !== 'pem' && format !== 'der') { + throw new TypeError('format must be one of "pem" or "der"') + } + + let label + if (format === 'pem') { + key = key.toString() + switch (key.split(/\r?\n/g)[0].toString()) { + case '-----BEGIN PRIVATE KEY-----': + type = 'pkcs8' + label = 'PRIVATE KEY' + break + case '-----BEGIN EC PRIVATE KEY-----': + type = 'sec1' + label = 'EC PRIVATE KEY' + break + case '-----BEGIN RSA PRIVATE KEY-----': + type = 'pkcs1' + label = 'RSA PRIVATE KEY' + break + default: + throw new TypeError('unknown/unsupported PEM type') + } + } + + switch (type) { + case 'pkcs8': { + const PrivateKeyInfo = asn1.get('PrivateKeyInfo') + const parsed = PrivateKeyInfo.decode(key, format, { label }) + + let type, keyObject + switch (parsed.algorithm.algorithm) { + case 'ecPublicKey': { + type = 'sec1' + keyObject = createPrivateKey({ type, key: parsed.privateKey, format: 'der' }, { [namedCurve]: parsed.algorithm.parameters.value }) + break + } + case 'rsaEncryption': { + type = 'pkcs1' + keyObject = createPrivateKey({ type, key: parsed.privateKey, format: 'der' }) + break + } + default: + unsupported(parsed.algorithm.algorithm) + } + + keyObject._pkcs8 = key + return keyObject + } + case 'pkcs1': { + const RSAPrivateKey = asn1.get('RSAPrivateKey') + const parsed = RSAPrivateKey.decode(key, format, { label }) + + const keyObject = new KeyObject() + keyObject._asn1 = parsed + keyObject._asymmetricKeyType = 'rsa' + keyObject._type = 'private' + keyObject._pem = RSAPrivateKey.encode(parsed, 'pem', { label: 'RSA PRIVATE KEY' }) + + return keyObject + } + case 'sec1': { + const ECPrivateKey = asn1.get('ECPrivateKey') + let parsed = ECPrivateKey.decode(key, format, { label }) + + if (!('parameters' in parsed) && !hints[namedCurve]) { + throw new Error('invalid sec1') + } else if (!('parameters' in parsed)) { + parsed = { ...parsed, parameters: { type: 'namedCurve', value: hints[namedCurve] } } + } + + const keyObject = new KeyObject() + keyObject._asn1 = parsed + keyObject._asymmetricKeyType = 'ec' + keyObject._type = 'private' + keyObject._pem = ECPrivateKey.encode(parsed, 'pem', { label: 'EC PRIVATE KEY' }) + + return keyObject + } + default: + throw new TypeError(`The value ${type} is invalid for option "type"`) + } + } +} + +module.exports = { createPublicKey, createPrivateKey, createSecretKey, KeyObject, asInput } + + +/***/ }), + +/***/ 74576: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { EOL } = __nccwpck_require__(22037) + +const errors = __nccwpck_require__(94269) + +const { keyObjectSupported } = __nccwpck_require__(16054) +const { createPublicKey } = __nccwpck_require__(82286) +const base64url = __nccwpck_require__(90112) +const asn1 = __nccwpck_require__(75075) +const computePrimes = __nccwpck_require__(91184) +const { OKP_CURVES, EC_CURVES } = __nccwpck_require__(32075) + +const formatPem = (base64pem, descriptor) => `-----BEGIN ${descriptor} KEY-----${EOL}${(base64pem.match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END ${descriptor} KEY-----` + +const okpToJWK = { + private (crv, keyObject) { + const der = keyObject.export({ type: 'pkcs8', format: 'der' }) + const OneAsymmetricKey = asn1.get('OneAsymmetricKey') + const { privateKey: { privateKey: d } } = OneAsymmetricKey.decode(der) + + return { + ...okpToJWK.public(crv, createPublicKey(keyObject)), + d: base64url.encodeBuffer(d) + } + }, + public (crv, keyObject) { + const der = keyObject.export({ type: 'spki', format: 'der' }) + + const PublicKeyInfo = asn1.get('PublicKeyInfo') + + const { publicKey: { data: x } } = PublicKeyInfo.decode(der) + + return { + kty: 'OKP', + crv, + x: base64url.encodeBuffer(x) + } + } +} + +const keyObjectToJWK = { + rsa: { + private (keyObject) { + const der = keyObject.export({ type: 'pkcs8', format: 'der' }) + + const PrivateKeyInfo = asn1.get('PrivateKeyInfo') + const RSAPrivateKey = asn1.get('RSAPrivateKey') + + const { privateKey } = PrivateKeyInfo.decode(der) + const { version, n, e, d, p, q, dp, dq, qi } = RSAPrivateKey.decode(privateKey) + + if (version !== 'two-prime') { + throw new errors.JOSENotSupported('Private RSA keys with more than two primes are not supported') + } + + return { + kty: 'RSA', + n: base64url.encodeBigInt(n), + e: base64url.encodeBigInt(e), + d: base64url.encodeBigInt(d), + p: base64url.encodeBigInt(p), + q: base64url.encodeBigInt(q), + dp: base64url.encodeBigInt(dp), + dq: base64url.encodeBigInt(dq), + qi: base64url.encodeBigInt(qi) + } + }, + public (keyObject) { + const der = keyObject.export({ type: 'spki', format: 'der' }) + + const PublicKeyInfo = asn1.get('PublicKeyInfo') + const RSAPublicKey = asn1.get('RSAPublicKey') + + const { publicKey: { data: publicKey } } = PublicKeyInfo.decode(der) + const { n, e } = RSAPublicKey.decode(publicKey) + + return { + kty: 'RSA', + n: base64url.encodeBigInt(n), + e: base64url.encodeBigInt(e) + } + } + }, + ec: { + private (keyObject) { + const der = keyObject.export({ type: 'pkcs8', format: 'der' }) + + const PrivateKeyInfo = asn1.get('PrivateKeyInfo') + const ECPrivateKey = asn1.get('ECPrivateKey') + + const { privateKey, algorithm: { parameters: { value: crv } } } = PrivateKeyInfo.decode(der) + const { privateKey: d, publicKey } = ECPrivateKey.decode(privateKey) + + if (typeof publicKey === 'undefined') { + if (keyObjectSupported) { + return { + ...keyObjectToJWK.ec.public(createPublicKey(keyObject)), + d: base64url.encodeBuffer(d) + } + } + + throw new errors.JOSENotSupported('Private EC keys without the public key embedded are not supported in your Node.js runtime version') + } + + const x = publicKey.data.slice(1, ((publicKey.data.length - 1) / 2) + 1) + const y = publicKey.data.slice(((publicKey.data.length - 1) / 2) + 1) + + return { + kty: 'EC', + crv, + d: base64url.encodeBuffer(d), + x: base64url.encodeBuffer(x), + y: base64url.encodeBuffer(y) + } + }, + public (keyObject) { + const der = keyObject.export({ type: 'spki', format: 'der' }) + + const PublicKeyInfo = asn1.get('PublicKeyInfo') + + const { publicKey: { data: publicKey }, algorithm: { parameters: { value: crv } } } = PublicKeyInfo.decode(der) + + const x = publicKey.slice(1, ((publicKey.length - 1) / 2) + 1) + const y = publicKey.slice(((publicKey.length - 1) / 2) + 1) + + return { + kty: 'EC', + crv, + x: base64url.encodeBuffer(x), + y: base64url.encodeBuffer(y) + } + } + }, + ed25519: { + private (keyObject) { + return okpToJWK.private('Ed25519', keyObject) + }, + public (keyObject) { + return okpToJWK.public('Ed25519', keyObject) + } + }, + ed448: { + private (keyObject) { + return okpToJWK.private('Ed448', keyObject) + }, + public (keyObject) { + return okpToJWK.public('Ed448', keyObject) + } + }, + x25519: { + private (keyObject) { + return okpToJWK.private('X25519', keyObject) + }, + public (keyObject) { + return okpToJWK.public('X25519', keyObject) + } + }, + x448: { + private (keyObject) { + return okpToJWK.private('X448', keyObject) + }, + public (keyObject) { + return okpToJWK.public('X448', keyObject) + } + } +} + +module.exports.keyObjectToJWK = (keyObject) => { + if (keyObject.type === 'private') { + return keyObjectToJWK[keyObject.asymmetricKeyType].private(keyObject) + } + + return keyObjectToJWK[keyObject.asymmetricKeyType].public(keyObject) +} + +const concatEcPublicKey = (x, y) => ({ + unused: 0, + data: Buffer.concat([ + Buffer.alloc(1, 4), + base64url.decodeToBuffer(x), + base64url.decodeToBuffer(y) + ]) +}) + +const jwkToPem = { + RSA: { + private (jwk, { calculateMissingRSAPrimes }) { + const RSAPrivateKey = asn1.get('RSAPrivateKey') + + if ('oth' in jwk) { + throw new errors.JOSENotSupported('Private RSA keys with more than two primes are not supported') + } + + if (jwk.p || jwk.q || jwk.dp || jwk.dq || jwk.qi) { + if (!(jwk.p && jwk.q && jwk.dp && jwk.dq && jwk.qi)) { + throw new errors.JWKInvalid('all other private key parameters must be present when any one of them is present') + } + } else if (calculateMissingRSAPrimes) { + jwk = computePrimes(jwk) + } else if (!calculateMissingRSAPrimes) { + throw new errors.JOSENotSupported('importing private RSA keys without all other private key parameters is not enabled, see documentation and its advisory on how and when its ok to enable it') + } + + return RSAPrivateKey.encode({ + version: 0, + n: BigInt(`0x${base64url.decodeToBuffer(jwk.n).toString('hex')}`), + e: BigInt(`0x${base64url.decodeToBuffer(jwk.e).toString('hex')}`), + d: BigInt(`0x${base64url.decodeToBuffer(jwk.d).toString('hex')}`), + p: BigInt(`0x${base64url.decodeToBuffer(jwk.p).toString('hex')}`), + q: BigInt(`0x${base64url.decodeToBuffer(jwk.q).toString('hex')}`), + dp: BigInt(`0x${base64url.decodeToBuffer(jwk.dp).toString('hex')}`), + dq: BigInt(`0x${base64url.decodeToBuffer(jwk.dq).toString('hex')}`), + qi: BigInt(`0x${base64url.decodeToBuffer(jwk.qi).toString('hex')}`) + }, 'pem', { label: 'RSA PRIVATE KEY' }) + }, + public (jwk) { + const RSAPublicKey = asn1.get('RSAPublicKey') + + return RSAPublicKey.encode({ + version: 0, + n: BigInt(`0x${base64url.decodeToBuffer(jwk.n).toString('hex')}`), + e: BigInt(`0x${base64url.decodeToBuffer(jwk.e).toString('hex')}`) + }, 'pem', { label: 'RSA PUBLIC KEY' }) + } + }, + EC: { + private (jwk) { + const ECPrivateKey = asn1.get('ECPrivateKey') + + return ECPrivateKey.encode({ + version: 1, + privateKey: base64url.decodeToBuffer(jwk.d), + parameters: { type: 'namedCurve', value: jwk.crv }, + publicKey: concatEcPublicKey(jwk.x, jwk.y) + }, 'pem', { label: 'EC PRIVATE KEY' }) + }, + public (jwk) { + const PublicKeyInfo = asn1.get('PublicKeyInfo') + + return PublicKeyInfo.encode({ + algorithm: { + algorithm: 'ecPublicKey', + parameters: { type: 'namedCurve', value: jwk.crv } + }, + publicKey: concatEcPublicKey(jwk.x, jwk.y) + }, 'pem', { label: 'PUBLIC KEY' }) + } + }, + OKP: { + private (jwk) { + const OneAsymmetricKey = asn1.get('OneAsymmetricKey') + + const b64 = OneAsymmetricKey.encode({ + version: 0, + privateKey: { privateKey: base64url.decodeToBuffer(jwk.d) }, + algorithm: { algorithm: jwk.crv } + }, 'der') + + // TODO: WHYYY? https://github.com/indutny/asn1.js/issues/110 + b64.write('04', 12, 1, 'hex') + + return formatPem(b64.toString('base64'), 'PRIVATE') + }, + public (jwk) { + const PublicKeyInfo = asn1.get('PublicKeyInfo') + + return PublicKeyInfo.encode({ + algorithm: { algorithm: jwk.crv }, + publicKey: { + unused: 0, + data: base64url.decodeToBuffer(jwk.x) + } + }, 'pem', { label: 'PUBLIC KEY' }) + } + } +} + +module.exports.jwkToPem = (jwk, { calculateMissingRSAPrimes = false } = {}) => { + switch (jwk.kty) { + case 'EC': + if (!EC_CURVES.has(jwk.crv)) { + throw new errors.JOSENotSupported(`unsupported EC key curve: ${jwk.crv}`) + } + break + case 'OKP': + if (!OKP_CURVES.has(jwk.crv)) { + throw new errors.JOSENotSupported(`unsupported OKP key curve: ${jwk.crv}`) + } + break + case 'RSA': + break + default: + throw new errors.JOSENotSupported(`unsupported key type: ${jwk.kty}`) + } + + if (jwk.d) { + return jwkToPem[jwk.kty].private(jwk, { calculateMissingRSAPrimes }) + } + + return jwkToPem[jwk.kty].public(jwk) +} + + +/***/ }), + +/***/ 67600: +/***/ ((module) => { + +module.exports = alg => `sha${alg.substr(2, 3)}` + + +/***/ }), + +/***/ 91184: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { randomBytes } = __nccwpck_require__(6113) + +const base64url = __nccwpck_require__(90112) +const errors = __nccwpck_require__(94269) + +const ZERO = BigInt(0) +const ONE = BigInt(1) +const TWO = BigInt(2) + +const toJWKParameter = (n) => { + const hex = n.toString(16) + return base64url.encodeBuffer(Buffer.from(hex.length % 2 ? `0${hex}` : hex, 'hex')) +} +const fromBuffer = buf => BigInt(`0x${buf.toString('hex')}`) +const bitLength = n => n.toString(2).length + +const eGcdX = (a, b) => { + let x = ZERO + let y = ONE + let u = ONE + let v = ZERO + + while (a !== ZERO) { + const q = b / a + const r = b % a + const m = x - (u * q) + const n = y - (v * q) + b = a + a = r + x = u + y = v + u = m + v = n + } + return x +} + +const gcd = (a, b) => { + let shift = ZERO + while (!((a | b) & ONE)) { + a >>= ONE + b >>= ONE + shift++ + } + while (!(a & ONE)) { + a >>= ONE + } + do { + while (!(b & ONE)) { + b >>= ONE + } + if (a > b) { + const x = a + a = b + b = x + } + b -= a + } while (b) + + return a << shift +} + +const modPow = (a, b, n) => { + a = toZn(a, n) + let result = ONE + let x = a + while (b > 0) { + const leastSignificantBit = b % TWO + b = b / TWO + if (leastSignificantBit === ONE) { + result = result * x + result = result % n + } + x = x * x + x = x % n + } + return result +} + +const randBetween = (min, max) => { + const interval = max - min + const bitLen = bitLength(interval) + let rnd + do { + rnd = fromBuffer(randBits(bitLen)) + } while (rnd > interval) + return rnd + min +} + +const randBits = (bitLength) => { + const byteLength = Math.ceil(bitLength / 8) + const rndBytes = randomBytes(byteLength) + // Fill with 0's the extra bits + rndBytes[0] = rndBytes[0] & (2 ** (bitLength % 8) - 1) + return rndBytes +} + +const toZn = (a, n) => { + a = a % n + return (a < 0) ? a + n : a +} + +const odd = (n) => { + let r = n + while (r % TWO === ZERO) { + r = r / TWO + } + return r +} + +// not sold on these values +const maxCountWhileNoY = 30 +const maxCountWhileInot0 = 22 + +const getPrimeFactors = (e, d, n) => { + const r = odd(e * d - ONE) + + let countWhileNoY = 0 + let y + do { + countWhileNoY++ + if (countWhileNoY === maxCountWhileNoY) { + throw new errors.JWKImportFailed('failed to calculate missing primes') + } + + let countWhileInot0 = 0 + let i = modPow(randBetween(TWO, n), r, n) + let o = ZERO + while (i !== ONE) { + countWhileInot0++ + if (countWhileInot0 === maxCountWhileInot0) { + throw new errors.JWKImportFailed('failed to calculate missing primes') + } + o = i + i = (i * i) % n + } + if (o !== (n - ONE)) { + y = o + } + } while (!y) + + const p = gcd(y - ONE, n) + const q = n / p + + return p > q ? { p, q } : { p: q, q: p } +} + +module.exports = (jwk) => { + const e = fromBuffer(base64url.decodeToBuffer(jwk.e)) + const d = fromBuffer(base64url.decodeToBuffer(jwk.d)) + const n = fromBuffer(base64url.decodeToBuffer(jwk.n)) + + if (d >= n) { + throw new errors.JWKInvalid('invalid RSA private exponent') + } + + const { p, q } = getPrimeFactors(e, d, n) + const dp = d % (p - ONE) + const dq = d % (q - ONE) + const qi = toZn(eGcdX(toZn(q, p), p), p) + + return { + ...jwk, + p: toJWKParameter(p), + q: toJWKParameter(q), + dp: toJWKParameter(dp), + dq: toJWKParameter(dq), + qi: toJWKParameter(qi) + } +} + + +/***/ }), + +/***/ 16054: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { diffieHellman, KeyObject, sign, verify } = __nccwpck_require__(6113) + +const [major, minor] = process.version.substr(1).split('.').map(x => parseInt(x, 10)) + +module.exports = { + oaepHashSupported: major > 12 || (major === 12 && minor >= 9), + keyObjectSupported: !!KeyObject && major >= 12, + edDSASupported: !!sign && !!verify, + dsaEncodingSupported: major > 13 || (major === 13 && minor >= 2) || (major === 12 && minor >= 16), + improvedDH: !!diffieHellman +} + + +/***/ }), + +/***/ 93608: +/***/ ((module) => { + +const minute = 60 +const hour = minute * 60 +const day = hour * 24 +const week = day * 7 +const year = day * 365.25 + +const REGEX = /^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i + +module.exports = (str) => { + const matched = REGEX.exec(str) + + if (!matched) { + throw new TypeError(`invalid time period format ("${str}")`) + } + + const value = parseFloat(matched[1]) + const unit = matched[2].toLowerCase() + + switch (unit) { + case 'sec': + case 'secs': + case 'second': + case 'seconds': + case 's': + return Math.round(value) + case 'minute': + case 'minutes': + case 'min': + case 'mins': + case 'm': + return Math.round(value * minute) + case 'hour': + case 'hours': + case 'hr': + case 'hrs': + case 'h': + return Math.round(value * hour) + case 'day': + case 'days': + case 'd': + return Math.round(value * day) + case 'week': + case 'weeks': + case 'w': + return Math.round(value * week) + case 'year': + case 'years': + case 'yr': + case 'yrs': + case 'y': + return Math.round(value * year) + } +} + + +/***/ }), + +/***/ 12644: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { timingSafeEqual: TSE } = __nccwpck_require__(6113) + +const paddedBuffer = (input, length) => { + if (input.length === length) { + return input + } + + const buffer = Buffer.alloc(length) + input.copy(buffer) + return buffer +} + +const timingSafeEqual = (a, b) => { + const length = Math.max(a.length, b.length) + return TSE(paddedBuffer(a, length), paddedBuffer(b, length)) +} + +module.exports = timingSafeEqual + + +/***/ }), + +/***/ 98329: +/***/ ((module) => { + +const MAX_INT32 = Math.pow(2, 32) + +module.exports = (value, buf = Buffer.allocUnsafe(8)) => { + const high = Math.floor(value / MAX_INT32) + const low = value % MAX_INT32 + + buf.writeUInt32BE(high, 0) + buf.writeUInt32BE(low, 4) + return buf +} + + +/***/ }), + +/***/ 29943: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { JOSECritNotUnderstood, JWSInvalid } = __nccwpck_require__(94269) + +const DEFINED = new Set([ + 'alg', 'jku', 'jwk', 'kid', 'x5u', 'x5c', 'x5t', 'x5t#S256', 'typ', 'cty', + 'crit', 'enc', 'zip', 'epk', 'apu', 'apv', 'iv', 'tag', 'p2s', 'p2c' +]) + +module.exports = function validateCrit (Err, protectedHeader, unprotectedHeader, understood) { + if (protectedHeader && 'crit' in protectedHeader) { + if ( + !Array.isArray(protectedHeader.crit) || + protectedHeader.crit.length === 0 || + protectedHeader.crit.some(s => typeof s !== 'string' || !s) + ) { + throw new Err('"crit" Header Parameter MUST be an array of non-empty strings when present') + } + const whitelisted = new Set(understood) + const combined = { ...protectedHeader, ...unprotectedHeader } + protectedHeader.crit.forEach((parameter) => { + if (DEFINED.has(parameter)) { + throw new Err(`The critical list contains a non-extension Header Parameter ${parameter}`) + } + if (!whitelisted.has(parameter)) { + throw new JOSECritNotUnderstood(`critical "${parameter}" is not understood`) + } + if (parameter === 'b64') { + if (!('b64' in protectedHeader)) { + throw new JWSInvalid('"b64" critical parameter must be integrity protected') + } + if (typeof protectedHeader.b64 !== 'boolean') { + throw new JWSInvalid('"b64" critical parameter must be a boolean') + } + } else if (!(parameter in combined)) { + throw new Err(`critical parameter "${parameter}" is missing`) + } + }) + } + if (unprotectedHeader && 'crit' in unprotectedHeader) { + throw new Err('"crit" Header Parameter MUST be integrity protected when present') + } +} + + +/***/ }), + +/***/ 68545: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + JWE: __nccwpck_require__(98410), + JWK: __nccwpck_require__(43421), + JWKS: __nccwpck_require__(21154), + JWS: __nccwpck_require__(82390), + JWT: __nccwpck_require__(34158), + errors: __nccwpck_require__(94269) +} + + +/***/ }), + +/***/ 90295: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { createCipheriv, createDecipheriv, getCiphers } = __nccwpck_require__(6113) + +const uint64be = __nccwpck_require__(98329) +const timingSafeEqual = __nccwpck_require__(12644) +const { KEYOBJECT } = __nccwpck_require__(12152) +const { JWEInvalid, JWEDecryptionFailed } = __nccwpck_require__(94269) + +const checkInput = function (size, iv, tag) { + if (iv.length !== 16) { + throw new JWEInvalid('invalid iv') + } + if (arguments.length === 3) { + if (tag.length !== size / 8) { + throw new JWEInvalid('invalid tag') + } + } +} + +const encrypt = (size, sign, { [KEYOBJECT]: keyObject }, cleartext, { iv, aad = Buffer.alloc(0) }) => { + const key = keyObject.export() + checkInput(size, iv) + + const keySize = size / 8 + const encKey = key.slice(keySize) + const cipher = createCipheriv(`aes-${size}-cbc`, encKey, iv) + const ciphertext = Buffer.concat([cipher.update(cleartext), cipher.final()]) + const macData = Buffer.concat([aad, iv, ciphertext, uint64be(aad.length * 8)]) + + const macKey = key.slice(0, keySize) + const tag = sign({ [KEYOBJECT]: macKey }, macData).slice(0, keySize) + + return { ciphertext, tag } +} + +const decrypt = (size, sign, { [KEYOBJECT]: keyObject }, ciphertext, { iv, tag = Buffer.alloc(0), aad = Buffer.alloc(0) }) => { + checkInput(size, iv, tag) + + const keySize = size / 8 + const key = keyObject.export() + const encKey = key.slice(keySize) + const macKey = key.slice(0, keySize) + + const macData = Buffer.concat([aad, iv, ciphertext, uint64be(aad.length * 8)]) + const expectedTag = sign({ [KEYOBJECT]: macKey }, macData, tag).slice(0, keySize) + const macCheckPassed = timingSafeEqual(tag, expectedTag) + + if (!macCheckPassed) { + throw new JWEDecryptionFailed() + } + + let cleartext + try { + const cipher = createDecipheriv(`aes-${size}-cbc`, encKey, iv) + cleartext = Buffer.concat([cipher.update(ciphertext), cipher.final()]) + } catch (err) {} + + if (!cleartext) { + throw new JWEDecryptionFailed() + } + + return cleartext +} + +module.exports = (JWA, JWK) => { + ['A128CBC-HS256', 'A192CBC-HS384', 'A256CBC-HS512'].forEach((jwaAlg) => { + const size = parseInt(jwaAlg.substr(1, 3), 10) + const sign = JWA.sign.get(`HS${size * 2}`) + if (getCiphers().includes(`aes-${size}-cbc`)) { + JWA.encrypt.set(jwaAlg, encrypt.bind(undefined, size, sign)) + JWA.decrypt.set(jwaAlg, decrypt.bind(undefined, size, sign)) + JWK.oct.encrypt[jwaAlg] = JWK.oct.decrypt[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length / 2 === size + } + }) +} + + +/***/ }), + +/***/ 65929: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { createCipheriv, createDecipheriv, getCiphers } = __nccwpck_require__(6113) + +const { KEYOBJECT } = __nccwpck_require__(12152) +const { JWEInvalid, JWEDecryptionFailed } = __nccwpck_require__(94269) +const { asInput } = __nccwpck_require__(82286) + +const checkInput = function (size, iv, tag) { + if (iv.length !== 12) { + throw new JWEInvalid('invalid iv') + } + if (arguments.length === 3) { + if (tag.length !== 16) { + throw new JWEInvalid('invalid tag') + } + } +} + +const encrypt = (size, { [KEYOBJECT]: keyObject }, cleartext, { iv, aad = Buffer.alloc(0) }) => { + const key = asInput(keyObject, false) + checkInput(size, iv) + + const cipher = createCipheriv(`aes-${size}-gcm`, key, iv, { authTagLength: 16 }) + cipher.setAAD(aad) + + const ciphertext = Buffer.concat([cipher.update(cleartext), cipher.final()]) + const tag = cipher.getAuthTag() + + return { ciphertext, tag } +} + +const decrypt = (size, { [KEYOBJECT]: keyObject }, ciphertext, { iv, tag = Buffer.alloc(0), aad = Buffer.alloc(0) }) => { + const key = asInput(keyObject, false) + checkInput(size, iv, tag) + + try { + const cipher = createDecipheriv(`aes-${size}-gcm`, key, iv, { authTagLength: 16 }) + cipher.setAuthTag(tag) + cipher.setAAD(aad) + + return Buffer.concat([cipher.update(ciphertext), cipher.final()]) + } catch (err) { + throw new JWEDecryptionFailed() + } +} + +module.exports = (JWA, JWK) => { + ['A128GCM', 'A192GCM', 'A256GCM'].forEach((jwaAlg) => { + const size = parseInt(jwaAlg.substr(1, 3), 10) + if (getCiphers().includes(`aes-${size}-gcm`)) { + JWA.encrypt.set(jwaAlg, encrypt.bind(undefined, size)) + JWA.decrypt.set(jwaAlg, decrypt.bind(undefined, size)) + JWK.oct.encrypt[jwaAlg] = JWK.oct.decrypt[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size + } + }) +} + + +/***/ }), + +/***/ 26291: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const generateIV = __nccwpck_require__(61744) +const base64url = __nccwpck_require__(90112) + +module.exports = (JWA, JWK) => { + ['A128GCMKW', 'A192GCMKW', 'A256GCMKW'].forEach((jwaAlg) => { + const encAlg = jwaAlg.substr(0, 7) + const size = parseInt(jwaAlg.substr(1, 3), 10) + const encrypt = JWA.encrypt.get(encAlg) + const decrypt = JWA.decrypt.get(encAlg) + + if (encrypt && decrypt) { + JWA.keyManagementEncrypt.set(jwaAlg, (key, payload) => { + const iv = generateIV(jwaAlg) + const { ciphertext, tag } = encrypt(key, payload, { iv }) + return { + wrapped: ciphertext, + header: { tag: base64url.encodeBuffer(tag), iv: base64url.encodeBuffer(iv) } + } + }) + JWA.keyManagementDecrypt.set(jwaAlg, decrypt) + JWK.oct.wrapKey[jwaAlg] = JWK.oct.unwrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size + } + }) +} + + +/***/ }), + +/***/ 83607: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { createCipheriv, createDecipheriv, getCiphers } = __nccwpck_require__(6113) + +const { KEYOBJECT } = __nccwpck_require__(12152) +const { asInput } = __nccwpck_require__(82286) + +const checkInput = (data) => { + if (data !== undefined && data.length % 8 !== 0) { + throw new Error('invalid data length') + } +} + +const wrapKey = (alg, { [KEYOBJECT]: keyObject }, payload) => { + const key = asInput(keyObject, false) + const cipher = createCipheriv(alg, key, Buffer.alloc(8, 'a6', 'hex')) + + return { wrapped: Buffer.concat([cipher.update(payload), cipher.final()]) } +} + +const unwrapKey = (alg, { [KEYOBJECT]: keyObject }, payload) => { + const key = asInput(keyObject, false) + checkInput(payload) + const cipher = createDecipheriv(alg, key, Buffer.alloc(8, 'a6', 'hex')) + + return Buffer.concat([cipher.update(payload), cipher.final()]) +} + +module.exports = (JWA, JWK) => { + ['A128KW', 'A192KW', 'A256KW'].forEach((jwaAlg) => { + const size = parseInt(jwaAlg.substr(1, 3), 10) + const alg = `aes${size}-wrap` + if (getCiphers().includes(alg)) { + JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, alg)) + JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, alg)) + JWK.oct.wrapKey[jwaAlg] = JWK.oct.unwrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size + } + }) +} + + +/***/ }), + +/***/ 69784: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { improvedDH } = __nccwpck_require__(16054) + +if (improvedDH) { + const { diffieHellman } = __nccwpck_require__(6113) + + const { KeyObject } = __nccwpck_require__(82286) + const importKey = __nccwpck_require__(96317) + + module.exports = ({ keyObject: privateKey }, publicKey) => { + if (!(publicKey instanceof KeyObject)) { + ({ keyObject: publicKey } = importKey(publicKey)) + } + + return diffieHellman({ privateKey, publicKey }) + } +} else { + const { createECDH, constants: { POINT_CONVERSION_UNCOMPRESSED } } = __nccwpck_require__(6113) + + const base64url = __nccwpck_require__(90112) + + const crvToCurve = (crv) => { + switch (crv) { + case 'P-256': + return 'prime256v1' + case 'P-384': + return 'secp384r1' + case 'P-521': + return 'secp521r1' + } + } + + const UNCOMPRESSED = Buffer.alloc(1, POINT_CONVERSION_UNCOMPRESSED) + const pubToBuffer = (x, y) => Buffer.concat([UNCOMPRESSED, base64url.decodeToBuffer(x), base64url.decodeToBuffer(y)]) + + module.exports = ({ crv, d }, { x, y }) => { + const curve = crvToCurve(crv) + const exchange = createECDH(curve) + + exchange.setPrivateKey(base64url.decodeToBuffer(d)) + + return exchange.computeSecret(pubToBuffer(x, y)) + } +} + + +/***/ }), + +/***/ 84448: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { createHash } = __nccwpck_require__(6113) +const ecdhComputeSecret = __nccwpck_require__(69784) + +const concat = (key, length, value) => { + const iterations = Math.ceil(length / 32) + let res + + for (let iter = 1; iter <= iterations; iter++) { + const buf = Buffer.allocUnsafe(4 + key.length + value.length) + buf.writeUInt32BE(iter, 0) + key.copy(buf, 4) + value.copy(buf, 4 + key.length) + if (!res) { + res = createHash('sha256').update(buf).digest() + } else { + res = Buffer.concat([res, createHash('sha256').update(buf).digest()]) + } + } + + return res.slice(0, length) +} + +const uint32be = (value, buf = Buffer.allocUnsafe(4)) => { + buf.writeUInt32BE(value) + return buf +} + +const lengthAndInput = input => Buffer.concat([uint32be(input.length), input]) + +module.exports = (alg, keyLen, privKey, pubKey, { apu = Buffer.alloc(0), apv = Buffer.alloc(0) } = {}, computeSecret = ecdhComputeSecret) => { + const value = Buffer.concat([ + lengthAndInput(Buffer.from(alg)), + lengthAndInput(apu), + lengthAndInput(apv), + uint32be(keyLen) + ]) + + const sharedSecret = computeSecret(privKey, pubKey) + return concat(sharedSecret, keyLen / 8, value) +} + + +/***/ }), + +/***/ 25044: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { improvedDH } = __nccwpck_require__(16054) +const { KEYLENGTHS } = __nccwpck_require__(32075) +const { generateSync } = __nccwpck_require__(28510) + +const derive = __nccwpck_require__(84448) + +const wrapKey = (key, payload, { enc }) => { + const epk = generateSync(key.kty, key.crv) + + const derivedKey = derive(enc, KEYLENGTHS.get(enc), epk, key) + + return { + wrapped: derivedKey, + header: { epk: { kty: key.kty, crv: key.crv, x: epk.x, y: epk.y } } + } +} + +const unwrapKey = (key, payload, header) => { + const { enc, epk } = header + return derive(enc, KEYLENGTHS.get(enc), key, epk, header) +} + +module.exports = (JWA, JWK) => { + JWA.keyManagementEncrypt.set('ECDH-ES', wrapKey) + JWA.keyManagementDecrypt.set('ECDH-ES', unwrapKey) + JWK.EC.deriveKey['ECDH-ES'] = key => (key.use === 'enc' || key.use === undefined) && key.crv !== 'secp256k1' + + if (improvedDH) { + JWK.OKP.deriveKey['ECDH-ES'] = key => (key.use === 'enc' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('x') + } +} + + +/***/ }), + +/***/ 50739: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { improvedDH } = __nccwpck_require__(16054) +const { KEYOBJECT } = __nccwpck_require__(12152) +const { generateSync } = __nccwpck_require__(28510) +const { ECDH_DERIVE_LENGTHS } = __nccwpck_require__(32075) + +const derive = __nccwpck_require__(84448) + +const wrapKey = (wrap, derive, key, payload) => { + const epk = generateSync(key.kty, key.crv) + + const derivedKey = derive(epk, key, payload) + + const result = wrap({ [KEYOBJECT]: derivedKey }, payload) + result.header = result.header || {} + Object.assign(result.header, { epk: { kty: key.kty, crv: key.crv, x: epk.x, y: epk.y } }) + + return result +} + +const unwrapKey = (unwrap, derive, key, payload, header) => { + const { epk } = header + const derivedKey = derive(key, epk, header) + + return unwrap({ [KEYOBJECT]: derivedKey }, payload, header) +} + +module.exports = (JWA, JWK) => { + ['ECDH-ES+A128KW', 'ECDH-ES+A192KW', 'ECDH-ES+A256KW'].forEach((jwaAlg) => { + const kw = jwaAlg.substr(-6) + const kwWrap = JWA.keyManagementEncrypt.get(kw) + const kwUnwrap = JWA.keyManagementDecrypt.get(kw) + const keylen = parseInt(jwaAlg.substr(9, 3), 10) + ECDH_DERIVE_LENGTHS.set(jwaAlg, keylen) + + if (kwWrap && kwUnwrap) { + JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, kwWrap, derive.bind(undefined, jwaAlg, keylen))) + JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, kwUnwrap, derive.bind(undefined, jwaAlg, keylen))) + JWK.EC.deriveKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.crv !== 'secp256k1' + + if (improvedDH) { + JWK.OKP.deriveKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('x') + } + } + }) +} +module.exports.wrapKey = wrapKey +module.exports.unwrapKey = unwrapKey + + +/***/ }), + +/***/ 12303: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { sign: signOneShot, verify: verifyOneShot, createSign, createVerify, getCurves } = __nccwpck_require__(6113) + +const { derToJose, joseToDer } = __nccwpck_require__(18019) +const { KEYOBJECT } = __nccwpck_require__(12152) +const resolveNodeAlg = __nccwpck_require__(67600) +const { asInput } = __nccwpck_require__(82286) +const { dsaEncodingSupported } = __nccwpck_require__(16054) + +let sign, verify + +if (dsaEncodingSupported) { + sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { + if (typeof payload === 'string') { + payload = Buffer.from(payload) + } + return signOneShot(nodeAlg, payload, { key: asInput(keyObject, false), dsaEncoding: 'ieee-p1363' }) + } + verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { + try { + return verifyOneShot(nodeAlg, payload, { key: asInput(keyObject, true), dsaEncoding: 'ieee-p1363' }, signature) + } catch (err) { + return false + } + } +} else { + sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { + return derToJose(createSign(nodeAlg).update(payload).sign(asInput(keyObject, false)), jwaAlg) + } + verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { + try { + return createVerify(nodeAlg).update(payload).verify(asInput(keyObject, true), joseToDer(signature, jwaAlg)) + } catch (err) { + return false + } + } +} + +const crvToAlg = (crv) => { + switch (crv) { + case 'P-256': + return 'ES256' + case 'secp256k1': + return 'ES256K' + case 'P-384': + return 'ES384' + case 'P-521': + return 'ES512' + } +} + +module.exports = (JWA, JWK) => { + const algs = [] + + if (getCurves().includes('prime256v1')) { + algs.push('ES256') + } + + if (getCurves().includes('secp256k1')) { + algs.push('ES256K') + } + + if (getCurves().includes('secp384r1')) { + algs.push('ES384') + } + + if (getCurves().includes('secp521r1')) { + algs.push('ES512') + } + + algs.forEach((jwaAlg) => { + const nodeAlg = resolveNodeAlg(jwaAlg) + JWA.sign.set(jwaAlg, sign.bind(undefined, jwaAlg, nodeAlg)) + JWA.verify.set(jwaAlg, verify.bind(undefined, jwaAlg, nodeAlg)) + JWK.EC.sign[jwaAlg] = key => key.private && JWK.EC.verify[jwaAlg](key) + JWK.EC.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && crvToAlg(key.crv) === jwaAlg + }) +} + + +/***/ }), + +/***/ 83408: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { sign: signOneShot, verify: verifyOneShot } = __nccwpck_require__(6113) + +const { KEYOBJECT } = __nccwpck_require__(12152) +const { edDSASupported } = __nccwpck_require__(16054) + +const sign = ({ [KEYOBJECT]: keyObject }, payload) => { + if (typeof payload === 'string') { + payload = Buffer.from(payload) + } + return signOneShot(undefined, payload, keyObject) +} + +const verify = ({ [KEYOBJECT]: keyObject }, payload, signature) => { + return verifyOneShot(undefined, payload, keyObject, signature) +} + +module.exports = (JWA, JWK) => { + if (edDSASupported) { + JWA.sign.set('EdDSA', sign) + JWA.verify.set('EdDSA', verify) + JWK.OKP.sign.EdDSA = key => key.private && JWK.OKP.verify.EdDSA(key) + JWK.OKP.verify.EdDSA = key => (key.use === 'sig' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('ed') + } +} + + +/***/ }), + +/***/ 87591: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { createHmac } = __nccwpck_require__(6113) + +const { KEYOBJECT } = __nccwpck_require__(12152) +const timingSafeEqual = __nccwpck_require__(12644) +const resolveNodeAlg = __nccwpck_require__(67600) +const { asInput } = __nccwpck_require__(82286) + +const sign = (jwaAlg, hmacAlg, { [KEYOBJECT]: keyObject }, payload) => { + const hmac = createHmac(hmacAlg, asInput(keyObject, false)) + hmac.update(payload) + return hmac.digest() +} + +const verify = (jwaAlg, hmacAlg, key, payload, signature) => { + const expected = sign(jwaAlg, hmacAlg, key, payload) + const actual = signature + + return timingSafeEqual(actual, expected) +} + +module.exports = (JWA, JWK) => { + ['HS256', 'HS384', 'HS512'].forEach((jwaAlg) => { + const hmacAlg = resolveNodeAlg(jwaAlg) + JWA.sign.set(jwaAlg, sign.bind(undefined, jwaAlg, hmacAlg)) + JWA.verify.set(jwaAlg, verify.bind(undefined, jwaAlg, hmacAlg)) + JWK.oct.sign[jwaAlg] = JWK.oct.verify[jwaAlg] = key => key.use === 'sig' || key.use === undefined + }) +} + + +/***/ }), + +/***/ 406: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { JWKKeySupport, JOSENotSupported } = __nccwpck_require__(94269) +const { KEY_MANAGEMENT_ENCRYPT, KEY_MANAGEMENT_DECRYPT } = __nccwpck_require__(12152) + +const { JWA, JWK } = __nccwpck_require__(32075) + +// sign, verify +__nccwpck_require__(87591)(JWA, JWK) +__nccwpck_require__(12303)(JWA, JWK) +__nccwpck_require__(83408)(JWA, JWK) +__nccwpck_require__(96231)(JWA, JWK) +__nccwpck_require__(80047)(JWA, JWK) +__nccwpck_require__(2254)(JWA) + +// encrypt, decrypt +__nccwpck_require__(90295)(JWA, JWK) +__nccwpck_require__(65929)(JWA, JWK) + +// wrapKey, unwrapKey +__nccwpck_require__(90966)(JWA, JWK) +__nccwpck_require__(83607)(JWA, JWK) +__nccwpck_require__(26291)(JWA, JWK) + +// deriveKey +__nccwpck_require__(95425)(JWA, JWK) +__nccwpck_require__(25044)(JWA, JWK) +__nccwpck_require__(50739)(JWA, JWK) + +const check = (key, op, alg) => { + const cache = `_${op}_${alg}` + + let label + let keyOp + if (op === 'keyManagementEncrypt') { + label = 'key management (encryption)' + keyOp = KEY_MANAGEMENT_ENCRYPT + } else if (op === 'keyManagementDecrypt') { + label = 'key management (decryption)' + keyOp = KEY_MANAGEMENT_DECRYPT + } + + if (cache in key) { + if (key[cache]) { + return + } + throw new JWKKeySupport(`the key does not support ${alg} ${label || op} algorithm`) + } + + let value = true + if (!JWA[op].has(alg)) { + throw new JOSENotSupported(`unsupported ${label || op} alg: ${alg}`) + } else if (!key.algorithms(keyOp).has(alg)) { + value = false + } + + Object.defineProperty(key, cache, { value, enumerable: false }) + + if (!value) { + return check(key, op, alg) + } +} + +module.exports = { + check, + sign: (alg, key, payload) => { + check(key, 'sign', alg) + return JWA.sign.get(alg)(key, payload) + }, + verify: (alg, key, payload, signature) => { + check(key, 'verify', alg) + return JWA.verify.get(alg)(key, payload, signature) + }, + keyManagementEncrypt: (alg, key, payload, opts) => { + check(key, 'keyManagementEncrypt', alg) + return JWA.keyManagementEncrypt.get(alg)(key, payload, opts) + }, + keyManagementDecrypt: (alg, key, payload, opts) => { + check(key, 'keyManagementDecrypt', alg) + return JWA.keyManagementDecrypt.get(alg)(key, payload, opts) + }, + encrypt: (alg, key, cleartext, opts) => { + check(key, 'encrypt', alg) + return JWA.encrypt.get(alg)(key, cleartext, opts) + }, + decrypt: (alg, key, ciphertext, opts) => { + check(key, 'decrypt', alg) + return JWA.decrypt.get(alg)(key, ciphertext, opts) + } +} + + +/***/ }), + +/***/ 2254: +/***/ ((module) => { + +const sign = () => Buffer.from('') +const verify = (key, payload, signature) => !signature.length + +module.exports = (JWA, JWK) => { + JWA.sign.set('none', sign) + JWA.verify.set('none', verify) +} + + +/***/ }), + +/***/ 95425: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { pbkdf2Sync: pbkdf2, randomBytes } = __nccwpck_require__(6113) + +const { KEYOBJECT } = __nccwpck_require__(12152) +const base64url = __nccwpck_require__(90112) + +const SALT_LENGTH = 16 +const NULL_BUFFER = Buffer.alloc(1, 0) + +const concatSalt = (alg, p2s) => { + return Buffer.concat([ + Buffer.from(alg, 'utf8'), + NULL_BUFFER, + p2s + ]) +} + +const wrapKey = (keylen, sha, concat, wrap, { [KEYOBJECT]: keyObject }, payload) => { + // Note that if password-based encryption is used for multiple + // recipients, it is expected that each recipient use different values + // for the PBES2 parameters "p2s" and "p2c". + // here we generate p2c between 2048 and 4096 and random p2s + const p2c = Math.floor((Math.random() * 2049) + 2048) + const p2s = randomBytes(SALT_LENGTH) + const salt = concat(p2s) + + const derivedKey = pbkdf2(keyObject.export(), salt, p2c, keylen, sha) + + const result = wrap({ [KEYOBJECT]: derivedKey }, payload) + result.header = result.header || {} + Object.assign(result.header, { p2c, p2s: base64url.encodeBuffer(p2s) }) + + return result +} + +const unwrapKey = (keylen, sha, concat, unwrap, { [KEYOBJECT]: keyObject }, payload, header) => { + const { p2s, p2c } = header + const salt = concat(p2s) + const derivedKey = pbkdf2(keyObject.export(), salt, p2c, keylen, sha) + return unwrap({ [KEYOBJECT]: derivedKey }, payload, header) +} + +module.exports = (JWA, JWK) => { + ['PBES2-HS256+A128KW', 'PBES2-HS384+A192KW', 'PBES2-HS512+A256KW'].forEach((jwaAlg) => { + const kw = jwaAlg.substr(-6) + const kwWrap = JWA.keyManagementEncrypt.get(kw) + const kwUnwrap = JWA.keyManagementDecrypt.get(kw) + const keylen = parseInt(jwaAlg.substr(13, 3), 10) / 8 + const sha = `sha${jwaAlg.substr(8, 3)}` + + if (kwWrap && kwUnwrap) { + JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwWrap)) + JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwUnwrap)) + JWK.oct.deriveKey[jwaAlg] = key => key.use === 'enc' || key.use === undefined + } + }) +} + + +/***/ }), + +/***/ 90966: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { publicEncrypt, privateDecrypt, constants } = __nccwpck_require__(6113) + +const { oaepHashSupported } = __nccwpck_require__(16054) +const { KEYOBJECT } = __nccwpck_require__(12152) +const { asInput } = __nccwpck_require__(82286) + +const resolvePadding = (alg) => { + switch (alg) { + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': + return constants.RSA_PKCS1_OAEP_PADDING + case 'RSA1_5': + return constants.RSA_PKCS1_PADDING + } +} + +const resolveOaepHash = (alg) => { + switch (alg) { + case 'RSA-OAEP': + return 'sha1' + case 'RSA-OAEP-256': + return 'sha256' + case 'RSA-OAEP-384': + return 'sha384' + case 'RSA-OAEP-512': + return 'sha512' + default: + return undefined + } +} + +const wrapKey = (padding, oaepHash, { [KEYOBJECT]: keyObject }, payload) => { + const key = asInput(keyObject, true) + return { wrapped: publicEncrypt({ key, oaepHash, padding }, payload) } +} + +const unwrapKey = (padding, oaepHash, { [KEYOBJECT]: keyObject }, payload) => { + const key = asInput(keyObject, false) + return privateDecrypt({ key, oaepHash, padding }, payload) +} + +const LENGTHS = { + RSA1_5: 0, + 'RSA-OAEP': 592, + 'RSA-OAEP-256': 784, + 'RSA-OAEP-384': 1040, + 'RSA-OAEP-512': 1296 +} + +module.exports = (JWA, JWK) => { + const algs = ['RSA-OAEP', 'RSA1_5'] + + if (oaepHashSupported) { + algs.splice(1, 0, 'RSA-OAEP-256', 'RSA-OAEP-384', 'RSA-OAEP-512') + } + + algs.forEach((jwaAlg) => { + const padding = resolvePadding(jwaAlg) + const oaepHash = resolveOaepHash(jwaAlg) + JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, padding, oaepHash)) + JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, padding, oaepHash)) + JWK.RSA.wrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length >= LENGTHS[jwaAlg] + JWK.RSA.unwrapKey[jwaAlg] = key => key.private && (key.use === 'enc' || key.use === undefined) && key.length >= LENGTHS[jwaAlg] + }) +} + + +/***/ }), + +/***/ 80047: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { createSign, createVerify } = __nccwpck_require__(6113) + +const { KEYOBJECT } = __nccwpck_require__(12152) +const resolveNodeAlg = __nccwpck_require__(67600) +const { asInput } = __nccwpck_require__(82286) + +const sign = (nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { + return createSign(nodeAlg).update(payload).sign(asInput(keyObject, false)) +} + +const verify = (nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { + return createVerify(nodeAlg).update(payload).verify(asInput(keyObject, true), signature) +} + +const LENGTHS = { + RS256: 0, + RS384: 624, + RS512: 752 +} + +module.exports = (JWA, JWK) => { + ['RS256', 'RS384', 'RS512'].forEach((jwaAlg) => { + const nodeAlg = resolveNodeAlg(jwaAlg) + JWA.sign.set(jwaAlg, sign.bind(undefined, nodeAlg)) + JWA.verify.set(jwaAlg, verify.bind(undefined, nodeAlg)) + JWK.RSA.sign[jwaAlg] = key => key.private && JWK.RSA.verify[jwaAlg](key) + JWK.RSA.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && key.length >= LENGTHS[jwaAlg] + }) +} + + +/***/ }), + +/***/ 96231: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { + createSign, + createVerify, + constants +} = __nccwpck_require__(6113) + +const { KEYOBJECT } = __nccwpck_require__(12152) +const resolveNodeAlg = __nccwpck_require__(67600) +const { asInput } = __nccwpck_require__(82286) + +const sign = (nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { + const key = asInput(keyObject, false) + return createSign(nodeAlg).update(payload).sign({ + key, + padding: constants.RSA_PKCS1_PSS_PADDING, + saltLength: constants.RSA_PSS_SALTLEN_DIGEST + }) +} + +const verify = (nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { + const key = asInput(keyObject, true) + return createVerify(nodeAlg).update(payload).verify({ + key, + padding: constants.RSA_PKCS1_PSS_PADDING, + saltLength: constants.RSA_PSS_SALTLEN_DIGEST + }, signature) +} + +const LENGTHS = { + PS256: 528, + PS384: 784, + PS512: 1040 +} + +module.exports = (JWA, JWK) => { + ['PS256', 'PS384', 'PS512'].forEach((jwaAlg) => { + const nodeAlg = resolveNodeAlg(jwaAlg) + JWA.sign.set(jwaAlg, sign.bind(undefined, nodeAlg)) + JWA.verify.set(jwaAlg, verify.bind(undefined, nodeAlg)) + JWK.RSA.sign[jwaAlg] = key => key.private && JWK.RSA.verify[jwaAlg](key) + JWK.RSA.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && key.length >= LENGTHS[jwaAlg] + }) +} + + +/***/ }), + +/***/ 87171: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { inflateRawSync } = __nccwpck_require__(59796) + +const base64url = __nccwpck_require__(90112) +const getKey = __nccwpck_require__(77217) +const { KeyStore } = __nccwpck_require__(21154) +const errors = __nccwpck_require__(94269) +const { check, decrypt, keyManagementDecrypt } = __nccwpck_require__(406) +const JWK = __nccwpck_require__(43421) + +const { createSecretKey } = __nccwpck_require__(82286) +const generateCEK = __nccwpck_require__(74824) +const validateHeaders = __nccwpck_require__(95209) +const { detect: resolveSerialization } = __nccwpck_require__(51120) + +const SINGLE_RECIPIENT = new Set(['compact', 'flattened']) + +const combineHeader = (prot = {}, unprotected = {}, header = {}) => { + if (typeof prot === 'string') { + prot = base64url.JSON.decode(prot) + } + + const p2s = prot.p2s || unprotected.p2s || header.p2s + const apu = prot.apu || unprotected.apu || header.apu + const apv = prot.apv || unprotected.apv || header.apv + const iv = prot.iv || unprotected.iv || header.iv + const tag = prot.tag || unprotected.tag || header.tag + + return { + ...prot, + ...unprotected, + ...header, + ...(typeof p2s === 'string' ? { p2s: base64url.decodeToBuffer(p2s) } : undefined), + ...(typeof apu === 'string' ? { apu: base64url.decodeToBuffer(apu) } : undefined), + ...(typeof apv === 'string' ? { apv: base64url.decodeToBuffer(apv) } : undefined), + ...(typeof iv === 'string' ? { iv: base64url.decodeToBuffer(iv) } : undefined), + ...(typeof tag === 'string' ? { tag: base64url.decodeToBuffer(tag) } : undefined) + } +} + +const validateAlgorithms = (algorithms, option) => { + if (algorithms !== undefined && (!Array.isArray(algorithms) || algorithms.some(s => typeof s !== 'string' || !s))) { + throw new TypeError(`"${option}" option must be an array of non-empty strings`) + } + + if (!algorithms) { + return undefined + } + + return new Set(algorithms) +} + +/* + * @public + */ +const jweDecrypt = (skipValidateHeaders, serialization, jwe, key, { crit = [], complete = false, keyManagementAlgorithms, contentEncryptionAlgorithms } = {}) => { + key = getKey(key, true) + + keyManagementAlgorithms = validateAlgorithms(keyManagementAlgorithms, 'keyManagementAlgorithms') + contentEncryptionAlgorithms = validateAlgorithms(contentEncryptionAlgorithms, 'contentEncryptionAlgorithms') + + if (!Array.isArray(crit) || crit.some(s => typeof s !== 'string' || !s)) { + throw new TypeError('"crit" option must be an array of non-empty strings') + } + + if (!serialization) { + serialization = resolveSerialization(jwe) + } + + let alg, ciphertext, enc, encryptedKey, iv, opts, prot, tag, unprotected, cek, aad, header + + // treat general format with one recipient as flattened + // skips iteration and avoids multi errors in this case + if (serialization === 'general' && jwe.recipients.length === 1) { + serialization = 'flattened' + const { recipients, ...root } = jwe + jwe = { ...root, ...recipients[0] } + } + + if (SINGLE_RECIPIENT.has(serialization)) { + if (serialization === 'compact') { // compact serialization format + ([prot, encryptedKey, iv, ciphertext, tag] = jwe.split('.')) + } else { // flattened serialization format + ({ protected: prot, encrypted_key: encryptedKey, iv, ciphertext, tag, unprotected, aad, header } = jwe) + } + + if (!skipValidateHeaders) { + validateHeaders(prot, unprotected, [{ header }], true, crit) + } + + opts = combineHeader(prot, unprotected, header) + + ;({ alg, enc } = opts) + + if (keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) { + throw new errors.JOSEAlgNotWhitelisted('key management algorithm not whitelisted') + } + + if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) { + throw new errors.JOSEAlgNotWhitelisted('content encryption algorithm not whitelisted') + } + + if (key instanceof KeyStore) { + const keystore = key + let keys + if (opts.alg === 'dir') { + keys = keystore.all({ kid: opts.kid, alg: opts.enc, key_ops: ['decrypt'] }) + } else { + keys = keystore.all({ kid: opts.kid, alg: opts.alg, key_ops: ['unwrapKey'] }) + } + switch (keys.length) { + case 0: + throw new errors.JWKSNoMatchingKey() + case 1: + // treat the call as if a Key instance was passed in + // skips iteration and avoids multi errors in this case + key = keys[0] + break + default: { + const errs = [] + for (const key of keys) { + try { + return jweDecrypt(true, serialization, jwe, key, { + crit, + complete, + contentEncryptionAlgorithms: contentEncryptionAlgorithms ? [...contentEncryptionAlgorithms] : undefined, + keyManagementAlgorithms: keyManagementAlgorithms ? [...keyManagementAlgorithms] : undefined + }) + } catch (err) { + errs.push(err) + continue + } + } + + const multi = new errors.JOSEMultiError(errs) + if ([...multi].some(e => e instanceof errors.JWEDecryptionFailed)) { + throw new errors.JWEDecryptionFailed() + } + throw multi + } + } + } + + check(key, ...(alg === 'dir' ? ['decrypt', enc] : ['keyManagementDecrypt', alg])) + + try { + if (alg === 'dir') { + cek = JWK.asKey(key, { alg: enc, use: 'enc' }) + } else if (alg === 'ECDH-ES') { + const unwrapped = keyManagementDecrypt(alg, key, undefined, opts) + cek = JWK.asKey(createSecretKey(unwrapped), { alg: enc, use: 'enc' }) + } else { + const unwrapped = keyManagementDecrypt(alg, key, base64url.decodeToBuffer(encryptedKey), opts) + cek = JWK.asKey(createSecretKey(unwrapped), { alg: enc, use: 'enc' }) + } + } catch (err) { + // To mitigate the attacks described in RFC 3218, the + // recipient MUST NOT distinguish between format, padding, and length + // errors of encrypted keys. It is strongly recommended, in the event + // of receiving an improperly formatted key, that the recipient + // substitute a randomly generated CEK and proceed to the next step, to + // mitigate timing attacks. + cek = generateCEK(enc) + } + + let adata + if (aad) { + adata = Buffer.concat([ + Buffer.from(prot || ''), + Buffer.from('.'), + Buffer.from(aad) + ]) + } else { + adata = Buffer.from(prot || '') + } + + try { + iv = base64url.decodeToBuffer(iv) + } catch (err) {} + try { + tag = base64url.decodeToBuffer(tag) + } catch (err) {} + + let cleartext = decrypt(enc, cek, base64url.decodeToBuffer(ciphertext), { iv, tag, aad: adata }) + + if (opts.zip) { + cleartext = inflateRawSync(cleartext) + } + + if (complete) { + const result = { cleartext, key, cek } + if (aad) result.aad = aad + if (header) result.header = header + if (unprotected) result.unprotected = unprotected + if (prot) result.protected = base64url.JSON.decode(prot) + return result + } + + return cleartext + } + + validateHeaders(jwe.protected, jwe.unprotected, jwe.recipients.map(({ header }) => ({ header })), true, crit) + + // general serialization format + const { recipients, ...root } = jwe + const errs = [] + for (const recipient of recipients) { + try { + return jweDecrypt(true, 'flattened', { ...root, ...recipient }, key, { + crit, + complete, + contentEncryptionAlgorithms: contentEncryptionAlgorithms ? [...contentEncryptionAlgorithms] : undefined, + keyManagementAlgorithms: keyManagementAlgorithms ? [...keyManagementAlgorithms] : undefined + }) + } catch (err) { + errs.push(err) + continue + } + } + + const multi = new errors.JOSEMultiError(errs) + if ([...multi].some(e => e instanceof errors.JWEDecryptionFailed)) { + throw new errors.JWEDecryptionFailed() + } else if ([...multi].every(e => e instanceof errors.JWKSNoMatchingKey)) { + throw new errors.JWKSNoMatchingKey() + } + throw multi +} + +module.exports = jweDecrypt.bind(undefined, false, undefined) + + +/***/ }), + +/***/ 2267: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { deflateRawSync } = __nccwpck_require__(59796) + +const { KEYOBJECT } = __nccwpck_require__(12152) +const generateIV = __nccwpck_require__(61744) +const base64url = __nccwpck_require__(90112) +const getKey = __nccwpck_require__(77217) +const isObject = __nccwpck_require__(80281) +const { createSecretKey } = __nccwpck_require__(82286) +const deepClone = __nccwpck_require__(28596) +const importKey = __nccwpck_require__(96317) +const { JWEInvalid } = __nccwpck_require__(94269) +const { check, keyManagementEncrypt, encrypt } = __nccwpck_require__(406) + +const serializers = __nccwpck_require__(51120) +const generateCEK = __nccwpck_require__(74824) +const validateHeaders = __nccwpck_require__(95209) + +const PROCESS_RECIPIENT = Symbol('PROCESS_RECIPIENT') + +class Encrypt { + constructor (cleartext, protectedHeader, aad, unprotectedHeader) { + if (!Buffer.isBuffer(cleartext) && typeof cleartext !== 'string') { + throw new TypeError('cleartext argument must be a Buffer or a string') + } + cleartext = Buffer.from(cleartext) + + if (aad !== undefined && !Buffer.isBuffer(aad) && typeof aad !== 'string') { + throw new TypeError('aad argument must be a Buffer or a string when provided') + } + aad = aad ? Buffer.from(aad) : undefined + + if (protectedHeader !== undefined && !isObject(protectedHeader)) { + throw new TypeError('protectedHeader argument must be a plain object when provided') + } + + if (unprotectedHeader !== undefined && !isObject(unprotectedHeader)) { + throw new TypeError('unprotectedHeader argument must be a plain object when provided') + } + + this._recipients = [] + this._cleartext = cleartext + this._aad = aad + this._unprotected = unprotectedHeader ? deepClone(unprotectedHeader) : undefined + this._protected = protectedHeader ? deepClone(protectedHeader) : undefined + } + + /* + * @public + */ + recipient (key, header) { + key = getKey(key) + + if (header !== undefined && !isObject(header)) { + throw new TypeError('header argument must be a plain object when provided') + } + + this._recipients.push({ + key, + header: header ? deepClone(header) : undefined + }) + + return this + } + + /* + * @private + */ + [PROCESS_RECIPIENT] (recipient) { + const unprotectedHeader = this._unprotected + const protectedHeader = this._protected + const { length: recipientCount } = this._recipients + + const jweHeader = { + ...protectedHeader, + ...unprotectedHeader, + ...recipient.header + } + const { key } = recipient + + const enc = jweHeader.enc + let alg = jweHeader.alg + + if (key.use === 'sig') { + throw new TypeError('a key with "use":"sig" is not usable for encryption') + } + + if (alg === 'dir') { + check(key, 'encrypt', enc) + } else if (alg) { + check(key, 'keyManagementEncrypt', alg) + } else { + alg = key.alg || [...key.algorithms('wrapKey')][0] || [...key.algorithms('deriveKey')][0] + + if (alg === 'ECDH-ES' && recipientCount !== 1) { + alg = [...key.algorithms('deriveKey')][1] + } + + if (!alg) { + throw new JWEInvalid('could not resolve a usable "alg" for a recipient') + } + + if (recipientCount === 1) { + if (protectedHeader) { + protectedHeader.alg = alg + } else { + this._protected = { alg } + } + } else { + if (recipient.header) { + recipient.header.alg = alg + } else { + recipient.header = { alg } + } + } + } + + let wrapped + let generatedHeader + + if (key.kty === 'oct' && alg === 'dir') { + this._cek = importKey(key[KEYOBJECT], { use: 'enc', alg: enc }) + } else { + check(this._cek, 'encrypt', enc) + ;({ wrapped, header: generatedHeader } = keyManagementEncrypt(alg, key, this._cek[KEYOBJECT].export(), { enc, alg })) + if (alg === 'ECDH-ES') { + this._cek = importKey(createSecretKey(wrapped), { use: 'enc', alg: enc }) + } + } + + if (alg === 'dir' || alg === 'ECDH-ES') { + recipient.encrypted_key = '' + } else { + recipient.encrypted_key = base64url.encodeBuffer(wrapped) + } + + if (generatedHeader) { + recipient.generatedHeader = generatedHeader + } + } + + /* + * @public + */ + encrypt (serialization) { + const serializer = serializers[serialization] + if (!serializer) { + throw new TypeError('serialization must be one of "compact", "flattened", "general"') + } + + if (!this._recipients.length) { + throw new JWEInvalid('missing recipients') + } + + serializer.validate(this._protected, this._unprotected, this._aad, this._recipients) + + let enc = validateHeaders(this._protected, this._unprotected, this._recipients, false, this._protected ? this._protected.crit : undefined) + if (!enc) { + enc = 'A128CBC-HS256' + if (this._protected) { + this._protected.enc = enc + } else { + this._protected = { enc } + } + } + const final = {} + this._cek = generateCEK(enc) + + for (const recipient of this._recipients) { + this[PROCESS_RECIPIENT](recipient) + } + + const iv = generateIV(enc) + final.iv = base64url.encodeBuffer(iv) + + if (this._recipients.length === 1 && this._recipients[0].generatedHeader) { + const [{ generatedHeader }] = this._recipients + delete this._recipients[0].generatedHeader + this._protected = { + ...this._protected, + ...generatedHeader + } + } + + if (this._protected) { + final.protected = base64url.JSON.encode(this._protected) + } + final.unprotected = this._unprotected + + let aad + if (this._aad) { + final.aad = base64url.encode(this._aad) + aad = Buffer.concat([ + Buffer.from(final.protected || ''), + Buffer.from('.'), + Buffer.from(final.aad) + ]) + } else { + aad = Buffer.from(final.protected || '') + } + + let cleartext = this._cleartext + if (this._protected && 'zip' in this._protected) { + cleartext = deflateRawSync(cleartext) + } + + const { ciphertext, tag } = encrypt(enc, this._cek, cleartext, { iv, aad }) + final.tag = base64url.encodeBuffer(tag) + final.ciphertext = base64url.encodeBuffer(ciphertext) + + return serializer(final, this._recipients) + } +} + +module.exports = Encrypt + + +/***/ }), + +/***/ 74824: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { randomBytes } = __nccwpck_require__(6113) + +const { createSecretKey } = __nccwpck_require__(82286) +const { KEYLENGTHS } = __nccwpck_require__(32075) +const Key = __nccwpck_require__(36655) + +module.exports = (alg) => { + const keyLength = KEYLENGTHS.get(alg) + + if (!keyLength) { + return new Key({ type: 'secret' }) + } + + return new Key(createSecretKey(randomBytes(keyLength / 8)), { use: 'enc', alg }) +} + + +/***/ }), + +/***/ 98410: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Encrypt = __nccwpck_require__(2267) +const decrypt = __nccwpck_require__(87171) + +const single = (serialization, cleartext, key, protectedHeader, aad, unprotectedHeader) => { + return new Encrypt(cleartext, protectedHeader, aad, unprotectedHeader) + .recipient(key) + .encrypt(serialization) +} + +module.exports.Encrypt = Encrypt +module.exports.encrypt = single.bind(undefined, 'compact') +module.exports.encrypt.flattened = single.bind(undefined, 'flattened') +module.exports.encrypt.general = single.bind(undefined, 'general') + +module.exports.decrypt = decrypt + + +/***/ }), + +/***/ 51120: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const isObject = __nccwpck_require__(80281) +let validateCrit = __nccwpck_require__(29943) + +const { JWEInvalid } = __nccwpck_require__(94269) + +validateCrit = validateCrit.bind(undefined, JWEInvalid) + +const compactSerializer = (final, [recipient]) => { + return `${final.protected}.${recipient.encrypted_key}.${final.iv}.${final.ciphertext}.${final.tag}` +} +compactSerializer.validate = (protectedHeader, unprotectedHeader, aad, { 0: { header }, length }) => { + if (length !== 1 || aad || unprotectedHeader || header) { + throw new JWEInvalid('JWE Compact Serialization doesn\'t support multiple recipients, JWE unprotected headers or AAD') + } + validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined) +} + +const flattenedSerializer = (final, [recipient]) => { + const { header, encrypted_key: encryptedKey } = recipient + + return { + ...(final.protected ? { protected: final.protected } : undefined), + ...(final.unprotected ? { unprotected: final.unprotected } : undefined), + ...(header ? { header } : undefined), + ...(encryptedKey ? { encrypted_key: encryptedKey } : undefined), + ...(final.aad ? { aad: final.aad } : undefined), + iv: final.iv, + ciphertext: final.ciphertext, + tag: final.tag + } +} +flattenedSerializer.validate = (protectedHeader, unprotectedHeader, aad, { 0: { header }, length }) => { + if (length !== 1) { + throw new JWEInvalid('Flattened JWE JSON Serialization doesn\'t support multiple recipients') + } + validateCrit(protectedHeader, { ...unprotectedHeader, ...header }, protectedHeader ? protectedHeader.crit : undefined) +} + +const generalSerializer = (final, recipients) => { + const result = { + ...(final.protected ? { protected: final.protected } : undefined), + ...(final.unprotected ? { unprotected: final.unprotected } : undefined), + recipients: recipients.map(({ header, encrypted_key: encryptedKey, generatedHeader }) => { + if (!header && !encryptedKey && !generatedHeader) { + return false + } + + return { + ...(header || generatedHeader ? { header: { ...header, ...generatedHeader } } : undefined), + ...(encryptedKey ? { encrypted_key: encryptedKey } : undefined) + } + }).filter(Boolean), + ...(final.aad ? { aad: final.aad } : undefined), + iv: final.iv, + ciphertext: final.ciphertext, + tag: final.tag + } + + if (!result.recipients.length) { + delete result.recipients + } + + return result +} +generalSerializer.validate = (protectedHeader, unprotectedHeader, aad, recipients) => { + recipients.forEach(({ header }) => { + validateCrit(protectedHeader, { ...header, ...unprotectedHeader }, protectedHeader ? protectedHeader.crit : undefined) + }) +} + +const isJSON = (input) => { + return isObject(input) && + typeof input.ciphertext === 'string' && + typeof input.iv === 'string' && + typeof input.tag === 'string' && + (input.unprotected === undefined || isObject(input.unprotected)) && + (input.protected === undefined || typeof input.protected === 'string') && + (input.aad === undefined || typeof input.aad === 'string') +} + +const isSingleRecipient = (input) => { + return (input.encrypted_key === undefined || typeof input.encrypted_key === 'string') && + (input.header === undefined || isObject(input.header)) +} + +const isValidRecipient = (recipient) => { + return isObject(recipient) && typeof recipient.encrypted_key === 'string' && (recipient.header === undefined || isObject(recipient.header)) +} + +const isMultiRecipient = (input) => { + if (Array.isArray(input.recipients) && input.recipients.every(isValidRecipient)) { + return true + } + + return false +} + +const detect = (input) => { + if (typeof input === 'string' && input.split('.').length === 5) { + return 'compact' + } + + if (isJSON(input)) { + if (isMultiRecipient(input)) { + return 'general' + } + + if (isSingleRecipient(input)) { + return 'flattened' + } + } + + throw new JWEInvalid('JWE malformed or invalid serialization') +} + +module.exports = { + compact: compactSerializer, + flattened: flattenedSerializer, + general: generalSerializer, + detect +} + + +/***/ }), + +/***/ 95209: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const isDisjoint = __nccwpck_require__(17968) +const base64url = __nccwpck_require__(90112) +let validateCrit = __nccwpck_require__(29943) +const { JWEInvalid, JOSENotSupported } = __nccwpck_require__(94269) + +validateCrit = validateCrit.bind(undefined, JWEInvalid) + +module.exports = (prot, unprotected, recipients, checkAlgorithms, crit) => { + if (typeof prot === 'string') { + try { + prot = base64url.JSON.decode(prot) + } catch (err) { + throw new JWEInvalid('could not parse JWE protected header') + } + } + + let alg = [] + const enc = new Set() + if (!isDisjoint(prot, unprotected) || !recipients.every(({ header }) => { + if (typeof header === 'object') { + alg.push(header.alg) + enc.add(header.enc) + } + const combined = { ...unprotected, ...header } + validateCrit(prot, combined, crit) + if ('zip' in combined) { + throw new JWEInvalid('"zip" Header Parameter MUST be integrity protected') + } else if (prot && 'zip' in prot && prot.zip !== 'DEF') { + throw new JOSENotSupported('only "DEF" compression algorithm is supported') + } + return isDisjoint(header, prot) && isDisjoint(header, unprotected) + })) { + throw new JWEInvalid('JWE Shared Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint') + } + + if (typeof prot === 'object') { + alg.push(prot.alg) + enc.add(prot.enc) + } + if (typeof unprotected === 'object') { + alg.push(unprotected.alg) + enc.add(unprotected.enc) + } + + alg = alg.filter(Boolean) + enc.delete(undefined) + + if (recipients.length !== 1) { + if (alg.includes('dir') || alg.includes('ECDH-ES')) { + throw new JWEInvalid('dir and ECDH-ES alg may only be used with a single recipient') + } + } + + if (checkAlgorithms) { + if (alg.length !== recipients.length) { + throw new JWEInvalid('missing Key Management algorithm') + } + if (enc.size === 0) { + throw new JWEInvalid('missing Content Encryption algorithm') + } else if (enc.size !== 1) { + throw new JWEInvalid('there must only be one Content Encryption algorithm') + } + } else { + if (enc.size > 1) { + throw new JWEInvalid('there must only be one Content Encryption algorithm') + } + } + + return [...enc][0] +} + + +/***/ }), + +/***/ 28510: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const errors = __nccwpck_require__(94269) + +const importKey = __nccwpck_require__(96317) + +const RSAKey = __nccwpck_require__(47088) +const ECKey = __nccwpck_require__(75950) +const OKPKey = __nccwpck_require__(85824) +const OctKey = __nccwpck_require__(36655) + +const generate = async (kty, crvOrSize, params, generatePrivate = true) => { + switch (kty) { + case 'RSA': + return importKey( + await RSAKey.generate(crvOrSize, generatePrivate), + params + ) + case 'EC': + return importKey( + await ECKey.generate(crvOrSize, generatePrivate), + params + ) + case 'OKP': + return importKey( + await OKPKey.generate(crvOrSize, generatePrivate), + params + ) + case 'oct': + return importKey( + await OctKey.generate(crvOrSize, generatePrivate), + params + ) + default: + throw new errors.JOSENotSupported(`unsupported key type: ${kty}`) + } +} + +const generateSync = (kty, crvOrSize, params, generatePrivate = true) => { + switch (kty) { + case 'RSA': + return importKey(RSAKey.generateSync(crvOrSize, generatePrivate), params) + case 'EC': + return importKey(ECKey.generateSync(crvOrSize, generatePrivate), params) + case 'OKP': + return importKey(OKPKey.generateSync(crvOrSize, generatePrivate), params) + case 'oct': + return importKey(OctKey.generateSync(crvOrSize, generatePrivate), params) + default: + throw new errors.JOSENotSupported(`unsupported key type: ${kty}`) + } +} + +module.exports.generate = generate +module.exports.generateSync = generateSync + + +/***/ }), + +/***/ 96317: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { createPublicKey, createPrivateKey, createSecretKey, KeyObject } = __nccwpck_require__(82286) +const base64url = __nccwpck_require__(90112) +const isObject = __nccwpck_require__(80281) +const { jwkToPem } = __nccwpck_require__(74576) +const errors = __nccwpck_require__(94269) + +const RSAKey = __nccwpck_require__(47088) +const ECKey = __nccwpck_require__(75950) +const OKPKey = __nccwpck_require__(85824) +const OctKey = __nccwpck_require__(36655) + +const importable = new Set(['string', 'buffer', 'object']) + +const mergedParameters = (target = {}, source = {}) => { + return { + alg: source.alg, + key_ops: source.key_ops, + kid: source.kid, + use: source.use, + x5c: source.x5c, + x5t: source.x5t, + 'x5t#S256': source['x5t#S256'], + ...target + } +} + +const openSSHpublicKey = /^[a-zA-Z0-9-]+ AAAA(?:[0-9A-Za-z+/])+(?:==|=)?(?: .*)?$/ + +const asKey = (key, parameters, { calculateMissingRSAPrimes = false } = {}) => { + let privateKey, publicKey, secret + + if (!importable.has(typeof key)) { + throw new TypeError('key argument must be a string, buffer or an object') + } + + if (parameters !== undefined && !isObject(parameters)) { + throw new TypeError('parameters argument must be a plain object when provided') + } + + if (key instanceof KeyObject) { + switch (key.type) { + case 'private': + privateKey = key + break + case 'public': + publicKey = key + break + case 'secret': + secret = key + break + } + } else if (typeof key === 'object' && key && 'kty' in key && key.kty === 'oct') { // symmetric key + try { + secret = createSecretKey(base64url.decodeToBuffer(key.k)) + } catch (err) { + if (!('k' in key)) { + secret = { type: 'secret' } + } + } + parameters = mergedParameters(parameters, key) + } else if (typeof key === 'object' && key && 'kty' in key) { // assume JWK formatted asymmetric key + ({ calculateMissingRSAPrimes = false } = parameters || { calculateMissingRSAPrimes }) + let pem + + try { + pem = jwkToPem(key, { calculateMissingRSAPrimes }) + } catch (err) { + if (err instanceof errors.JOSEError) { + throw err + } + } + + if (pem && key.d) { + privateKey = createPrivateKey(pem) + } else if (pem) { + publicKey = createPublicKey(pem) + } + + parameters = mergedParameters({}, key) + } else if (key && (typeof key === 'object' || typeof key === 'string')) { // | | passed to crypto.createPrivateKey or crypto.createPublicKey or passed to crypto.createSecretKey + try { + privateKey = createPrivateKey(key) + } catch (err) { + if (err instanceof errors.JOSEError) { + throw err + } + } + + try { + publicKey = createPublicKey(key) + if (key.startsWith('-----BEGIN CERTIFICATE-----') && (!parameters || !('x5c' in parameters))) { + parameters = mergedParameters(parameters, { + x5c: [key.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g, '')] + }) + } + } catch (err) { + if (err instanceof errors.JOSEError) { + throw err + } + } + + try { + // this is to filter out invalid PEM keys and certs, i'll rather have them fail import then + // have them imported as symmetric "oct" keys + if (!key.includes('-----BEGIN') && !openSSHpublicKey.test(key.toString('ascii').replace(/[\r\n]/g, ''))) { + secret = createSecretKey(Buffer.isBuffer(key) ? key : Buffer.from(key)) + } + } catch (err) {} + } + + const keyObject = privateKey || publicKey || secret + + if (privateKey || publicKey) { + switch (keyObject.asymmetricKeyType) { + case 'rsa': + return new RSAKey(keyObject, parameters) + case 'ec': + return new ECKey(keyObject, parameters) + case 'ed25519': + case 'ed448': + case 'x25519': + case 'x448': + return new OKPKey(keyObject, parameters) + default: + throw new errors.JOSENotSupported('only RSA, EC and OKP asymmetric keys are supported') + } + } else if (secret) { + return new OctKey(keyObject, parameters) + } + + throw new errors.JWKImportFailed('key import failed') +} + +module.exports = asKey + + +/***/ }), + +/***/ 43421: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Key = __nccwpck_require__(88901) +const None = __nccwpck_require__(31981) +const EmbeddedJWK = __nccwpck_require__(82254) +const EmbeddedX5C = __nccwpck_require__(5239) +const importKey = __nccwpck_require__(96317) +const generate = __nccwpck_require__(28510) + +module.exports = { + ...generate, + asKey: importKey, + isKey: input => input instanceof Key, + None, + EmbeddedJWK, + EmbeddedX5C +} + + +/***/ }), + +/***/ 88901: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { strict: assert } = __nccwpck_require__(39491) +const { inspect } = __nccwpck_require__(73837) +const { EOL } = __nccwpck_require__(22037) + +const { keyObjectSupported } = __nccwpck_require__(16054) +const { createPublicKey } = __nccwpck_require__(82286) +const { keyObjectToJWK } = __nccwpck_require__(74576) +const { + THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, JWK_MEMBERS, KEYOBJECT, + USES_MAPPING, OPS, USES +} = __nccwpck_require__(12152) +const isObject = __nccwpck_require__(80281) +const thumbprint = __nccwpck_require__(74114) +const errors = __nccwpck_require__(94269) + +const privateApi = Symbol('privateApi') +const { JWK } = __nccwpck_require__(32075) + +class Key { + constructor (keyObject, { alg, use, kid, key_ops: ops, x5c, x5t, 'x5t#S256': x5t256 } = {}) { + if (use !== undefined) { + if (typeof use !== 'string' || !USES.has(use)) { + throw new TypeError('`use` must be either "sig" or "enc" string when provided') + } + } + + if (alg !== undefined) { + if (typeof alg !== 'string' || !alg) { + throw new TypeError('`alg` must be a non-empty string when provided') + } + } + + if (kid !== undefined) { + if (typeof kid !== 'string' || !kid) { + throw new TypeError('`kid` must be a non-empty string when provided') + } + } + + if (ops !== undefined) { + if (!Array.isArray(ops) || !ops.length || ops.some(o => typeof o !== 'string')) { + throw new TypeError('`key_ops` must be a non-empty array of strings when provided') + } + ops = Array.from(new Set(ops)).filter(x => OPS.has(x)) + } + + if (ops && use) { + if ( + (use === 'enc' && ops.some(x => USES_MAPPING.sig.has(x))) || + (use === 'sig' && ops.some(x => USES_MAPPING.enc.has(x))) + ) { + throw new errors.JWKInvalid('inconsistent JWK "use" and "key_ops"') + } + } + + if (keyObjectSupported && x5c !== undefined) { + if (!Array.isArray(x5c) || !x5c.length || x5c.some(c => typeof c !== 'string')) { + throw new TypeError('`x5c` must be an array of one or more PKIX certificates when provided') + } + + x5c.forEach((cert, i) => { + let publicKey + try { + publicKey = createPublicKey({ + key: `-----BEGIN CERTIFICATE-----${EOL}${(cert.match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END CERTIFICATE-----`, format: 'pem' + }) + } catch (err) { + throw new errors.JWKInvalid(`\`x5c\` member at index ${i} is not a valid base64-encoded DER PKIX certificate`) + } + if (i === 0) { + try { + assert.deepEqual( + publicKey.export({ type: 'spki', format: 'der' }), + (keyObject.type === 'public' ? keyObject : createPublicKey(keyObject)).export({ type: 'spki', format: 'der' }) + ) + } catch (err) { + throw new errors.JWKInvalid('The key in the first `x5c` certificate MUST match the public key represented by the JWK') + } + } + }) + } + + Object.defineProperties(this, { + [KEYOBJECT]: { value: isObject(keyObject) ? undefined : keyObject }, + keyObject: { + get () { + if (!keyObjectSupported) { + throw new errors.JOSENotSupported('KeyObject class is not supported in your Node.js runtime version') + } + + return this[KEYOBJECT] + } + }, + type: { value: keyObject.type }, + private: { value: keyObject.type === 'private' }, + public: { value: keyObject.type === 'public' }, + secret: { value: keyObject.type === 'secret' }, + alg: { value: alg, enumerable: alg !== undefined }, + use: { value: use, enumerable: use !== undefined }, + x5c: { + enumerable: x5c !== undefined, + ...(x5c ? { get () { return [...x5c] } } : { value: undefined }) + }, + key_ops: { + enumerable: ops !== undefined, + ...(ops ? { get () { return [...ops] } } : { value: undefined }) + }, + kid: { + enumerable: true, + ...(kid + ? { value: kid } + : { + get () { + Object.defineProperty(this, 'kid', { value: this.thumbprint, configurable: false }) + return this.kid + }, + configurable: true + }) + }, + ...(x5c + ? { + x5t: { + enumerable: true, + ...(x5t + ? { value: x5t } + : { + get () { + Object.defineProperty(this, 'x5t', { value: thumbprint.x5t(this.x5c[0]), configurable: false }) + return this.x5t + }, + configurable: true + }) + } + } + : undefined), + ...(x5c + ? { + 'x5t#S256': { + enumerable: true, + ...(x5t256 + ? { value: x5t256 } + : { + get () { + Object.defineProperty(this, 'x5t#S256', { value: thumbprint['x5t#S256'](this.x5c[0]), configurable: false }) + return this['x5t#S256'] + }, + configurable: true + }) + } + } + : undefined), + thumbprint: { + get () { + Object.defineProperty(this, 'thumbprint', { value: thumbprint.kid(this[THUMBPRINT_MATERIAL]()), configurable: false }) + return this.thumbprint + }, + configurable: true + } + }) + } + + toPEM (priv = false, encoding = {}) { + if (this.secret) { + throw new TypeError('symmetric keys cannot be exported as PEM') + } + + if (priv && this.public === true) { + throw new TypeError('public key cannot be exported as private') + } + + const { type = priv ? 'pkcs8' : 'spki', cipher, passphrase } = encoding + + let keyObject = this[KEYOBJECT] + + if (!priv) { + if (this.private) { + keyObject = createPublicKey(keyObject) + } + if (cipher || passphrase) { + throw new TypeError('cipher and passphrase can only be applied when exporting private keys') + } + } + + if (priv) { + return keyObject.export({ format: 'pem', type, cipher, passphrase }) + } + + return keyObject.export({ format: 'pem', type }) + } + + toJWK (priv = false) { + if (priv && this.public === true) { + throw new TypeError('public key cannot be exported as private') + } + + const components = [...this.constructor[priv ? PRIVATE_MEMBERS : PUBLIC_MEMBERS]] + .map(k => [k, this[k]]) + + const result = {} + + Object.keys(components).forEach((key) => { + const [k, v] = components[key] + + result[k] = v + }) + + result.kty = this.kty + result.kid = this.kid + + if (this.alg) { + result.alg = this.alg + } + + if (this.key_ops && this.key_ops.length) { + result.key_ops = this.key_ops + } + + if (this.use) { + result.use = this.use + } + + if (this.x5c) { + result.x5c = this.x5c + } + + if (this.x5t) { + result.x5t = this.x5t + } + + if (this['x5t#S256']) { + result['x5t#S256'] = this['x5t#S256'] + } + + return result + } + + [JWK_MEMBERS] () { + const props = this[KEYOBJECT].type === 'private' ? this.constructor[PRIVATE_MEMBERS] : this.constructor[PUBLIC_MEMBERS] + Object.defineProperties(this, [...props].reduce((acc, component) => { + acc[component] = { + get () { + const jwk = keyObjectToJWK(this[KEYOBJECT]) + Object.defineProperties( + this, + Object.entries(jwk) + .filter(([key]) => props.has(key)) + .reduce((acc, [key, value]) => { + acc[key] = { value, enumerable: this.constructor[PUBLIC_MEMBERS].has(key), configurable: false } + return acc + }, {}) + ) + + return this[component] + }, + enumerable: this.constructor[PUBLIC_MEMBERS].has(component), + configurable: true + } + return acc + }, {})) + } + + /* c8 ignore next 8 */ + [inspect.custom] () { + return `${this.constructor.name} ${inspect(this.toJWK(false), { + depth: Infinity, + colors: process.stdout.isTTY, + compact: false, + sorted: true + })}` + } + + /* c8 ignore next 3 */ + [THUMBPRINT_MATERIAL] () { + throw new Error(`"[THUMBPRINT_MATERIAL]()" is not implemented on ${this.constructor.name}`) + } + + algorithms (operation, /* the rest is private API */ int, opts) { + const { use = this.use, alg = this.alg, key_ops: ops = this.key_ops } = int === privateApi ? opts : {} + if (alg) { + return new Set(this.algorithms(operation, privateApi, { alg: null, use, key_ops: ops }).has(alg) ? [alg] : undefined) + } + + if (typeof operation === 'symbol') { + try { + return this[operation]() + } catch (err) { + return new Set() + } + } + + if (operation && ops && !ops.includes(operation)) { + return new Set() + } + + switch (operation) { + case 'decrypt': + case 'deriveKey': + case 'encrypt': + case 'sign': + case 'unwrapKey': + case 'verify': + case 'wrapKey': + return new Set(Object.entries(JWK[this.kty][operation]).map(([alg, fn]) => fn(this) ? alg : undefined).filter(Boolean)) + case undefined: + return new Set([ + ...this.algorithms('sign'), + ...this.algorithms('verify'), + ...this.algorithms('decrypt'), + ...this.algorithms('encrypt'), + ...this.algorithms('unwrapKey'), + ...this.algorithms('wrapKey'), + ...this.algorithms('deriveKey') + ]) + default: + throw new TypeError('invalid key operation') + } + } + + /* c8 ignore next 3 */ + static async generate () { + throw new Error(`"static async generate()" is not implemented on ${this.name}`) + } + + /* c8 ignore next 3 */ + static generateSync () { + throw new Error(`"static generateSync()" is not implemented on ${this.name}`) + } + + /* c8 ignore next 3 */ + static get [PUBLIC_MEMBERS] () { + throw new Error(`"static get [PUBLIC_MEMBERS]()" is not implemented on ${this.name}`) + } + + /* c8 ignore next 3 */ + static get [PRIVATE_MEMBERS] () { + throw new Error(`"static get [PRIVATE_MEMBERS]()" is not implemented on ${this.name}`) + } +} + +module.exports = Key + + +/***/ }), + +/***/ 75950: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { generateKeyPairSync, generateKeyPair: async } = __nccwpck_require__(6113) +const { promisify } = __nccwpck_require__(73837) + +const { + THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, + PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT +} = __nccwpck_require__(12152) +const { EC_CURVES } = __nccwpck_require__(32075) +const { keyObjectSupported } = __nccwpck_require__(16054) +const { createPublicKey, createPrivateKey } = __nccwpck_require__(82286) + +const errors = __nccwpck_require__(94269) + +const Key = __nccwpck_require__(88901) + +const generateKeyPair = promisify(async) + +const EC_PUBLIC = new Set(['crv', 'x', 'y']) +Object.freeze(EC_PUBLIC) +const EC_PRIVATE = new Set([...EC_PUBLIC, 'd']) +Object.freeze(EC_PRIVATE) + +// Elliptic Curve Key Type +class ECKey extends Key { + constructor (...args) { + super(...args) + this[JWK_MEMBERS]() + Object.defineProperty(this, 'kty', { value: 'EC', enumerable: true }) + if (!EC_CURVES.has(this.crv)) { + throw new errors.JOSENotSupported('unsupported EC key curve') + } + } + + static get [PUBLIC_MEMBERS] () { + return EC_PUBLIC + } + + static get [PRIVATE_MEMBERS] () { + return EC_PRIVATE + } + + // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special + // JSON.stringify handling in V8 + [THUMBPRINT_MATERIAL] () { + return { crv: this.crv, kty: 'EC', x: this.x, y: this.y } + } + + [KEY_MANAGEMENT_ENCRYPT] () { + return this.algorithms('deriveKey') + } + + [KEY_MANAGEMENT_DECRYPT] () { + if (this.public) { + return new Set() + } + return this.algorithms('deriveKey') + } + + static async generate (crv = 'P-256', privat = true) { + if (!EC_CURVES.has(crv)) { + throw new errors.JOSENotSupported(`unsupported EC key curve: ${crv}`) + } + + let privateKey, publicKey + + if (keyObjectSupported) { + ({ privateKey, publicKey } = await generateKeyPair('ec', { namedCurve: crv })) + return privat ? privateKey : publicKey + } + + ({ privateKey, publicKey } = await generateKeyPair('ec', { + namedCurve: crv, + publicKeyEncoding: { type: 'spki', format: 'pem' }, + privateKeyEncoding: { type: 'pkcs8', format: 'pem' } + })) + + if (privat) { + return createPrivateKey(privateKey) + } else { + return createPublicKey(publicKey) + } + } + + static generateSync (crv = 'P-256', privat = true) { + if (!EC_CURVES.has(crv)) { + throw new errors.JOSENotSupported(`unsupported EC key curve: ${crv}`) + } + + let privateKey, publicKey + + if (keyObjectSupported) { + ({ privateKey, publicKey } = generateKeyPairSync('ec', { namedCurve: crv })) + return privat ? privateKey : publicKey + } + + ({ privateKey, publicKey } = generateKeyPairSync('ec', { + namedCurve: crv, + publicKeyEncoding: { type: 'spki', format: 'pem' }, + privateKeyEncoding: { type: 'pkcs8', format: 'pem' } + })) + + if (privat) { + return createPrivateKey(privateKey) + } else { + return createPublicKey(publicKey) + } + } +} + +module.exports = ECKey + + +/***/ }), + +/***/ 82254: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { inspect } = __nccwpck_require__(73837) + +const Key = __nccwpck_require__(88901) + +class EmbeddedJWK extends Key { + constructor () { + super({ type: 'embedded' }) + Object.defineProperties(this, { + kid: { value: undefined }, + kty: { value: undefined }, + thumbprint: { value: undefined }, + toJWK: { value: undefined }, + toPEM: { value: undefined } + }) + } + + /* c8 ignore next 3 */ + [inspect.custom] () { + return 'Embedded.JWK {}' + } + + algorithms () { + return new Set() + } +} + +module.exports = new EmbeddedJWK() + + +/***/ }), + +/***/ 5239: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { inspect } = __nccwpck_require__(73837) + +const Key = __nccwpck_require__(88901) + +class EmbeddedX5C extends Key { + constructor () { + super({ type: 'embedded' }) + Object.defineProperties(this, { + kid: { value: undefined }, + kty: { value: undefined }, + thumbprint: { value: undefined }, + toJWK: { value: undefined }, + toPEM: { value: undefined } + }) + } + + /* c8 ignore next 3 */ + [inspect.custom] () { + return 'Embedded.X5C {}' + } + + algorithms () { + return new Set() + } +} + +module.exports = new EmbeddedX5C() + + +/***/ }), + +/***/ 31981: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { inspect } = __nccwpck_require__(73837) + +const Key = __nccwpck_require__(88901) + +class NoneKey extends Key { + constructor () { + super({ type: 'unsecured' }, { alg: 'none' }) + Object.defineProperties(this, { + kid: { value: undefined }, + kty: { value: undefined }, + thumbprint: { value: undefined }, + toJWK: { value: undefined }, + toPEM: { value: undefined } + }) + } + + /* c8 ignore next 3 */ + [inspect.custom] () { + return 'None {}' + } + + algorithms (operation) { + switch (operation) { + case 'sign': + case 'verify': + case undefined: + return new Set(['none']) + default: + return new Set() + } + } +} + +module.exports = new NoneKey() + + +/***/ }), + +/***/ 36655: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { randomBytes } = __nccwpck_require__(6113) + +const { createSecretKey } = __nccwpck_require__(82286) +const base64url = __nccwpck_require__(90112) +const { + THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, + KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT, KEYOBJECT +} = __nccwpck_require__(12152) + +const Key = __nccwpck_require__(88901) + +const OCT_PUBLIC = new Set() +Object.freeze(OCT_PUBLIC) +const OCT_PRIVATE = new Set(['k']) +Object.freeze(OCT_PRIVATE) + +// Octet sequence Key Type +class OctKey extends Key { + constructor (...args) { + super(...args) + Object.defineProperties(this, { + kty: { + value: 'oct', + enumerable: true + }, + length: { + value: this[KEYOBJECT] ? this[KEYOBJECT].symmetricKeySize * 8 : undefined + }, + k: { + enumerable: false, + get () { + if (this[KEYOBJECT]) { + Object.defineProperty(this, 'k', { + value: base64url.encodeBuffer(this[KEYOBJECT].export()), + configurable: false + }) + } else { + Object.defineProperty(this, 'k', { + value: undefined, + configurable: false + }) + } + + return this.k + }, + configurable: true + } + }) + } + + static get [PUBLIC_MEMBERS] () { + return OCT_PUBLIC + } + + static get [PRIVATE_MEMBERS] () { + return OCT_PRIVATE + } + + // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special + // JSON.stringify handling in V8 + [THUMBPRINT_MATERIAL] () { + if (!this[KEYOBJECT]) { + throw new TypeError('reference "oct" keys without "k" cannot have their thumbprint calculated') + } + return { k: this.k, kty: 'oct' } + } + + [KEY_MANAGEMENT_ENCRYPT] () { + return new Set([ + ...this.algorithms('wrapKey'), + ...this.algorithms('deriveKey') + ]) + } + + [KEY_MANAGEMENT_DECRYPT] () { + return this[KEY_MANAGEMENT_ENCRYPT]() + } + + algorithms (...args) { + if (!this[KEYOBJECT]) { + return new Set() + } + + return Key.prototype.algorithms.call(this, ...args) + } + + static async generate (...args) { + return this.generateSync(...args) + } + + static generateSync (len = 256, privat = true) { + if (!privat) { + throw new TypeError('"oct" keys cannot be generated as public') + } + if (!Number.isSafeInteger(len) || !len || len % 8 !== 0) { + throw new TypeError('invalid bit length') + } + + return createSecretKey(randomBytes(len / 8)) + } +} + +module.exports = OctKey + + +/***/ }), + +/***/ 85824: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { generateKeyPairSync, generateKeyPair: async } = __nccwpck_require__(6113) +const { promisify } = __nccwpck_require__(73837) + +const { + THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, + PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT +} = __nccwpck_require__(12152) +const { OKP_CURVES } = __nccwpck_require__(32075) +const { edDSASupported } = __nccwpck_require__(16054) +const errors = __nccwpck_require__(94269) + +const Key = __nccwpck_require__(88901) + +const generateKeyPair = promisify(async) + +const OKP_PUBLIC = new Set(['crv', 'x']) +Object.freeze(OKP_PUBLIC) +const OKP_PRIVATE = new Set([...OKP_PUBLIC, 'd']) +Object.freeze(OKP_PRIVATE) + +// Octet string key pairs Key Type +class OKPKey extends Key { + constructor (...args) { + super(...args) + this[JWK_MEMBERS]() + Object.defineProperty(this, 'kty', { value: 'OKP', enumerable: true }) + if (!OKP_CURVES.has(this.crv)) { + throw new errors.JOSENotSupported('unsupported OKP key curve') + } + } + + static get [PUBLIC_MEMBERS] () { + return OKP_PUBLIC + } + + static get [PRIVATE_MEMBERS] () { + return OKP_PRIVATE + } + + // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special + // JSON.stringify handling in V8 + [THUMBPRINT_MATERIAL] () { + return { crv: this.crv, kty: 'OKP', x: this.x } + } + + [KEY_MANAGEMENT_ENCRYPT] () { + return this.algorithms('deriveKey') + } + + [KEY_MANAGEMENT_DECRYPT] () { + if (this.public) { + return new Set() + } + return this.algorithms('deriveKey') + } + + static async generate (crv = 'Ed25519', privat = true) { + if (!edDSASupported) { + throw new errors.JOSENotSupported('OKP keys are not supported in your Node.js runtime version') + } + + if (!OKP_CURVES.has(crv)) { + throw new errors.JOSENotSupported(`unsupported OKP key curve: ${crv}`) + } + + const { privateKey, publicKey } = await generateKeyPair(crv.toLowerCase()) + + return privat ? privateKey : publicKey + } + + static generateSync (crv = 'Ed25519', privat = true) { + if (!edDSASupported) { + throw new errors.JOSENotSupported('OKP keys are not supported in your Node.js runtime version') + } + + if (!OKP_CURVES.has(crv)) { + throw new errors.JOSENotSupported(`unsupported OKP key curve: ${crv}`) + } + + const { privateKey, publicKey } = generateKeyPairSync(crv.toLowerCase()) + + return privat ? privateKey : publicKey + } +} + +module.exports = OKPKey + + +/***/ }), + +/***/ 47088: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { generateKeyPairSync, generateKeyPair: async } = __nccwpck_require__(6113) +const { promisify } = __nccwpck_require__(73837) + +const { + THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, + PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT +} = __nccwpck_require__(12152) +const { keyObjectSupported } = __nccwpck_require__(16054) +const { createPublicKey, createPrivateKey } = __nccwpck_require__(82286) + +const Key = __nccwpck_require__(88901) + +const generateKeyPair = promisify(async) + +const RSA_PUBLIC = new Set(['e', 'n']) +Object.freeze(RSA_PUBLIC) +const RSA_PRIVATE = new Set([...RSA_PUBLIC, 'd', 'p', 'q', 'dp', 'dq', 'qi']) +Object.freeze(RSA_PRIVATE) + +// RSA Key Type +class RSAKey extends Key { + constructor (...args) { + super(...args) + this[JWK_MEMBERS]() + Object.defineProperties(this, { + kty: { + value: 'RSA', + enumerable: true + }, + length: { + get () { + Object.defineProperty(this, 'length', { + value: Buffer.byteLength(this.n, 'base64') * 8, + configurable: false + }) + + return this.length + }, + configurable: true + } + }) + } + + static get [PUBLIC_MEMBERS] () { + return RSA_PUBLIC + } + + static get [PRIVATE_MEMBERS] () { + return RSA_PRIVATE + } + + // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special + // JSON.stringify handling in V8 + [THUMBPRINT_MATERIAL] () { + return { e: this.e, kty: 'RSA', n: this.n } + } + + [KEY_MANAGEMENT_ENCRYPT] () { + return this.algorithms('wrapKey') + } + + [KEY_MANAGEMENT_DECRYPT] () { + return this.algorithms('unwrapKey') + } + + static async generate (len = 2048, privat = true) { + if (!Number.isSafeInteger(len) || len < 512 || len % 8 !== 0 || (('electron' in process.versions) && len % 128 !== 0)) { + throw new TypeError('invalid bit length') + } + + let privateKey, publicKey + + if (keyObjectSupported) { + ({ privateKey, publicKey } = await generateKeyPair('rsa', { modulusLength: len })) + return privat ? privateKey : publicKey + } + + ({ privateKey, publicKey } = await generateKeyPair('rsa', { + modulusLength: len, + publicKeyEncoding: { type: 'spki', format: 'pem' }, + privateKeyEncoding: { type: 'pkcs8', format: 'pem' } + })) + + if (privat) { + return createPrivateKey(privateKey) + } else { + return createPublicKey(publicKey) + } + } + + static generateSync (len = 2048, privat = true) { + if (!Number.isSafeInteger(len) || len < 512 || len % 8 !== 0 || (('electron' in process.versions) && len % 128 !== 0)) { + throw new TypeError('invalid bit length') + } + + let privateKey, publicKey + + if (keyObjectSupported) { + ({ privateKey, publicKey } = generateKeyPairSync('rsa', { modulusLength: len })) + return privat ? privateKey : publicKey + } + + ({ privateKey, publicKey } = generateKeyPairSync('rsa', { + modulusLength: len, + publicKeyEncoding: { type: 'spki', format: 'pem' }, + privateKeyEncoding: { type: 'pkcs8', format: 'pem' } + })) + + if (privat) { + return createPrivateKey(privateKey) + } else { + return createPublicKey(publicKey) + } + } +} + +module.exports = RSAKey + + +/***/ }), + +/***/ 74114: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { createHash } = __nccwpck_require__(6113) + +const base64url = __nccwpck_require__(90112) + +const x5t = (hash, cert) => base64url.encodeBuffer(createHash(hash).update(Buffer.from(cert, 'base64')).digest()) + +module.exports.kid = components => base64url.encodeBuffer(createHash('sha256').update(JSON.stringify(components)).digest()) +module.exports.x5t = x5t.bind(undefined, 'sha1') +module.exports["x5t#S256"] = x5t.bind(undefined, 'sha256') + + +/***/ }), + +/***/ 21154: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const KeyStore = __nccwpck_require__(91754) + +module.exports = KeyStore + + +/***/ }), + +/***/ 91754: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { inspect } = __nccwpck_require__(73837) + +const isObject = __nccwpck_require__(80281) +const { generate, generateSync } = __nccwpck_require__(28510) +const { USES_MAPPING } = __nccwpck_require__(12152) +const { isKey, asKey: importKey } = __nccwpck_require__(43421) + +const keyscore = (key, { alg, use, ops }) => { + let score = 0 + + if (alg && key.alg) { + score++ + } + + if (use && key.use) { + score++ + } + + if (ops && key.key_ops) { + score++ + } + + return score +} + +class KeyStore { + constructor (...keys) { + while (keys.some(Array.isArray)) { + keys = keys.flat + ? keys.flat() + : keys.reduce((acc, val) => { + if (Array.isArray(val)) { + return [...acc, ...val] + } + + acc.push(val) + return acc + }, []) + } + if (keys.some(k => !isKey(k) || !k.kty)) { + throw new TypeError('all keys must be instances of a key instantiated by JWK.asKey') + } + + this._keys = new Set(keys) + } + + all ({ alg, kid, thumbprint, use, kty, key_ops: ops, x5t, 'x5t#S256': x5t256, crv } = {}) { + if (ops !== undefined && (!Array.isArray(ops) || !ops.length || ops.some(x => typeof x !== 'string'))) { + throw new TypeError('`key_ops` must be a non-empty array of strings') + } + + const search = { alg, use, ops } + return [...this._keys] + .filter((key) => { + let candidate = true + + if (candidate && kid !== undefined && key.kid !== kid) { + candidate = false + } + + if (candidate && thumbprint !== undefined && key.thumbprint !== thumbprint) { + candidate = false + } + + if (candidate && x5t !== undefined && key.x5t !== x5t) { + candidate = false + } + + if (candidate && x5t256 !== undefined && key['x5t#S256'] !== x5t256) { + candidate = false + } + + if (candidate && kty !== undefined && key.kty !== kty) { + candidate = false + } + + if (candidate && crv !== undefined && (key.crv !== crv)) { + candidate = false + } + + if (alg !== undefined && !key.algorithms().has(alg)) { + candidate = false + } + + if (candidate && use !== undefined && (key.use !== undefined && key.use !== use)) { + candidate = false + } + + // TODO: + if (candidate && ops !== undefined && (key.key_ops !== undefined || key.use !== undefined)) { + let keyOps + if (key.key_ops) { + keyOps = new Set(key.key_ops) + } else { + keyOps = USES_MAPPING[key.use] + } + if (ops.some(x => !keyOps.has(x))) { + candidate = false + } + } + + return candidate + }) + .sort((first, second) => keyscore(second, search) - keyscore(first, search)) + } + + get (...args) { + return this.all(...args)[0] + } + + add (key) { + if (!isKey(key) || !key.kty) { + throw new TypeError('key must be an instance of a key instantiated by JWK.asKey') + } + + this._keys.add(key) + } + + remove (key) { + if (!isKey(key)) { + throw new TypeError('key must be an instance of a key instantiated by JWK.asKey') + } + + this._keys.delete(key) + } + + toJWKS (priv = false) { + return { + keys: [...this._keys.values()].map( + key => key.toJWK(priv && (key.private || (key.secret && key.k))) + ) + } + } + + async generate (...args) { + this._keys.add(await generate(...args)) + } + + generateSync (...args) { + this._keys.add(generateSync(...args)) + } + + get size () { + return this._keys.size + } + + /* c8 ignore next 8 */ + [inspect.custom] () { + return `${this.constructor.name} ${inspect(this.toJWKS(false), { + depth: Infinity, + colors: process.stdout.isTTY, + compact: false, + sorted: true + })}` + } + + * [Symbol.iterator] () { + for (const key of this._keys) { + yield key + } + } +} + +function asKeyStore (jwks, { ignoreErrors = false, calculateMissingRSAPrimes = false } = {}) { + if (!isObject(jwks) || !Array.isArray(jwks.keys) || jwks.keys.some(k => !isObject(k) || !('kty' in k))) { + throw new TypeError('jwks must be a JSON Web Key Set formatted object') + } + + const keys = jwks.keys.map((jwk) => { + try { + return importKey(jwk, { calculateMissingRSAPrimes }) + } catch (err) { + if (!ignoreErrors) { + throw err + } + return undefined + } + }).filter(Boolean) + + return new KeyStore(...keys) +} + +module.exports = { KeyStore, asKeyStore } + + +/***/ }), + +/***/ 82390: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Sign = __nccwpck_require__(41577) +const { verify } = __nccwpck_require__(84264) + +const single = (serialization, payload, key, protectedHeader, unprotectedHeader) => { + return new Sign(payload) + .recipient(key, protectedHeader, unprotectedHeader) + .sign(serialization) +} + +module.exports.Sign = Sign +module.exports.sign = single.bind(undefined, 'compact') +module.exports.sign.flattened = single.bind(undefined, 'flattened') +module.exports.sign.general = single.bind(undefined, 'general') + +module.exports.verify = verify + + +/***/ }), + +/***/ 30777: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const isObject = __nccwpck_require__(80281) +let validateCrit = __nccwpck_require__(29943) +const { JWSInvalid } = __nccwpck_require__(94269) + +validateCrit = validateCrit.bind(undefined, JWSInvalid) + +const compactSerializer = (payload, [recipient]) => { + return `${recipient.protected}.${payload}.${recipient.signature}` +} +compactSerializer.validate = (jws, { 0: { unprotectedHeader, protectedHeader }, length }) => { + if (length !== 1 || unprotectedHeader) { + throw new JWSInvalid('JWS Compact Serialization doesn\'t support multiple recipients or JWS unprotected headers') + } + validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined) +} + +const flattenedSerializer = (payload, [recipient]) => { + const { header, signature, protected: prot } = recipient + + return { + payload, + ...prot ? { protected: prot } : undefined, + ...header ? { header } : undefined, + signature + } +} +flattenedSerializer.validate = (jws, { 0: { unprotectedHeader, protectedHeader }, length }) => { + if (length !== 1) { + throw new JWSInvalid('Flattened JWS JSON Serialization doesn\'t support multiple recipients') + } + validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined) +} + +const generalSerializer = (payload, recipients) => { + return { + payload, + signatures: recipients.map(({ header, signature, protected: prot }) => { + return { + ...prot ? { protected: prot } : undefined, + ...header ? { header } : undefined, + signature + } + }) + } +} +generalSerializer.validate = (jws, recipients) => { + let validateB64 = false + recipients.forEach(({ protectedHeader, unprotectedHeader }) => { + if (protectedHeader && !validateB64 && 'b64' in protectedHeader) { + validateB64 = true + } + validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined) + }) + + if (validateB64) { + const values = recipients.map(({ protectedHeader }) => protectedHeader && protectedHeader.b64) + if (!values.every((actual, i, [expected]) => actual === expected)) { + throw new JWSInvalid('the "b64" Header Parameter value MUST be the same for all recipients') + } + } +} + +const isJSON = (input) => { + return isObject(input) && (typeof input.payload === 'string' || Buffer.isBuffer(input.payload)) +} + +const isValidRecipient = (recipient) => { + return isObject(recipient) && typeof recipient.signature === 'string' && + (recipient.header === undefined || isObject(recipient.header)) && + (recipient.protected === undefined || typeof recipient.protected === 'string') +} + +const isMultiRecipient = (input) => { + if (Array.isArray(input.signatures) && input.signatures.every(isValidRecipient)) { + return true + } + + return false +} + +const detect = (input) => { + if (typeof input === 'string' && input.split('.').length === 3) { + return 'compact' + } + + if (isJSON(input)) { + if (isMultiRecipient(input)) { + return 'general' + } + + if (isValidRecipient(input)) { + return 'flattened' + } + } + + throw new JWSInvalid('JWS malformed or invalid serialization') +} + +module.exports = { + compact: compactSerializer, + flattened: flattenedSerializer, + general: generalSerializer, + detect +} + + +/***/ }), + +/***/ 41577: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const base64url = __nccwpck_require__(90112) +const isDisjoint = __nccwpck_require__(17968) +const isObject = __nccwpck_require__(80281) +const deepClone = __nccwpck_require__(28596) +const { JWSInvalid } = __nccwpck_require__(94269) +const { sign } = __nccwpck_require__(406) +const getKey = __nccwpck_require__(77217) + +const serializers = __nccwpck_require__(30777) + +const PROCESS_RECIPIENT = Symbol('PROCESS_RECIPIENT') + +class Sign { + constructor (payload) { + if (typeof payload === 'string') { + payload = base64url.encode(payload) + } else if (Buffer.isBuffer(payload)) { + payload = base64url.encodeBuffer(payload) + this._binary = true + } else if (isObject(payload)) { + payload = base64url.JSON.encode(payload) + } else { + throw new TypeError('payload argument must be a Buffer, string or an object') + } + + this._payload = payload + this._recipients = [] + } + + /* + * @public + */ + recipient (key, protectedHeader, unprotectedHeader) { + key = getKey(key) + + if (protectedHeader !== undefined && !isObject(protectedHeader)) { + throw new TypeError('protectedHeader argument must be a plain object when provided') + } + + if (unprotectedHeader !== undefined && !isObject(unprotectedHeader)) { + throw new TypeError('unprotectedHeader argument must be a plain object when provided') + } + + if (!isDisjoint(protectedHeader, unprotectedHeader)) { + throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint') + } + + this._recipients.push({ + key, + protectedHeader: protectedHeader ? deepClone(protectedHeader) : undefined, + unprotectedHeader: unprotectedHeader ? deepClone(unprotectedHeader) : undefined + }) + + return this + } + + /* + * @private + */ + [PROCESS_RECIPIENT] (recipient, first) { + const { key, protectedHeader, unprotectedHeader } = recipient + + if (key.use === 'enc') { + throw new TypeError('a key with "use":"enc" is not usable for signing') + } + + const joseHeader = { + protected: protectedHeader || {}, + unprotected: unprotectedHeader || {} + } + + let alg = joseHeader.protected.alg || joseHeader.unprotected.alg + + if (!alg) { + alg = key.alg || [...key.algorithms('sign')][0] + if (recipient.protectedHeader) { + joseHeader.protected.alg = recipient.protectedHeader.alg = alg + } else { + joseHeader.protected = recipient.protectedHeader = { alg } + } + } + + if (!alg) { + throw new JWSInvalid('could not resolve a usable "alg" for a recipient') + } + + recipient.header = unprotectedHeader + recipient.protected = Object.keys(joseHeader.protected).length ? base64url.JSON.encode(joseHeader.protected) : '' + + if (first && joseHeader.protected.crit && joseHeader.protected.crit.includes('b64') && joseHeader.protected.b64 === false) { + if (this._binary) { + this._payload = base64url.decodeToBuffer(this._payload) + } else { + this._payload = base64url.decode(this._payload) + } + } + + const data = Buffer.concat([ + Buffer.from(recipient.protected || ''), + Buffer.from('.'), + Buffer.from(this._payload) + ]) + + recipient.signature = base64url.encodeBuffer(sign(alg, key, data)) + } + + /* + * @public + */ + sign (serialization) { + const serializer = serializers[serialization] + if (!serializer) { + throw new TypeError('serialization must be one of "compact", "flattened", "general"') + } + + if (!this._recipients.length) { + throw new JWSInvalid('missing recipients') + } + + serializer.validate(this, this._recipients) + + this._recipients.forEach((recipient, i) => { + this[PROCESS_RECIPIENT](recipient, i === 0) + }) + + return serializer(this._payload, this._recipients) + } +} + +module.exports = Sign + + +/***/ }), + +/***/ 84264: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { EOL } = __nccwpck_require__(22037) + +const base64url = __nccwpck_require__(90112) +const isDisjoint = __nccwpck_require__(17968) +const isObject = __nccwpck_require__(80281) +let validateCrit = __nccwpck_require__(29943) +const getKey = __nccwpck_require__(77217) +const { KeyStore } = __nccwpck_require__(21154) +const errors = __nccwpck_require__(94269) +const { check, verify } = __nccwpck_require__(406) +const JWK = __nccwpck_require__(43421) + +const { detect: resolveSerialization } = __nccwpck_require__(30777) + +validateCrit = validateCrit.bind(undefined, errors.JWSInvalid) +const SINGLE_RECIPIENT = new Set(['compact', 'flattened', 'preparsed']) + +/* + * @public + */ +const jwsVerify = (skipDisjointCheck, serialization, jws, key, { crit = [], complete = false, algorithms } = {}) => { + key = getKey(key, true) + + if (algorithms !== undefined && (!Array.isArray(algorithms) || algorithms.some(s => typeof s !== 'string' || !s))) { + throw new TypeError('"algorithms" option must be an array of non-empty strings') + } else if (algorithms) { + algorithms = new Set(algorithms) + } + + if (!Array.isArray(crit) || crit.some(s => typeof s !== 'string' || !s)) { + throw new TypeError('"crit" option must be an array of non-empty strings') + } + + if (!serialization) { + serialization = resolveSerialization(jws) + } + + let prot // protected header + let header // unprotected header + let payload + let signature + let alg + + // treat general format with one recipient as flattened + // skips iteration and avoids multi errors in this case + if (serialization === 'general' && jws.signatures.length === 1) { + serialization = 'flattened' + const { signatures, ...root } = jws + jws = { ...root, ...signatures[0] } + } + + let decoded + + if (SINGLE_RECIPIENT.has(serialization)) { + let parsedProt = {} + + switch (serialization) { + case 'compact': // compact serialization format + ([prot, payload, signature] = jws.split('.')) + break + case 'flattened': // flattened serialization format + ({ protected: prot, payload, signature, header } = jws) + break + case 'preparsed': { // from the JWT module + ({ decoded } = jws); + ([prot, payload, signature] = jws.token.split('.')) + break + } + } + + if (!header) { + skipDisjointCheck = true + } + + if (decoded) { + parsedProt = decoded.header + } else if (prot) { + try { + parsedProt = base64url.JSON.decode(prot) + } catch (err) { + throw new errors.JWSInvalid('could not parse JWS protected header') + } + } else { + skipDisjointCheck = skipDisjointCheck || true + } + + if (!skipDisjointCheck && !isDisjoint(parsedProt, header)) { + throw new errors.JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint') + } + + const combinedHeader = { ...parsedProt, ...header } + validateCrit(parsedProt, header, crit) + + alg = parsedProt.alg || (header && header.alg) + if (!alg) { + throw new errors.JWSInvalid('missing JWS signature algorithm') + } else if (algorithms && !algorithms.has(alg)) { + throw new errors.JOSEAlgNotWhitelisted('alg not whitelisted') + } + + if (key instanceof KeyStore) { + const keystore = key + const keys = keystore.all({ kid: combinedHeader.kid, alg: combinedHeader.alg, key_ops: ['verify'] }) + switch (keys.length) { + case 0: + throw new errors.JWKSNoMatchingKey() + case 1: + // treat the call as if a Key instance was passed in + // skips iteration and avoids multi errors in this case + key = keys[0] + break + default: { + const errs = [] + for (const key of keys) { + try { + return jwsVerify(true, serialization, jws, key, { crit, complete, algorithms: algorithms ? [...algorithms] : undefined }) + } catch (err) { + errs.push(err) + continue + } + } + + const multi = new errors.JOSEMultiError(errs) + if ([...multi].some(e => e instanceof errors.JWSVerificationFailed)) { + throw new errors.JWSVerificationFailed() + } + throw multi + } + } + } + + if (key === JWK.EmbeddedJWK) { + if (!isObject(combinedHeader.jwk)) { + throw new errors.JWSInvalid('JWS Header Parameter "jwk" must be a JSON object') + } + key = JWK.asKey(combinedHeader.jwk) + if (key.type !== 'public') { + throw new errors.JWSInvalid('JWS Header Parameter "jwk" must be a public key') + } + } else if (key === JWK.EmbeddedX5C) { + if (!Array.isArray(combinedHeader.x5c) || !combinedHeader.x5c.length || combinedHeader.x5c.some(c => typeof c !== 'string' || !c)) { + throw new errors.JWSInvalid('JWS Header Parameter "x5c" must be a JSON array of certificate value strings') + } + key = JWK.asKey( + `-----BEGIN CERTIFICATE-----${EOL}${(combinedHeader.x5c[0].match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END CERTIFICATE-----`, + { x5c: combinedHeader.x5c } + ) + } + + check(key, 'verify', alg) + + const toBeVerified = Buffer.concat([ + Buffer.from(prot || ''), + Buffer.from('.'), + Buffer.isBuffer(payload) ? payload : Buffer.from(payload) + ]) + + if (!verify(alg, key, toBeVerified, base64url.decodeToBuffer(signature))) { + throw new errors.JWSVerificationFailed() + } + + if (combinedHeader.b64 === false) { + payload = Buffer.from(payload) + } else { + payload = base64url.decodeToBuffer(payload) + } + + if (complete) { + const result = { payload, key } + if (prot) result.protected = parsedProt + if (header) result.header = header + return result + } + + return payload + } + + // general serialization format + const { signatures, ...root } = jws + const errs = [] + for (const recipient of signatures) { + try { + return jwsVerify(false, 'flattened', { ...root, ...recipient }, key, { crit, complete, algorithms: algorithms ? [...algorithms] : undefined }) + } catch (err) { + errs.push(err) + continue + } + } + + const multi = new errors.JOSEMultiError(errs) + if ([...multi].some(e => e instanceof errors.JWSVerificationFailed)) { + throw new errors.JWSVerificationFailed() + } else if ([...multi].every(e => e instanceof errors.JWKSNoMatchingKey)) { + throw new errors.JWKSNoMatchingKey() + } + throw multi +} + +module.exports = { + bare: jwsVerify, + verify: jwsVerify.bind(undefined, false, undefined) +} + + +/***/ }), + +/***/ 67985: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const base64url = __nccwpck_require__(90112) +const errors = __nccwpck_require__(94269) + +module.exports = (token, { complete = false } = {}) => { + if (typeof token !== 'string' || !token) { + throw new TypeError('JWT must be a string') + } + + const { 0: header, 1: payload, 2: signature, length } = token.split('.') + + if (length === 5) { + throw new TypeError('encrypted JWTs cannot be decoded') + } + + if (length !== 3) { + throw new errors.JWTMalformed('JWTs must have three components') + } + + try { + const result = { + header: base64url.JSON.decode(header), + payload: base64url.JSON.decode(payload), + signature + } + + return complete ? result : result.payload + } catch (err) { + throw new errors.JWTMalformed('JWT is malformed') + } +} + + +/***/ }), + +/***/ 34158: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const decode = __nccwpck_require__(67985) +const sign = __nccwpck_require__(85237) +const verify = __nccwpck_require__(87167) +const profiles = __nccwpck_require__(49458) + +module.exports = { + sign, + verify, + ...profiles +} + +Object.defineProperty(module.exports, "decode", ({ + enumerable: false, + configurable: true, + value: decode +})) + + +/***/ }), + +/***/ 49458: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { JWTClaimInvalid } = __nccwpck_require__(94269) +const secs = __nccwpck_require__(93608) +const epoch = __nccwpck_require__(82066) +const isObject = __nccwpck_require__(80281) + +const verify = __nccwpck_require__(87167) +const { + isString, + isRequired, + isTimestamp, + isStringOrArrayOfStrings +} = __nccwpck_require__(60911) + +const isPayloadRequired = isRequired.bind(undefined, JWTClaimInvalid) +const isPayloadString = isString.bind(undefined, JWTClaimInvalid) +const isOptionString = isString.bind(undefined, TypeError) + +const defineLazyExportWithWarning = (obj, property, name, definition) => { + Object.defineProperty(obj, property, { + enumerable: true, + configurable: true, + value (...args) { + process.emitWarning( + `The ${name} API implements an IETF draft. Breaking draft implementations are included as minor versions of the jose library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.`, + 'DraftWarning' + ) + Object.defineProperty(obj, property, { + enumerable: true, + configurable: true, + value: definition + }) + return obj[property](...args) + } + }) +} + +const validateCommonOptions = (options, profile) => { + if (!isObject(options)) { + throw new TypeError('options must be an object') + } + + if (!options.issuer) { + throw new TypeError(`"issuer" option is required to validate ${profile}`) + } + + if (!options.audience) { + throw new TypeError(`"audience" option is required to validate ${profile}`) + } +} + +module.exports = { + IdToken: { + verify: (token, key, options = {}) => { + validateCommonOptions(options, 'an ID Token') + + if ('maxAuthAge' in options) { + isOptionString(options.maxAuthAge, 'options.maxAuthAge') + } + if ('nonce' in options) { + isOptionString(options.nonce, 'options.nonce') + } + + const unix = epoch(options.now || new Date()) + const result = verify(token, key, { ...options }) + const payload = options.complete ? result.payload : result + + if (Array.isArray(payload.aud) && payload.aud.length > 1) { + isPayloadRequired(payload.azp, '"azp" claim', 'azp') + } + isPayloadRequired(payload.iat, '"iat" claim', 'iat') + isPayloadRequired(payload.sub, '"sub" claim', 'sub') + isPayloadRequired(payload.exp, '"exp" claim', 'exp') + isTimestamp(payload.auth_time, 'auth_time', !!options.maxAuthAge) + isPayloadString(payload.nonce, '"nonce" claim', 'nonce', !!options.nonce) + isPayloadString(payload.acr, '"acr" claim', 'acr') + isStringOrArrayOfStrings(payload.amr, 'amr') + + if (options.nonce && payload.nonce !== options.nonce) { + throw new JWTClaimInvalid('unexpected "nonce" claim value', 'nonce', 'check_failed') + } + + const tolerance = options.clockTolerance ? secs(options.clockTolerance) : 0 + + if (options.maxAuthAge) { + const maxAuthAgeSeconds = secs(options.maxAuthAge) + if (payload.auth_time + maxAuthAgeSeconds < unix - tolerance) { + throw new JWTClaimInvalid('"auth_time" claim timestamp check failed (too much time has elapsed since the last End-User authentication)', 'auth_time', 'check_failed') + } + } + + if (Array.isArray(payload.aud) && payload.aud.length > 1 && payload.azp !== options.audience) { + throw new JWTClaimInvalid('unexpected "azp" claim value', 'azp', 'check_failed') + } + + return result + } + }, + LogoutToken: {}, + AccessToken: {} +} + +defineLazyExportWithWarning(module.exports.LogoutToken, 'verify', 'jose.JWT.LogoutToken.verify', (token, key, options = {}) => { + validateCommonOptions(options, 'a Logout Token') + + const result = verify(token, key, { ...options }) + const payload = options.complete ? result.payload : result + + isPayloadRequired(payload.iat, '"iat" claim', 'iat') + isPayloadRequired(payload.jti, '"jti" claim', 'jti') + isPayloadString(payload.sid, '"sid" claim', 'sid') + + if (!('sid' in payload) && !('sub' in payload)) { + throw new JWTClaimInvalid('either "sid" or "sub" (or both) claims must be present') + } + + if ('nonce' in payload) { + throw new JWTClaimInvalid('"nonce" claim is prohibited', 'nonce', 'prohibited') + } + + if (!('events' in payload)) { + throw new JWTClaimInvalid('"events" claim is missing', 'events', 'missing') + } + + if (!isObject(payload.events)) { + throw new JWTClaimInvalid('"events" claim must be an object', 'events', 'invalid') + } + + if (!('http://schemas.openid.net/event/backchannel-logout' in payload.events)) { + throw new JWTClaimInvalid('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim', 'events', 'invalid') + } + + if (!isObject(payload.events['http://schemas.openid.net/event/backchannel-logout'])) { + throw new JWTClaimInvalid('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object', 'events', 'invalid') + } + + return result +}) + +defineLazyExportWithWarning(module.exports.AccessToken, 'verify', 'jose.JWT.AccessToken.verify', (token, key, options = {}) => { + validateCommonOptions(options, 'a JWT Access Token') + + isOptionString(options.maxAuthAge, 'options.maxAuthAge') + + const unix = epoch(options.now || new Date()) + const typ = 'at+JWT' + const result = verify(token, key, { ...options, typ }) + const payload = options.complete ? result.payload : result + + isPayloadRequired(payload.iat, '"iat" claim', 'iat') + isPayloadRequired(payload.exp, '"exp" claim', 'exp') + isPayloadRequired(payload.sub, '"sub" claim', 'sub') + isPayloadRequired(payload.jti, '"jti" claim', 'jti') + isPayloadString(payload.client_id, '"client_id" claim', 'client_id', true) + isTimestamp(payload.auth_time, 'auth_time', !!options.maxAuthAge) + isPayloadString(payload.acr, '"acr" claim', 'acr') + isStringOrArrayOfStrings(payload.amr, 'amr') + + const tolerance = options.clockTolerance ? secs(options.clockTolerance) : 0 + + if (options.maxAuthAge) { + const maxAuthAgeSeconds = secs(options.maxAuthAge) + if (payload.auth_time + maxAuthAgeSeconds < unix - tolerance) { + throw new JWTClaimInvalid('"auth_time" claim timestamp check failed (too much time has elapsed since the last End-User authentication)', 'auth_time', 'check_failed') + } + } + + return result +}) + + +/***/ }), + +/***/ 60911: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { JWTClaimInvalid } = __nccwpck_require__(94269) + +const isNotString = val => typeof val !== 'string' || val.length === 0 +const isNotArrayOfStrings = val => !Array.isArray(val) || val.length === 0 || val.some(isNotString) +const isRequired = (Err, value, label, claim) => { + if (value === undefined) { + throw new Err(`${label} is missing`, claim, 'missing') + } +} +const isString = (Err, value, label, claim, required = false) => { + if (required) { + isRequired(Err, value, label, claim) + } + + if (value !== undefined && isNotString(value)) { + throw new Err(`${label} must be a string`, claim, 'invalid') + } +} +const isTimestamp = (value, label, required = false) => { + if (required && value === undefined) { + throw new JWTClaimInvalid(`"${label}" claim is missing`, label, 'missing') + } + + if (value !== undefined && (typeof value !== 'number')) { + throw new JWTClaimInvalid(`"${label}" claim must be a JSON numeric value`, label, 'invalid') + } +} +const isStringOrArrayOfStrings = (value, label, required = false) => { + if (required && value === undefined) { + throw new JWTClaimInvalid(`"${label}" claim is missing`, label, 'missing') + } + + if (value !== undefined && (isNotString(value) && isNotArrayOfStrings(value))) { + throw new JWTClaimInvalid(`"${label}" claim must be a string or array of strings`, label, 'invalid') + } +} + +module.exports = { + isNotArrayOfStrings, + isRequired, + isNotString, + isString, + isTimestamp, + isStringOrArrayOfStrings +} + + +/***/ }), + +/***/ 85237: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const isObject = __nccwpck_require__(80281) +const secs = __nccwpck_require__(93608) +const epoch = __nccwpck_require__(82066) +const getKey = __nccwpck_require__(77217) +const JWS = __nccwpck_require__(82390) + +const isString = (__nccwpck_require__(60911).isString.bind)(undefined, TypeError) + +const validateOptions = (options) => { + if (typeof options.iat !== 'boolean') { + throw new TypeError('options.iat must be a boolean') + } + + if (typeof options.kid !== 'boolean') { + throw new TypeError('options.kid must be a boolean') + } + + isString(options.subject, 'options.subject') + isString(options.issuer, 'options.issuer') + + if ( + options.audience !== undefined && + ( + (typeof options.audience !== 'string' || !options.audience) && + (!Array.isArray(options.audience) || options.audience.length === 0 || options.audience.some(a => !a || typeof a !== 'string')) + ) + ) { + throw new TypeError('options.audience must be a string or an array of strings') + } + + if (!isObject(options.header)) { + throw new TypeError('options.header must be an object') + } + + isString(options.algorithm, 'options.algorithm') + isString(options.expiresIn, 'options.expiresIn') + isString(options.notBefore, 'options.notBefore') + isString(options.jti, 'options.jti') + + if (options.now !== undefined && (!(options.now instanceof Date) || !options.now.getTime())) { + throw new TypeError('options.now must be a valid Date object') + } +} + +module.exports = (payload, key, options = {}) => { + if (!isObject(options)) { + throw new TypeError('options must be an object') + } + + const { + algorithm, audience, expiresIn, header = {}, iat = true, + issuer, jti, kid = true, notBefore, subject, now + } = options + + validateOptions({ + algorithm, audience, expiresIn, header, iat, issuer, jti, kid, notBefore, now, subject + }) + + if (!isObject(payload)) { + throw new TypeError('payload must be an object') + } + + let unix + if (expiresIn || notBefore || iat) { + unix = epoch(now || new Date()) + } + + payload = { + ...payload, + sub: subject || payload.sub, + aud: audience || payload.aud, + iss: issuer || payload.iss, + jti: jti || payload.jti, + iat: iat ? unix : payload.iat, + exp: expiresIn ? unix + secs(expiresIn) : payload.exp, + nbf: notBefore ? unix + secs(notBefore) : payload.nbf + } + + key = getKey(key) + + let includeKid + + if (typeof options.kid === 'boolean') { + includeKid = kid + } else { + includeKid = !key.secret + } + + return JWS.sign(JSON.stringify(payload), key, { + ...header, + alg: algorithm || header.alg, + kid: includeKid ? key.kid : header.kid + }) +} + + +/***/ }), + +/***/ 87167: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const isObject = __nccwpck_require__(80281) +const epoch = __nccwpck_require__(82066) +const secs = __nccwpck_require__(93608) +const getKey = __nccwpck_require__(77217) +const { bare: verify } = __nccwpck_require__(84264) +const { JWTClaimInvalid, JWTExpired } = __nccwpck_require__(94269) + +const { + isString, + isNotString, + isNotArrayOfStrings, + isTimestamp, + isStringOrArrayOfStrings +} = __nccwpck_require__(60911) +const decode = __nccwpck_require__(67985) + +const isPayloadString = isString.bind(undefined, JWTClaimInvalid) +const isOptionString = isString.bind(undefined, TypeError) + +const normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, '') + +const validateOptions = ({ + algorithms, audience, clockTolerance, complete = false, crit, ignoreExp = false, + ignoreIat = false, ignoreNbf = false, issuer, jti, maxTokenAge, now = new Date(), + subject, typ +}) => { + if (typeof complete !== 'boolean') { + throw new TypeError('options.complete must be a boolean') + } + + if (typeof ignoreExp !== 'boolean') { + throw new TypeError('options.ignoreExp must be a boolean') + } + + if (typeof ignoreNbf !== 'boolean') { + throw new TypeError('options.ignoreNbf must be a boolean') + } + + if (typeof ignoreIat !== 'boolean') { + throw new TypeError('options.ignoreIat must be a boolean') + } + + isOptionString(maxTokenAge, 'options.maxTokenAge') + isOptionString(subject, 'options.subject') + isOptionString(jti, 'options.jti') + isOptionString(clockTolerance, 'options.clockTolerance') + isOptionString(typ, 'options.typ') + + if (issuer !== undefined && (isNotString(issuer) && isNotArrayOfStrings(issuer))) { + throw new TypeError('options.issuer must be a string or an array of strings') + } + + if (audience !== undefined && (isNotString(audience) && isNotArrayOfStrings(audience))) { + throw new TypeError('options.audience must be a string or an array of strings') + } + + if (algorithms !== undefined && isNotArrayOfStrings(algorithms)) { + throw new TypeError('options.algorithms must be an array of strings') + } + + if (!(now instanceof Date) || !now.getTime()) { + throw new TypeError('options.now must be a valid Date object') + } + + if (ignoreIat && maxTokenAge !== undefined) { + throw new TypeError('options.ignoreIat and options.maxTokenAge cannot used together') + } + + if (crit !== undefined && isNotArrayOfStrings(crit)) { + throw new TypeError('options.crit must be an array of strings') + } + + return { + algorithms, + audience, + clockTolerance, + complete, + crit, + ignoreExp, + ignoreIat, + ignoreNbf, + issuer, + jti, + maxTokenAge, + now, + subject, + typ + } +} + +const validateTypes = ({ header, payload }, options) => { + isPayloadString(header.alg, '"alg" header parameter', 'alg', true) + + isTimestamp(payload.iat, 'iat', !!options.maxTokenAge) + isTimestamp(payload.exp, 'exp') + isTimestamp(payload.nbf, 'nbf') + isPayloadString(payload.jti, '"jti" claim', 'jti', !!options.jti) + isStringOrArrayOfStrings(payload.iss, 'iss', !!options.issuer) + isPayloadString(payload.sub, '"sub" claim', 'sub', !!options.subject) + isStringOrArrayOfStrings(payload.aud, 'aud', !!options.audience) + isPayloadString(header.typ, '"typ" header parameter', 'typ', !!options.typ) +} + +const checkAudiencePresence = (audPayload, audOption) => { + if (typeof audPayload === 'string') { + return audOption.includes(audPayload) + } + + // Each principal intended to process the JWT MUST + // identify itself with a value in the audience claim + audPayload = new Set(audPayload) + return audOption.some(Set.prototype.has.bind(audPayload)) +} + +module.exports = (token, key, options = {}) => { + if (!isObject(options)) { + throw new TypeError('options must be an object') + } + + const { + algorithms, audience, clockTolerance, complete, crit, ignoreExp, ignoreIat, ignoreNbf, issuer, + jti, maxTokenAge, now, subject, typ + } = options = validateOptions(options) + + const decoded = decode(token, { complete: true }) + key = getKey(key, true) + + if (complete) { + ({ key } = verify(true, 'preparsed', { decoded, token }, key, { crit, algorithms, complete: true })) + decoded.key = key + } else { + verify(true, 'preparsed', { decoded, token }, key, { crit, algorithms }) + } + + const unix = epoch(now) + validateTypes(decoded, options) + + if (issuer && (typeof decoded.payload.iss !== 'string' || !(typeof issuer === 'string' ? [issuer] : issuer).includes(decoded.payload.iss))) { + throw new JWTClaimInvalid('unexpected "iss" claim value', 'iss', 'check_failed') + } + + if (subject && decoded.payload.sub !== subject) { + throw new JWTClaimInvalid('unexpected "sub" claim value', 'sub', 'check_failed') + } + + if (jti && decoded.payload.jti !== jti) { + throw new JWTClaimInvalid('unexpected "jti" claim value', 'jti', 'check_failed') + } + + if (audience && !checkAudiencePresence(decoded.payload.aud, typeof audience === 'string' ? [audience] : audience)) { + throw new JWTClaimInvalid('unexpected "aud" claim value', 'aud', 'check_failed') + } + + if (typ && normalizeTyp(decoded.header.typ) !== normalizeTyp(typ)) { + throw new JWTClaimInvalid('unexpected "typ" JWT header value', 'typ', 'check_failed') + } + + const tolerance = clockTolerance ? secs(clockTolerance) : 0 + + if (!ignoreIat && !('exp' in decoded.payload) && 'iat' in decoded.payload && decoded.payload.iat > unix + tolerance) { + throw new JWTClaimInvalid('"iat" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed') + } + + if (!ignoreNbf && 'nbf' in decoded.payload && decoded.payload.nbf > unix + tolerance) { + throw new JWTClaimInvalid('"nbf" claim timestamp check failed', 'nbf', 'check_failed') + } + + if (!ignoreExp && 'exp' in decoded.payload && decoded.payload.exp <= unix - tolerance) { + throw new JWTExpired('"exp" claim timestamp check failed', 'exp', 'check_failed') + } + + if (maxTokenAge) { + const age = unix - decoded.payload.iat + const max = secs(maxTokenAge) + + if (age - tolerance > max) { + throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', 'iat', 'check_failed') + } + + if (age < 0 - tolerance) { + throw new JWTClaimInvalid('"iat" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed') + } + } + + return complete ? decoded : decoded.payload +} + + +/***/ }), + +/***/ 17201: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { getCurves } = __nccwpck_require__(6113) + +const curves = new Set() + +if (getCurves().includes('prime256v1')) { + curves.add('P-256') +} + +if (getCurves().includes('secp256k1')) { + curves.add('secp256k1') +} + +if (getCurves().includes('secp384r1')) { + curves.add('P-384') +} + +if (getCurves().includes('secp521r1')) { + curves.add('P-521') +} + +module.exports = curves + + +/***/ }), + +/***/ 41686: +/***/ ((module) => { + +module.exports = new Map() + + +/***/ }), + +/***/ 32075: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const EC_CURVES = __nccwpck_require__(17201) +const IVLENGTHS = __nccwpck_require__(38457) +const JWA = __nccwpck_require__(57481) +const JWK = __nccwpck_require__(51386) +const KEYLENGTHS = __nccwpck_require__(81327) +const OKP_CURVES = __nccwpck_require__(11770) +const ECDH_DERIVE_LENGTHS = __nccwpck_require__(41686) + +module.exports = { + EC_CURVES, + ECDH_DERIVE_LENGTHS, + IVLENGTHS, + JWA, + JWK, + KEYLENGTHS, + OKP_CURVES +} + + +/***/ }), + +/***/ 38457: +/***/ ((module) => { + +module.exports = new Map([ + ['A128CBC-HS256', 128], + ['A128GCM', 96], + ['A128GCMKW', 96], + ['A192CBC-HS384', 128], + ['A192GCM', 96], + ['A192GCMKW', 96], + ['A256CBC-HS512', 128], + ['A256GCM', 96], + ['A256GCMKW', 96] +]) + + +/***/ }), + +/***/ 57481: +/***/ ((module) => { + +module.exports = { + sign: new Map(), + verify: new Map(), + keyManagementEncrypt: new Map(), + keyManagementDecrypt: new Map(), + encrypt: new Map(), + decrypt: new Map() +} + + +/***/ }), + +/***/ 51386: +/***/ ((module) => { + +module.exports = { + oct: { + decrypt: {}, + deriveKey: {}, + encrypt: {}, + sign: {}, + unwrapKey: {}, + verify: {}, + wrapKey: {} + }, + EC: { + decrypt: {}, + deriveKey: {}, + encrypt: {}, + sign: {}, + unwrapKey: {}, + verify: {}, + wrapKey: {} + }, + RSA: { + decrypt: {}, + deriveKey: {}, + encrypt: {}, + sign: {}, + unwrapKey: {}, + verify: {}, + wrapKey: {} + }, + OKP: { + decrypt: {}, + deriveKey: {}, + encrypt: {}, + sign: {}, + unwrapKey: {}, + verify: {}, + wrapKey: {} + } +} + + +/***/ }), + +/***/ 81327: +/***/ ((module) => { + +module.exports = new Map([ + ['A128CBC-HS256', 256], + ['A128GCM', 128], + ['A192CBC-HS384', 384], + ['A192GCM', 192], + ['A256CBC-HS512', 512], + ['A256GCM', 256] +]) + + +/***/ }), + +/***/ 11770: +/***/ ((module) => { + +const curves = new Set(['Ed25519']) + +if (!('electron' in process.versions)) { + curves.add('Ed448') + curves.add('X25519') + curves.add('X448') +} + +module.exports = curves + + +/***/ }), + +/***/ 42934: +/***/ (function(module, exports) { + +(function(){ + + // Copyright (c) 2005 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Basic JavaScript BN library - subset useful for RSA encryption. + + // Bits per digit + var dbits; + + // JavaScript engine analysis + var canary = 0xdeadbeefcafe; + var j_lm = ((canary&0xffffff)==0xefcafe); + + // (public) Constructor + function BigInteger(a,b,c) { + if(a != null) + if("number" == typeof a) this.fromNumber(a,b,c); + else if(b == null && "string" != typeof a) this.fromString(a,256); + else this.fromString(a,b); + } + + // return new, unset BigInteger + function nbi() { return new BigInteger(null); } + + // am: Compute w_j += (x*this_i), propagate carries, + // c is initial carry, returns final carry. + // c < 3*dvalue, x < 2*dvalue, this_i < dvalue + // We need to select the fastest one that works in this environment. + + // am1: use a single mult and divide to get the high bits, + // max digit bits should be 26 because + // max internal value = 2*dvalue^2-2*dvalue (< 2^53) + function am1(i,x,w,j,c,n) { + while(--n >= 0) { + var v = x*this[i++]+w[j]+c; + c = Math.floor(v/0x4000000); + w[j++] = v&0x3ffffff; + } + return c; + } + // am2 avoids a big mult-and-extract completely. + // Max digit bits should be <= 30 because we do bitwise ops + // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) + function am2(i,x,w,j,c,n) { + var xl = x&0x7fff, xh = x>>15; + while(--n >= 0) { + var l = this[i]&0x7fff; + var h = this[i++]>>15; + var m = xh*l+h*xl; + l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); + c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); + w[j++] = l&0x3fffffff; + } + return c; + } + // Alternately, set max digit bits to 28 since some + // browsers slow down when dealing with 32-bit numbers. + function am3(i,x,w,j,c,n) { + var xl = x&0x3fff, xh = x>>14; + while(--n >= 0) { + var l = this[i]&0x3fff; + var h = this[i++]>>14; + var m = xh*l+h*xl; + l = xl*l+((m&0x3fff)<<14)+w[j]+c; + c = (l>>28)+(m>>14)+xh*h; + w[j++] = l&0xfffffff; + } + return c; + } + var inBrowser = typeof navigator !== "undefined"; + if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { + BigInteger.prototype.am = am2; + dbits = 30; + } + else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { + BigInteger.prototype.am = am1; + dbits = 26; + } + else { // Mozilla/Netscape seems to prefer am3 + BigInteger.prototype.am = am3; + dbits = 28; + } + + BigInteger.prototype.DB = dbits; + BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; + r.t = this.t; + r.s = this.s; + } + + // (protected) set from integer value x, -DV <= x < DV + function bnpFromInt(x) { + this.t = 1; + this.s = (x<0)?-1:0; + if(x > 0) this[0] = x; + else if(x < -1) this[0] = x+this.DV; + else this.t = 0; + } + + // return bigint initialized to value + function nbv(i) { var r = nbi(); r.fromInt(i); return r; } + + // (protected) set from string and radix + function bnpFromString(s,b) { + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 256) k = 8; // byte array + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else { this.fromRadix(s,b); return; } + this.t = 0; + this.s = 0; + var i = s.length, mi = false, sh = 0; + while(--i >= 0) { + var x = (k==8)?s[i]&0xff:intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-") mi = true; + continue; + } + mi = false; + if(sh == 0) + this[this.t++] = x; + else if(sh+k > this.DB) { + this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); + } + else + this[this.t-1] |= x<= this.DB) sh -= this.DB; + } + if(k == 8 && (s[0]&0x80) != 0) { + this.s = -1; + if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; + } + + // (public) return string representation in given radix + function bnToString(b) { + if(this.s < 0) return "-"+this.negate().toString(b); + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else return this.toRadix(b); + var km = (1< 0) { + if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } + while(i >= 0) { + if(p < k) { + d = (this[i]&((1<>(p+=this.DB-k); + } + else { + d = (this[i]>>(p-=k))&km; + if(p <= 0) { p += this.DB; --i; } + } + if(d > 0) m = true; + if(m) r += int2char(d); + } + } + return m?r:"0"; + } + + // (public) -this + function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } + + // (public) |this| + function bnAbs() { return (this.s<0)?this.negate():this; } + + // (public) return + if this > a, - if this < a, 0 if equal + function bnCompareTo(a) { + var r = this.s-a.s; + if(r != 0) return r; + var i = this.t; + r = i-a.t; + if(r != 0) return (this.s<0)?-r:r; + while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; + return 0; + } + + // returns bit length of the integer x + function nbits(x) { + var r = 1, t; + if((t=x>>>16) != 0) { x = t; r += 16; } + if((t=x>>8) != 0) { x = t; r += 8; } + if((t=x>>4) != 0) { x = t; r += 4; } + if((t=x>>2) != 0) { x = t; r += 2; } + if((t=x>>1) != 0) { x = t; r += 1; } + return r; + } + + // (public) return the number of bits in "this" + function bnBitLength() { + if(this.t <= 0) return 0; + return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); + } + + // (protected) r = this << n*DB + function bnpDLShiftTo(n,r) { + var i; + for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; + for(i = n-1; i >= 0; --i) r[i] = 0; + r.t = this.t+n; + r.s = this.s; + } + + // (protected) r = this >> n*DB + function bnpDRShiftTo(n,r) { + for(var i = n; i < this.t; ++i) r[i-n] = this[i]; + r.t = Math.max(this.t-n,0); + r.s = this.s; + } + + // (protected) r = this << n + function bnpLShiftTo(n,r) { + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<= 0; --i) { + r[i+ds+1] = (this[i]>>cbs)|c; + c = (this[i]&bm)<= 0; --i) r[i] = 0; + r[ds] = c; + r.t = this.t+ds+1; + r.s = this.s; + r.clamp(); + } + + // (protected) r = this >> n + function bnpRShiftTo(n,r) { + r.s = this.s; + var ds = Math.floor(n/this.DB); + if(ds >= this.t) { r.t = 0; return; } + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<>bs; + for(var i = ds+1; i < this.t; ++i) { + r[i-ds-1] |= (this[i]&bm)<>bs; + } + if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; + } + if(a.t < this.t) { + c -= a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c -= a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c -= a.s; + } + r.s = (c<0)?-1:0; + if(c < -1) r[i++] = this.DV+c; + else if(c > 0) r[i++] = c; + r.t = i; + r.clamp(); + } + + // (protected) r = this * a, r != this,a (HAC 14.12) + // "this" should be the larger one if appropriate. + function bnpMultiplyTo(a,r) { + var x = this.abs(), y = a.abs(); + var i = x.t; + r.t = i+y.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); + r.s = 0; + r.clamp(); + if(this.s != a.s) BigInteger.ZERO.subTo(r,r); + } + + // (protected) r = this^2, r != this (HAC 14.16) + function bnpSquareTo(r) { + var x = this.abs(); + var i = r.t = 2*x.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < x.t-1; ++i) { + var c = x.am(i,x[i],r,2*i,0,1); + if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { + r[i+x.t] -= x.DV; + r[i+x.t+1] = 1; + } + } + if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); + r.s = 0; + r.clamp(); + } + + // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) + // r != q, this != m. q or r may be null. + function bnpDivRemTo(m,q,r) { + var pm = m.abs(); + if(pm.t <= 0) return; + var pt = this.abs(); + if(pt.t < pm.t) { + if(q != null) q.fromInt(0); + if(r != null) this.copyTo(r); + return; + } + if(r == null) r = nbi(); + var y = nbi(), ts = this.s, ms = m.s; + var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus + if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } + else { pm.copyTo(y); pt.copyTo(r); } + var ys = y.t; + var y0 = y[ys-1]; + if(y0 == 0) return; + var yt = y0*(1<1)?y[ys-2]>>this.F2:0); + var d1 = this.FV/yt, d2 = (1<= 0) { + r[r.t++] = 1; + r.subTo(t,r); + } + BigInteger.ONE.dlShiftTo(ys,t); + t.subTo(y,y); // "negative" y so we can replace sub with am later + while(y.t < ys) y[y.t++] = 0; + while(--j >= 0) { + // Estimate quotient digit + var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); + if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out + y.dlShiftTo(j,t); + r.subTo(t,r); + while(r[i] < --qd) r.subTo(t,r); + } + } + if(q != null) { + r.drShiftTo(ys,q); + if(ts != ms) BigInteger.ZERO.subTo(q,q); + } + r.t = ys; + r.clamp(); + if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder + if(ts < 0) BigInteger.ZERO.subTo(r,r); + } + + // (public) this mod a + function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a,null,r); + if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); + return r; + } + + // Modular reduction using "classic" algorithm + function Classic(m) { this.m = m; } + function cConvert(x) { + if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); + else return x; + } + function cRevert(x) { return x; } + function cReduce(x) { x.divRemTo(this.m,null,x); } + function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + Classic.prototype.convert = cConvert; + Classic.prototype.revert = cRevert; + Classic.prototype.reduce = cReduce; + Classic.prototype.mulTo = cMulTo; + Classic.prototype.sqrTo = cSqrTo; + + // (protected) return "-1/this % 2^DB"; useful for Mont. reduction + // justification: + // xy == 1 (mod m) + // xy = 1+km + // xy(2-xy) = (1+km)(1-km) + // x[y(2-xy)] = 1-k^2m^2 + // x[y(2-xy)] == 1 (mod m^2) + // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 + // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. + // JS multiply "overflows" differently from C/C++, so care is needed here. + function bnpInvDigit() { + if(this.t < 1) return 0; + var x = this[0]; + if((x&1) == 0) return 0; + var y = x&3; // y == 1/x mod 2^2 + y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 + y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 + y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 + // last step - calculate inverse mod DV directly; + // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints + y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits + // we really want the negative inverse, and -DV < y < DV + return (y>0)?this.DV-y:-y; + } + + // Montgomery reduction + function Montgomery(m) { + this.m = m; + this.mp = m.invDigit(); + this.mpl = this.mp&0x7fff; + this.mph = this.mp>>15; + this.um = (1<<(m.DB-15))-1; + this.mt2 = 2*m.t; + } + + // xR mod m + function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t,r); + r.divRemTo(this.m,null,r); + if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); + return r; + } + + // x/R mod m + function montRevert(x) { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; + } + + // x = x/R mod m (HAC 14.32) + function montReduce(x) { + while(x.t <= this.mt2) // pad x so am has enough room later + x[x.t++] = 0; + for(var i = 0; i < this.m.t; ++i) { + // faster way of calculating u0 = x[i]*mp mod DV + var j = x[i]&0x7fff; + var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; + // use am to combine the multiply-shift-add into one call + j = i+this.m.t; + x[j] += this.m.am(0,u0,x,i,0,this.m.t); + // propagate carry + while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } + } + x.clamp(); + x.drShiftTo(this.m.t,x); + if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = "x^2/R mod m"; x != r + function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = "xy/R mod m"; x,y != r + function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Montgomery.prototype.convert = montConvert; + Montgomery.prototype.revert = montRevert; + Montgomery.prototype.reduce = montReduce; + Montgomery.prototype.mulTo = montMulTo; + Montgomery.prototype.sqrTo = montSqrTo; + + // (protected) true iff this is even + function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } + + // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) + function bnpExp(e,z) { + if(e > 0xffffffff || e < 1) return BigInteger.ONE; + var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; + g.copyTo(r); + while(--i >= 0) { + z.sqrTo(r,r2); + if((e&(1< 0) z.mulTo(r2,g,r); + else { var t = r; r = r2; r2 = t; } + } + return z.revert(r); + } + + // (public) this^e % m, 0 <= e < 2^32 + function bnModPowInt(e,m) { + var z; + if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); + return this.exp(e,z); + } + + // protected + BigInteger.prototype.copyTo = bnpCopyTo; + BigInteger.prototype.fromInt = bnpFromInt; + BigInteger.prototype.fromString = bnpFromString; + BigInteger.prototype.clamp = bnpClamp; + BigInteger.prototype.dlShiftTo = bnpDLShiftTo; + BigInteger.prototype.drShiftTo = bnpDRShiftTo; + BigInteger.prototype.lShiftTo = bnpLShiftTo; + BigInteger.prototype.rShiftTo = bnpRShiftTo; + BigInteger.prototype.subTo = bnpSubTo; + BigInteger.prototype.multiplyTo = bnpMultiplyTo; + BigInteger.prototype.squareTo = bnpSquareTo; + BigInteger.prototype.divRemTo = bnpDivRemTo; + BigInteger.prototype.invDigit = bnpInvDigit; + BigInteger.prototype.isEven = bnpIsEven; + BigInteger.prototype.exp = bnpExp; + + // public + BigInteger.prototype.toString = bnToString; + BigInteger.prototype.negate = bnNegate; + BigInteger.prototype.abs = bnAbs; + BigInteger.prototype.compareTo = bnCompareTo; + BigInteger.prototype.bitLength = bnBitLength; + BigInteger.prototype.mod = bnMod; + BigInteger.prototype.modPowInt = bnModPowInt; + + // "constants" + BigInteger.ZERO = nbv(0); + BigInteger.ONE = nbv(1); + + // Copyright (c) 2005-2009 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Extended JavaScript BN functions, required for RSA private ops. + + // Version 1.1: new BigInteger("0", 10) returns "proper" zero + // Version 1.2: square() API, isProbablePrime fix + + // (public) + function bnClone() { var r = nbi(); this.copyTo(r); return r; } + + // (public) return value as integer + function bnIntValue() { + if(this.s < 0) { + if(this.t == 1) return this[0]-this.DV; + else if(this.t == 0) return -1; + } + else if(this.t == 1) return this[0]; + else if(this.t == 0) return 0; + // assumes 16 < DB < 32 + return ((this[1]&((1<<(32-this.DB))-1))<>24; } + + // (public) return value as short (assumes DB>=16) + function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } + + // (protected) return x s.t. r^x < DV + function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } + + // (public) 0 if this == 0, 1 if this > 0 + function bnSigNum() { + if(this.s < 0) return -1; + else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; + else return 1; + } + + // (protected) convert to radix string + function bnpToRadix(b) { + if(b == null) b = 10; + if(this.signum() == 0 || b < 2 || b > 36) return "0"; + var cs = this.chunkSize(b); + var a = Math.pow(b,cs); + var d = nbv(a), y = nbi(), z = nbi(), r = ""; + this.divRemTo(d,y,z); + while(y.signum() > 0) { + r = (a+z.intValue()).toString(b).substr(1) + r; + y.divRemTo(d,y,z); + } + return z.intValue().toString(b) + r; + } + + // (protected) convert from radix string + function bnpFromRadix(s,b) { + this.fromInt(0); + if(b == null) b = 10; + var cs = this.chunkSize(b); + var d = Math.pow(b,cs), mi = false, j = 0, w = 0; + for(var i = 0; i < s.length; ++i) { + var x = intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-" && this.signum() == 0) mi = true; + continue; + } + w = b*w+x; + if(++j >= cs) { + this.dMultiply(d); + this.dAddOffset(w,0); + j = 0; + w = 0; + } + } + if(j > 0) { + this.dMultiply(Math.pow(b,j)); + this.dAddOffset(w,0); + } + if(mi) BigInteger.ZERO.subTo(this,this); + } + + // (protected) alternate constructor + function bnpFromNumber(a,b,c) { + if("number" == typeof b) { + // new BigInteger(int,int,RNG) + if(a < 2) this.fromInt(1); + else { + this.fromNumber(a,c); + if(!this.testBit(a-1)) // force MSB set + this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + if(this.isEven()) this.dAddOffset(1,0); // force odd + while(!this.isProbablePrime(b)) { + this.dAddOffset(2,0); + if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); + } + } + } + else { + // new BigInteger(int,RNG) + var x = new Array(), t = a&7; + x.length = (a>>3)+1; + b.nextBytes(x); + if(t > 0) x[0] &= ((1< 0) { + if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) + r[k++] = d|(this.s<<(this.DB-p)); + while(i >= 0) { + if(p < 8) { + d = (this[i]&((1<>(p+=this.DB-8); + } + else { + d = (this[i]>>(p-=8))&0xff; + if(p <= 0) { p += this.DB; --i; } + } + if((d&0x80) != 0) d |= -256; + if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; + if(k > 0 || d != this.s) r[k++] = d; + } + } + return r; + } + + function bnEquals(a) { return(this.compareTo(a)==0); } + function bnMin(a) { return(this.compareTo(a)<0)?this:a; } + function bnMax(a) { return(this.compareTo(a)>0)?this:a; } + + // (protected) r = this op a (bitwise) + function bnpBitwiseTo(a,op,r) { + var i, f, m = Math.min(a.t,this.t); + for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); + if(a.t < this.t) { + f = a.s&this.DM; + for(i = m; i < this.t; ++i) r[i] = op(this[i],f); + r.t = this.t; + } + else { + f = this.s&this.DM; + for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); + r.t = a.t; + } + r.s = op(this.s,a.s); + r.clamp(); + } + + // (public) this & a + function op_and(x,y) { return x&y; } + function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } + + // (public) this | a + function op_or(x,y) { return x|y; } + function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } + + // (public) this ^ a + function op_xor(x,y) { return x^y; } + function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } + + // (public) this & ~a + function op_andnot(x,y) { return x&~y; } + function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } + + // (public) ~this + function bnNot() { + var r = nbi(); + for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; + r.t = this.t; + r.s = ~this.s; + return r; + } + + // (public) this << n + function bnShiftLeft(n) { + var r = nbi(); + if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); + return r; + } + + // (public) this >> n + function bnShiftRight(n) { + var r = nbi(); + if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); + return r; + } + + // return index of lowest 1-bit in x, x < 2^31 + function lbit(x) { + if(x == 0) return -1; + var r = 0; + if((x&0xffff) == 0) { x >>= 16; r += 16; } + if((x&0xff) == 0) { x >>= 8; r += 8; } + if((x&0xf) == 0) { x >>= 4; r += 4; } + if((x&3) == 0) { x >>= 2; r += 2; } + if((x&1) == 0) ++r; + return r; + } + + // (public) returns index of lowest 1-bit (or -1 if none) + function bnGetLowestSetBit() { + for(var i = 0; i < this.t; ++i) + if(this[i] != 0) return i*this.DB+lbit(this[i]); + if(this.s < 0) return this.t*this.DB; + return -1; + } + + // return number of 1 bits in x + function cbit(x) { + var r = 0; + while(x != 0) { x &= x-1; ++r; } + return r; + } + + // (public) return number of set bits + function bnBitCount() { + var r = 0, x = this.s&this.DM; + for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); + return r; + } + + // (public) true iff nth bit is set + function bnTestBit(n) { + var j = Math.floor(n/this.DB); + if(j >= this.t) return(this.s!=0); + return((this[j]&(1<<(n%this.DB)))!=0); + } + + // (protected) this op (1<>= this.DB; + } + if(a.t < this.t) { + c += a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c += a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += a.s; + } + r.s = (c<0)?-1:0; + if(c > 0) r[i++] = c; + else if(c < -1) r[i++] = this.DV+c; + r.t = i; + r.clamp(); + } + + // (public) this + a + function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } + + // (public) this - a + function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } + + // (public) this * a + function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } + + // (public) this^2 + function bnSquare() { var r = nbi(); this.squareTo(r); return r; } + + // (public) this / a + function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } + + // (public) this % a + function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } + + // (public) [this/a,this%a] + function bnDivideAndRemainder(a) { + var q = nbi(), r = nbi(); + this.divRemTo(a,q,r); + return new Array(q,r); + } + + // (protected) this *= n, this >= 0, 1 < n < DV + function bnpDMultiply(n) { + this[this.t] = this.am(0,n-1,this,0,0,this.t); + ++this.t; + this.clamp(); + } + + // (protected) this += n << w words, this >= 0 + function bnpDAddOffset(n,w) { + if(n == 0) return; + while(this.t <= w) this[this.t++] = 0; + this[w] += n; + while(this[w] >= this.DV) { + this[w] -= this.DV; + if(++w >= this.t) this[this.t++] = 0; + ++this[w]; + } + } + + // A "null" reducer + function NullExp() {} + function nNop(x) { return x; } + function nMulTo(x,y,r) { x.multiplyTo(y,r); } + function nSqrTo(x,r) { x.squareTo(r); } + + NullExp.prototype.convert = nNop; + NullExp.prototype.revert = nNop; + NullExp.prototype.mulTo = nMulTo; + NullExp.prototype.sqrTo = nSqrTo; + + // (public) this^e + function bnPow(e) { return this.exp(e,new NullExp()); } + + // (protected) r = lower n words of "this * a", a.t <= n + // "this" should be the larger one if appropriate. + function bnpMultiplyLowerTo(a,n,r) { + var i = Math.min(this.t+a.t,n); + r.s = 0; // assumes a,this >= 0 + r.t = i; + while(i > 0) r[--i] = 0; + var j; + for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); + for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); + r.clamp(); + } + + // (protected) r = "this * a" without lower n words, n > 0 + // "this" should be the larger one if appropriate. + function bnpMultiplyUpperTo(a,n,r) { + --n; + var i = r.t = this.t+a.t-n; + r.s = 0; // assumes a,this >= 0 + while(--i >= 0) r[i] = 0; + for(i = Math.max(n-this.t,0); i < a.t; ++i) + r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); + r.clamp(); + r.drShiftTo(1,r); + } + + // Barrett modular reduction + function Barrett(m) { + // setup Barrett + this.r2 = nbi(); + this.q3 = nbi(); + BigInteger.ONE.dlShiftTo(2*m.t,this.r2); + this.mu = this.r2.divide(m); + this.m = m; + } + + function barrettConvert(x) { + if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); + else if(x.compareTo(this.m) < 0) return x; + else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } + } + + function barrettRevert(x) { return x; } + + // x = x mod m (HAC 14.42) + function barrettReduce(x) { + x.drShiftTo(this.m.t-1,this.r2); + if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } + this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); + this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); + while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); + x.subTo(this.r2,x); + while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = x^2 mod m; x != r + function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = x*y mod m; x,y != r + function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Barrett.prototype.convert = barrettConvert; + Barrett.prototype.revert = barrettRevert; + Barrett.prototype.reduce = barrettReduce; + Barrett.prototype.mulTo = barrettMulTo; + Barrett.prototype.sqrTo = barrettSqrTo; + + // (public) this^e % m (HAC 14.85) + function bnModPow(e,m) { + var i = e.bitLength(), k, r = nbv(1), z; + if(i <= 0) return r; + else if(i < 18) k = 1; + else if(i < 48) k = 3; + else if(i < 144) k = 4; + else if(i < 768) k = 5; + else k = 6; + if(i < 8) + z = new Classic(m); + else if(m.isEven()) + z = new Barrett(m); + else + z = new Montgomery(m); + + // precomputation + var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { + var g2 = nbi(); + z.sqrTo(g[1],g2); + while(n <= km) { + g[n] = nbi(); + z.mulTo(g2,g[n-2],g[n]); + n += 2; + } + } + + var j = e.t-1, w, is1 = true, r2 = nbi(), t; + i = nbits(e[j])-1; + while(j >= 0) { + if(i >= k1) w = (e[j]>>(i-k1))&km; + else { + w = (e[j]&((1<<(i+1))-1))<<(k1-i); + if(j > 0) w |= e[j-1]>>(this.DB+i-k1); + } + + n = k; + while((w&1) == 0) { w >>= 1; --n; } + if((i -= n) < 0) { i += this.DB; --j; } + if(is1) { // ret == 1, don't bother squaring or multiplying it + g[w].copyTo(r); + is1 = false; + } + else { + while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } + if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } + z.mulTo(r2,g[w],r); + } + + while(j >= 0 && (e[j]&(1< 0) { + x.rShiftTo(g,x); + y.rShiftTo(g,y); + } + while(x.signum() > 0) { + if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); + if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); + if(x.compareTo(y) >= 0) { + x.subTo(y,x); + x.rShiftTo(1,x); + } + else { + y.subTo(x,y); + y.rShiftTo(1,y); + } + } + if(g > 0) y.lShiftTo(g,y); + return y; + } + + // (protected) this % n, n < 2^26 + function bnpModInt(n) { + if(n <= 0) return 0; + var d = this.DV%n, r = (this.s<0)?n-1:0; + if(this.t > 0) + if(d == 0) r = this[0]%n; + else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; + return r; + } + + // (public) 1/this % m (HAC 14.61) + function bnModInverse(m) { + var ac = m.isEven(); + if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; + var u = m.clone(), v = this.clone(); + var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); + while(u.signum() != 0) { + while(u.isEven()) { + u.rShiftTo(1,u); + if(ac) { + if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } + a.rShiftTo(1,a); + } + else if(!b.isEven()) b.subTo(m,b); + b.rShiftTo(1,b); + } + while(v.isEven()) { + v.rShiftTo(1,v); + if(ac) { + if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } + c.rShiftTo(1,c); + } + else if(!d.isEven()) d.subTo(m,d); + d.rShiftTo(1,d); + } + if(u.compareTo(v) >= 0) { + u.subTo(v,u); + if(ac) a.subTo(c,a); + b.subTo(d,b); + } + else { + v.subTo(u,v); + if(ac) c.subTo(a,c); + d.subTo(b,d); + } + } + if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; + if(d.compareTo(m) >= 0) return d.subtract(m); + if(d.signum() < 0) d.addTo(m,d); else return d; + if(d.signum() < 0) return d.add(m); else return d; + } + + var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; + var lplim = (1<<26)/lowprimes[lowprimes.length-1]; + + // (public) test primality with certainty >= 1-.5^t + function bnIsProbablePrime(t) { + var i, x = this.abs(); + if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { + for(i = 0; i < lowprimes.length; ++i) + if(x[0] == lowprimes[i]) return true; + return false; + } + if(x.isEven()) return false; + i = 1; + while(i < lowprimes.length) { + var m = lowprimes[i], j = i+1; + while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; + m = x.modInt(m); + while(i < j) if(m%lowprimes[i++] == 0) return false; + } + return x.millerRabin(t); + } + + // (protected) true if probably prime (HAC 4.24, Miller-Rabin) + function bnpMillerRabin(t) { + var n1 = this.subtract(BigInteger.ONE); + var k = n1.getLowestSetBit(); + if(k <= 0) return false; + var r = n1.shiftRight(k); + t = (t+1)>>1; + if(t > lowprimes.length) t = lowprimes.length; + var a = nbi(); + for(var i = 0; i < t; ++i) { + //Pick bases at random, instead of starting at 2 + a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); + var y = a.modPow(r,this); + if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { + var j = 1; + while(j++ < k && y.compareTo(n1) != 0) { + y = y.modPowInt(2,this); + if(y.compareTo(BigInteger.ONE) == 0) return false; + } + if(y.compareTo(n1) != 0) return false; + } + } + return true; + } + + // protected + BigInteger.prototype.chunkSize = bnpChunkSize; + BigInteger.prototype.toRadix = bnpToRadix; + BigInteger.prototype.fromRadix = bnpFromRadix; + BigInteger.prototype.fromNumber = bnpFromNumber; + BigInteger.prototype.bitwiseTo = bnpBitwiseTo; + BigInteger.prototype.changeBit = bnpChangeBit; + BigInteger.prototype.addTo = bnpAddTo; + BigInteger.prototype.dMultiply = bnpDMultiply; + BigInteger.prototype.dAddOffset = bnpDAddOffset; + BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; + BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; + BigInteger.prototype.modInt = bnpModInt; + BigInteger.prototype.millerRabin = bnpMillerRabin; + + // public + BigInteger.prototype.clone = bnClone; + BigInteger.prototype.intValue = bnIntValue; + BigInteger.prototype.byteValue = bnByteValue; + BigInteger.prototype.shortValue = bnShortValue; + BigInteger.prototype.signum = bnSigNum; + BigInteger.prototype.toByteArray = bnToByteArray; + BigInteger.prototype.equals = bnEquals; + BigInteger.prototype.min = bnMin; + BigInteger.prototype.max = bnMax; + BigInteger.prototype.and = bnAnd; + BigInteger.prototype.or = bnOr; + BigInteger.prototype.xor = bnXor; + BigInteger.prototype.andNot = bnAndNot; + BigInteger.prototype.not = bnNot; + BigInteger.prototype.shiftLeft = bnShiftLeft; + BigInteger.prototype.shiftRight = bnShiftRight; + BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; + BigInteger.prototype.bitCount = bnBitCount; + BigInteger.prototype.testBit = bnTestBit; + BigInteger.prototype.setBit = bnSetBit; + BigInteger.prototype.clearBit = bnClearBit; + BigInteger.prototype.flipBit = bnFlipBit; + BigInteger.prototype.add = bnAdd; + BigInteger.prototype.subtract = bnSubtract; + BigInteger.prototype.multiply = bnMultiply; + BigInteger.prototype.divide = bnDivide; + BigInteger.prototype.remainder = bnRemainder; + BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; + BigInteger.prototype.modPow = bnModPow; + BigInteger.prototype.modInverse = bnModInverse; + BigInteger.prototype.pow = bnPow; + BigInteger.prototype.gcd = bnGCD; + BigInteger.prototype.isProbablePrime = bnIsProbablePrime; + + // JSBN-specific extension + BigInteger.prototype.square = bnSquare; + + // Expose the Barrett function + BigInteger.prototype.Barrett = Barrett + + // BigInteger interfaces not implemented in jsbn: + + // BigInteger(int signum, byte[] magnitude) + // double doubleValue() + // float floatValue() + // int hashCode() + // long longValue() + // static BigInteger valueOf(long val) + + // Random number generator - requires a PRNG backend, e.g. prng4.js + + // For best results, put code like + // + // in your main HTML document. + + var rng_state; + var rng_pool; + var rng_pptr; + + // Mix in a 32-bit integer into the pool + function rng_seed_int(x) { + rng_pool[rng_pptr++] ^= x & 255; + rng_pool[rng_pptr++] ^= (x >> 8) & 255; + rng_pool[rng_pptr++] ^= (x >> 16) & 255; + rng_pool[rng_pptr++] ^= (x >> 24) & 255; + if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; + } + + // Mix in the current time (w/milliseconds) into the pool + function rng_seed_time() { + rng_seed_int(new Date().getTime()); + } + + // Initialize the pool with junk if needed. + if(rng_pool == null) { + rng_pool = new Array(); + rng_pptr = 0; + var t; + if(typeof window !== "undefined" && window.crypto) { + if (window.crypto.getRandomValues) { + // Use webcrypto if available + var ua = new Uint8Array(32); + window.crypto.getRandomValues(ua); + for(t = 0; t < 32; ++t) + rng_pool[rng_pptr++] = ua[t]; + } + else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { + // Extract entropy (256 bits) from NS4 RNG if available + var z = window.crypto.random(32); + for(t = 0; t < z.length; ++t) + rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; + } + } + while(rng_pptr < rng_psize) { // extract some randomness from Math.random() + t = Math.floor(65536 * Math.random()); + rng_pool[rng_pptr++] = t >>> 8; + rng_pool[rng_pptr++] = t & 255; + } + rng_pptr = 0; + rng_seed_time(); + //rng_seed_int(window.screenX); + //rng_seed_int(window.screenY); + } + + function rng_get_byte() { + if(rng_state == null) { + rng_seed_time(); + rng_state = prng_newstate(); + rng_state.init(rng_pool); + for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) + rng_pool[rng_pptr] = 0; + rng_pptr = 0; + //rng_pool = null; + } + // TODO: allow reseeding after first request + return rng_state.next(); + } + + function rng_get_bytes(ba) { + var i; + for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); + } + + function SecureRandom() {} + + SecureRandom.prototype.nextBytes = rng_get_bytes; + + // prng4.js - uses Arcfour as a PRNG + + function Arcfour() { + this.i = 0; + this.j = 0; + this.S = new Array(); + } + + // Initialize arcfour context from key, an array of ints, each from [0..255] + function ARC4init(key) { + var i, j, t; + for(i = 0; i < 256; ++i) + this.S[i] = i; + j = 0; + for(i = 0; i < 256; ++i) { + j = (j + this.S[i] + key[i % key.length]) & 255; + t = this.S[i]; + this.S[i] = this.S[j]; + this.S[j] = t; + } + this.i = 0; + this.j = 0; + } + + function ARC4next() { + var t; + this.i = (this.i + 1) & 255; + this.j = (this.j + this.S[this.i]) & 255; + t = this.S[this.i]; + this.S[this.i] = this.S[this.j]; + this.S[this.j] = t; + return this.S[(t + this.S[this.i]) & 255]; + } + + Arcfour.prototype.init = ARC4init; + Arcfour.prototype.next = ARC4next; + + // Plug in your RNG constructor here + function prng_newstate() { + return new Arcfour(); + } + + // Pool size must be a multiple of 4 and greater than 32. + // An array of bytes the size of the pool will be passed to init() + var rng_psize = 256; + + BigInteger.SecureRandom = SecureRandom; + BigInteger.BigInteger = BigInteger; + if (true) { + exports = module.exports = BigInteger; + } else {} + +}).call(this); + + +/***/ }), + +/***/ 78146: +/***/ ((__unused_webpack_module, exports) => { + +//TODO: handle reviver/dehydrate function like normal +//and handle indentation, like normal. +//if anyone needs this... please send pull request. + +exports.stringify = function stringify (o) { + if('undefined' == typeof o) return o + + if(o && Buffer.isBuffer(o)) + return JSON.stringify(':base64:' + o.toString('base64')) + + if(o && o.toJSON) + o = o.toJSON() + + if(o && 'object' === typeof o) { + var s = '' + var array = Array.isArray(o) + s = array ? '[' : '{' + var first = true + + for(var k in o) { + var ignore = 'function' == typeof o[k] || (!array && 'undefined' === typeof o[k]) + if(Object.hasOwnProperty.call(o, k) && !ignore) { + if(!first) + s += ',' + first = false + if (array) { + if(o[k] == undefined) + s += 'null' + else + s += stringify(o[k]) + } else if (o[k] !== void(0)) { + s += stringify(k) + ':' + stringify(o[k]) + } + } + } + + s += array ? ']' : '}' + + return s + } else if ('string' === typeof o) { + return JSON.stringify(/^:/.test(o) ? ':' + o : o) + } else if ('undefined' === typeof o) { + return 'null'; + } else + return JSON.stringify(o) +} + +exports.parse = function (s) { + return JSON.parse(s, function (key, value) { + if('string' === typeof value) { + if(/^:base64:/.test(value)) + return Buffer.from(value.substring(8), 'base64') + else + return /^:/.test(value) ? value.substring(1) : value + } + return value + }) +} + + +/***/ }), + +/***/ 21263: +/***/ ((module) => { + +"use strict"; + + +var traverse = module.exports = function (schema, opts, cb) { + // Legacy support for v0.3.1 and earlier. + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + + cb = opts.cb || cb; + var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; + var post = cb.post || function() {}; + + _traverse(opts, pre, post, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + default: true, + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i schema.maxItems){ + addError("There must be a maximum of " + schema.maxItems + " in the array"); + } + }else if(schema.properties || schema.additionalProperties){ + errors.concat(checkObj(value, schema.properties, path, schema.additionalProperties)); + } + if(schema.pattern && typeof value == 'string' && !value.match(schema.pattern)){ + addError("does not match the regex pattern " + schema.pattern); + } + if(schema.maxLength && typeof value == 'string' && value.length > schema.maxLength){ + addError("may only be " + schema.maxLength + " characters long"); + } + if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){ + addError("must be at least " + schema.minLength + " characters long"); + } + if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum && + schema.minimum > value){ + addError("must have a minimum value of " + schema.minimum); + } + if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum && + schema.maximum < value){ + addError("must have a maximum value of " + schema.maximum); + } + if(schema['enum']){ + var enumer = schema['enum']; + l = enumer.length; + var found; + for(var j = 0; j < l; j++){ + if(enumer[j]===value){ + found=1; + break; + } + } + if(!found){ + addError("does not have a value in the enumeration " + enumer.join(", ")); + } + } + if(typeof schema.maxDecimal == 'number' && + (value.toString().match(new RegExp("\\.[0-9]{" + (schema.maxDecimal + 1) + ",}")))){ + addError("may only have " + schema.maxDecimal + " digits of decimal places"); + } + } + } + return null; + } + // validate an object against a schema + function checkObj(instance,objTypeDef,path,additionalProp){ + + if(typeof objTypeDef =='object'){ + if(typeof instance != 'object' || instance instanceof Array){ + errors.push({property:path,message:"an object is required"}); + } + + for(var i in objTypeDef){ + if(objTypeDef.hasOwnProperty(i)){ + var value = instance[i]; + // skip _not_ specified properties + if (value === undefined && options.existingOnly) continue; + var propDef = objTypeDef[i]; + // set default + if(value === undefined && propDef["default"]){ + value = instance[i] = propDef["default"]; + } + if(options.coerce && i in instance){ + value = instance[i] = options.coerce(value, propDef); + } + checkProp(value,propDef,path,i); + } + } + } + for(i in instance){ + if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_') && objTypeDef && !objTypeDef[i] && additionalProp===false){ + if (options.filter) { + delete instance[i]; + continue; + } else { + errors.push({property:path,message:(typeof value) + "The property " + i + + " is not defined in the schema and the schema does not allow additional properties"}); + } + } + var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires; + if(requires && !(requires in instance)){ + errors.push({property:path,message:"the presence of the property " + i + " requires that " + requires + " also be present"}); + } + value = instance[i]; + if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){ + if(options.coerce){ + value = instance[i] = options.coerce(value, additionalProp); + } + checkProp(value,additionalProp,path,i); + } + if(!_changing && value && value.$schema){ + errors = errors.concat(checkProp(value,value.$schema,path,i)); + } + } + return errors; + } + if(schema){ + checkProp(instance,schema,'',_changing || ''); + } + if(!_changing && instance && instance.$schema){ + checkProp(instance,instance.$schema,'',''); + } + return {valid:!errors.length,errors:errors}; +}; +exports.mustBeValid = function(result){ + // summary: + // This checks to ensure that the result is valid and will throw an appropriate error message if it is not + // result: the result returned from checkPropertyChange or validate + if(!result.valid){ + throw new TypeError(result.errors.map(function(error){return "for property " + error.property + ': ' + error.message;}).join(", \n")); + } +} + +return exports; +})); + + +/***/ }), + +/***/ 18849: +/***/ ((module, exports) => { + +exports = module.exports = stringify +exports.getSerialize = serializer + +function stringify(obj, replacer, spaces, cycleReplacer) { + return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) +} + +function serializer(replacer, cycleReplacer) { + var stack = [], keys = [] + + if (cycleReplacer == null) cycleReplacer = function(key, value) { + if (stack[0] === value) return "[Circular ~]" + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" + } + + return function(key, value) { + if (stack.length > 0) { + var thisPos = stack.indexOf(this) + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) + if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) + } + else stack.push(value) + + return replacer == null ? value : replacer.call(this, key, value) + } +} + + +/***/ }), + +/***/ 47523: +/***/ (function(module, exports, __nccwpck_require__) { + +(function (global, factory) { + true ? factory(exports) : + 0; +}(this, function (exports) { 'use strict'; + + function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } + } + + function _construct(Parent, args, Class) { + if (isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + + return _construct.apply(null, arguments); + } + + function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; + } + + function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !_isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct(Class, arguments, _getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return _setPrototypeOf(Wrapper, Class); + }; + + return _wrapNativeSuper(Class); + } + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); + } + + /* eslint-disable no-eval */ + var globalEval = eval; // eslint-disable-next-line import/no-commonjs + + var supportsNodeVM = true && Boolean(module.exports) && !(typeof navigator !== 'undefined' && navigator.product === 'ReactNative'); + var allowedResultTypes = ['value', 'path', 'pointer', 'parent', 'parentProperty', 'all']; + var hasOwnProp = Object.prototype.hasOwnProperty; + /** + * Copy items out of one array into another. + * @param {Array} source Array with items to copy + * @param {Array} target Array to which to copy + * @param {Function} conditionCb Callback passed the current item; will move + * item if evaluates to `true` + * @returns {undefined} + */ + + var moveToAnotherArray = function moveToAnotherArray(source, target, conditionCb) { + var il = source.length; + + for (var i = 0; i < il; i++) { + var item = source[i]; + + if (conditionCb(item)) { + target.push(source.splice(i--, 1)[0]); + } + } + }; + + var vm = supportsNodeVM ? __nccwpck_require__(26144) : { + /** + * @param {string} expr Expression to evaluate + * @param {Object} context Object whose items will be added to evaluation + * @returns {*} Result of evaluated code + */ + runInNewContext: function runInNewContext(expr, context) { + var keys = Object.keys(context); + var funcs = []; + moveToAnotherArray(keys, funcs, function (key) { + return typeof context[key] === 'function'; + }); + var code = funcs.reduce(function (s, func) { + var fString = context[func].toString(); + + if (!/function/.exec(fString)) { + fString = 'function ' + fString; + } + + return 'var ' + func + '=' + fString + ';' + s; + }, '') + keys.reduce(function (s, vr) { + return 'var ' + vr + '=' + JSON.stringify(context[vr]).replace( // http://www.thespanner.co.uk/2011/07/25/the-json-specification-is-now-wrong/ + /\u2028|\u2029/g, function (m) { + return "\\u202" + (m === "\u2028" ? '8' : '9'); + }) + ';' + s; + }, expr); + return globalEval(code); + } + }; + /** + * Copies array and then pushes item into it. + * @param {Array} arr Array to copy and into which to push + * @param {*} item Array item to add (to end) + * @returns {Array} Copy of the original array + */ + + function push(arr, item) { + arr = arr.slice(); + arr.push(item); + return arr; + } + /** + * Copies array and then unshifts item into it. + * @param {*} item Array item to add (to beginning) + * @param {Array} arr Array to copy and into which to unshift + * @returns {Array} Copy of the original array + */ + + + function unshift(item, arr) { + arr = arr.slice(); + arr.unshift(item); + return arr; + } + /** + * Caught when JSONPath is used without `new` but rethrown if with `new` + * @extends Error + */ + + + var NewError = + /*#__PURE__*/ + function (_Error) { + _inherits(NewError, _Error); + + /** + * @param {*} value The evaluated scalar value + */ + function NewError(value) { + var _this; + + _classCallCheck(this, NewError); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(NewError).call(this, 'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')); + _this.avoidNew = true; + _this.value = value; + _this.name = 'NewError'; + return _this; + } + + return NewError; + }(_wrapNativeSuper(Error)); + /** + * @param {Object} [opts] If present, must be an object + * @param {string} expr JSON path to evaluate + * @param {JSON} obj JSON object to evaluate against + * @param {Function} callback Passed 3 arguments: 1) desired payload per `resultType`, + * 2) `"value"|"property"`, 3) Full returned object with all payloads + * @param {Function} otherTypeCallback If `@other()` is at the end of one's query, this + * will be invoked with the value of the item, its path, its parent, and its parent's + * property name, and it should return a boolean indicating whether the supplied value + * belongs to the "other" type or not (or it may handle transformations and return `false`). + * @returns {JSONPath} + * @class + */ + + + function JSONPath(opts, expr, obj, callback, otherTypeCallback) { + // eslint-disable-next-line no-restricted-syntax + if (!(this instanceof JSONPath)) { + try { + return new JSONPath(opts, expr, obj, callback, otherTypeCallback); + } catch (e) { + if (!e.avoidNew) { + throw e; + } + + return e.value; + } + } + + if (typeof opts === 'string') { + otherTypeCallback = callback; + callback = obj; + obj = expr; + expr = opts; + opts = {}; + } + + opts = opts || {}; + var objArgs = hasOwnProp.call(opts, 'json') && hasOwnProp.call(opts, 'path'); + this.json = opts.json || obj; + this.path = opts.path || expr; + this.resultType = opts.resultType && opts.resultType.toLowerCase() || 'value'; + this.flatten = opts.flatten || false; + this.wrap = hasOwnProp.call(opts, 'wrap') ? opts.wrap : true; + this.sandbox = opts.sandbox || {}; + this.preventEval = opts.preventEval || false; + this.parent = opts.parent || null; + this.parentProperty = opts.parentProperty || null; + this.callback = opts.callback || callback || null; + + this.otherTypeCallback = opts.otherTypeCallback || otherTypeCallback || function () { + throw new Error('You must supply an otherTypeCallback callback option with the @other() operator.'); + }; + + if (opts.autostart !== false) { + var ret = this.evaluate({ + path: objArgs ? opts.path : expr, + json: objArgs ? opts.json : obj + }); + + if (!ret || _typeof(ret) !== 'object') { + throw new NewError(ret); + } + + return ret; + } + } // PUBLIC METHODS + + + JSONPath.prototype.evaluate = function (expr, json, callback, otherTypeCallback) { + var that = this; + var currParent = this.parent, + currParentProperty = this.parentProperty; + var flatten = this.flatten, + wrap = this.wrap; + this.currResultType = this.resultType; + this.currPreventEval = this.preventEval; + this.currSandbox = this.sandbox; + callback = callback || this.callback; + this.currOtherTypeCallback = otherTypeCallback || this.otherTypeCallback; + json = json || this.json; + expr = expr || this.path; + + if (expr && _typeof(expr) === 'object') { + if (!expr.path) { + throw new Error('You must supply a "path" property when providing an object argument to JSONPath.evaluate().'); + } + + json = hasOwnProp.call(expr, 'json') ? expr.json : json; + flatten = hasOwnProp.call(expr, 'flatten') ? expr.flatten : flatten; + this.currResultType = hasOwnProp.call(expr, 'resultType') ? expr.resultType : this.currResultType; + this.currSandbox = hasOwnProp.call(expr, 'sandbox') ? expr.sandbox : this.currSandbox; + wrap = hasOwnProp.call(expr, 'wrap') ? expr.wrap : wrap; + this.currPreventEval = hasOwnProp.call(expr, 'preventEval') ? expr.preventEval : this.currPreventEval; + callback = hasOwnProp.call(expr, 'callback') ? expr.callback : callback; + this.currOtherTypeCallback = hasOwnProp.call(expr, 'otherTypeCallback') ? expr.otherTypeCallback : this.currOtherTypeCallback; + currParent = hasOwnProp.call(expr, 'parent') ? expr.parent : currParent; + currParentProperty = hasOwnProp.call(expr, 'parentProperty') ? expr.parentProperty : currParentProperty; + expr = expr.path; + } + + currParent = currParent || null; + currParentProperty = currParentProperty || null; + + if (Array.isArray(expr)) { + expr = JSONPath.toPathString(expr); + } + + if (!expr || !json || !allowedResultTypes.includes(this.currResultType)) { + return undefined; + } + + this._obj = json; + var exprList = JSONPath.toPathArray(expr); + + if (exprList[0] === '$' && exprList.length > 1) { + exprList.shift(); + } + + this._hasParentSelector = null; + + var result = this._trace(exprList, json, ['$'], currParent, currParentProperty, callback).filter(function (ea) { + return ea && !ea.isParentSelector; + }); + + if (!result.length) { + return wrap ? [] : undefined; + } + + if (result.length === 1 && !wrap && !Array.isArray(result[0].value)) { + return this._getPreferredOutput(result[0]); + } + + return result.reduce(function (rslt, ea) { + var valOrPath = that._getPreferredOutput(ea); + + if (flatten && Array.isArray(valOrPath)) { + rslt = rslt.concat(valOrPath); + } else { + rslt.push(valOrPath); + } + + return rslt; + }, []); + }; // PRIVATE METHODS + + + JSONPath.prototype._getPreferredOutput = function (ea) { + var resultType = this.currResultType; + + switch (resultType) { + default: + throw new TypeError('Unknown result type'); + + case 'all': + ea.pointer = JSONPath.toPointer(ea.path); + ea.path = typeof ea.path === 'string' ? ea.path : JSONPath.toPathString(ea.path); + return ea; + + case 'value': + case 'parent': + case 'parentProperty': + return ea[resultType]; + + case 'path': + return JSONPath.toPathString(ea[resultType]); + + case 'pointer': + return JSONPath.toPointer(ea.path); + } + }; + + JSONPath.prototype._handleCallback = function (fullRetObj, callback, type) { + if (callback) { + var preferredOutput = this._getPreferredOutput(fullRetObj); + + fullRetObj.path = typeof fullRetObj.path === 'string' ? fullRetObj.path : JSONPath.toPathString(fullRetObj.path); // eslint-disable-next-line callback-return + + callback(preferredOutput, type, fullRetObj); + } + }; + + JSONPath.prototype._trace = function (expr, val, path, parent, parentPropName, callback, literalPriority) { + // No expr to follow? return path and value as the result of this trace branch + var retObj; + var that = this; + + if (!expr.length) { + retObj = { + path: path, + value: val, + parent: parent, + parentProperty: parentPropName + }; + + this._handleCallback(retObj, callback, 'value'); + + return retObj; + } + + var loc = expr[0], + x = expr.slice(1); // We need to gather the return value of recursive trace calls in order to + // do the parent sel computation. + + var ret = []; + + function addRet(elems) { + if (Array.isArray(elems)) { + // This was causing excessive stack size in Node (with or without Babel) against our performance test: `ret.push(...elems);` + elems.forEach(function (t) { + ret.push(t); + }); + } else { + ret.push(elems); + } + } + + if ((typeof loc !== 'string' || literalPriority) && val && hasOwnProp.call(val, loc)) { + // simple case--directly follow property + addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback)); + } else if (loc === '*') { + // all child properties + // eslint-disable-next-line no-shadow + this._walk(loc, x, val, path, parent, parentPropName, callback, function (m, l, x, v, p, par, pr, cb) { + addRet(that._trace(unshift(m, x), v, p, par, pr, cb, true)); + }); + } else if (loc === '..') { + // all descendent parent properties + addRet(this._trace(x, val, path, parent, parentPropName, callback)); // Check remaining expression with val's immediate children + // eslint-disable-next-line no-shadow + + this._walk(loc, x, val, path, parent, parentPropName, callback, function (m, l, x, v, p, par, pr, cb) { + // We don't join m and x here because we only want parents, not scalar values + if (_typeof(v[m]) === 'object') { + // Keep going with recursive descent on val's object children + addRet(that._trace(unshift(l, x), v[m], push(p, m), v, m, cb)); + } + }); // The parent sel computation is handled in the frame above using the + // ancestor object of val + + } else if (loc === '^') { + // This is not a final endpoint, so we do not invoke the callback here + this._hasParentSelector = true; + return path.length ? { + path: path.slice(0, -1), + expr: x, + isParentSelector: true + } : []; + } else if (loc === '~') { + // property name + retObj = { + path: push(path, loc), + value: parentPropName, + parent: parent, + parentProperty: null + }; + + this._handleCallback(retObj, callback, 'property'); + + return retObj; + } else if (loc === '$') { + // root only + addRet(this._trace(x, val, path, null, null, callback)); + } else if (/^(-?\d*):(-?\d*):?(\d*)$/.test(loc)) { + // [start:end:step] Python slice syntax + addRet(this._slice(loc, x, val, path, parent, parentPropName, callback)); + } else if (loc.indexOf('?(') === 0) { + // [?(expr)] (filtering) + if (this.currPreventEval) { + throw new Error('Eval [?(expr)] prevented in JSONPath expression.'); + } // eslint-disable-next-line no-shadow + + + this._walk(loc, x, val, path, parent, parentPropName, callback, function (m, l, x, v, p, par, pr, cb) { + if (that._eval(l.replace(/^\?\((.*?)\)$/, '$1'), v[m], m, p, par, pr)) { + addRet(that._trace(unshift(m, x), v, p, par, pr, cb)); + } + }); + } else if (loc[0] === '(') { + // [(expr)] (dynamic property/index) + if (this.currPreventEval) { + throw new Error('Eval [(expr)] prevented in JSONPath expression.'); + } // As this will resolve to a property name (but we don't know it yet), property and parent information is relative to the parent of the property to which this expression will resolve + + + addRet(this._trace(unshift(this._eval(loc, val, path[path.length - 1], path.slice(0, -1), parent, parentPropName), x), val, path, parent, parentPropName, callback)); + } else if (loc[0] === '@') { + // value type: @boolean(), etc. + var addType = false; + var valueType = loc.slice(1, -2); + + switch (valueType) { + default: + throw new TypeError('Unknown value type ' + valueType); + + case 'scalar': + if (!val || !['object', 'function'].includes(_typeof(val))) { + addType = true; + } + + break; + + case 'boolean': + case 'string': + case 'undefined': + case 'function': + if (_typeof(val) === valueType) { + // eslint-disable-line valid-typeof + addType = true; + } + + break; + + case 'number': + if (_typeof(val) === valueType && isFinite(val)) { + // eslint-disable-line valid-typeof + addType = true; + } + + break; + + case 'nonFinite': + if (typeof val === 'number' && !isFinite(val)) { + addType = true; + } + + break; + + case 'object': + if (val && _typeof(val) === valueType) { + // eslint-disable-line valid-typeof + addType = true; + } + + break; + + case 'array': + if (Array.isArray(val)) { + addType = true; + } + + break; + + case 'other': + addType = this.currOtherTypeCallback(val, path, parent, parentPropName); + break; + + case 'integer': + if (val === Number(val) && isFinite(val) && !(val % 1)) { + addType = true; + } + + break; + + case 'null': + if (val === null) { + addType = true; + } + + break; + } + + if (addType) { + retObj = { + path: path, + value: val, + parent: parent, + parentProperty: parentPropName + }; + + this._handleCallback(retObj, callback, 'value'); + + return retObj; + } + } else if (loc[0] === '`' && val && hasOwnProp.call(val, loc.slice(1))) { + // `-escaped property + var locProp = loc.slice(1); + addRet(this._trace(x, val[locProp], push(path, locProp), val, locProp, callback, true)); + } else if (loc.includes(',')) { + // [name1,name2,...] + var parts = loc.split(','); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var part = _step.value; + addRet(this._trace(unshift(part, x), val, path, parent, parentPropName, callback)); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } else if (!literalPriority && val && hasOwnProp.call(val, loc)) { + // simple case--directly follow property + addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, true)); + } // We check the resulting values for parent selections. For parent + // selections we discard the value object and continue the trace with the + // current val object + + + if (this._hasParentSelector) { + // eslint-disable-next-line unicorn/no-for-loop + for (var t = 0; t < ret.length; t++) { + var rett = ret[t]; + + if (rett.isParentSelector) { + var tmp = that._trace(rett.expr, val, rett.path, parent, parentPropName, callback); + + if (Array.isArray(tmp)) { + ret[t] = tmp[0]; + var tl = tmp.length; + + for (var tt = 1; tt < tl; tt++) { + t++; + ret.splice(t, 0, tmp[tt]); + } + } else { + ret[t] = tmp; + } + } + } + } + + return ret; + }; + + JSONPath.prototype._walk = function (loc, expr, val, path, parent, parentPropName, callback, f) { + if (Array.isArray(val)) { + var n = val.length; + + for (var i = 0; i < n; i++) { + f(i, loc, expr, val, path, parent, parentPropName, callback); + } + } else if (_typeof(val) === 'object') { + for (var m in val) { + if (hasOwnProp.call(val, m)) { + f(m, loc, expr, val, path, parent, parentPropName, callback); + } + } + } + }; + + JSONPath.prototype._slice = function (loc, expr, val, path, parent, parentPropName, callback) { + if (!Array.isArray(val)) { + return undefined; + } + + var len = val.length, + parts = loc.split(':'), + step = parts[2] && parseInt(parts[2]) || 1; + var start = parts[0] && parseInt(parts[0]) || 0, + end = parts[1] && parseInt(parts[1]) || len; + start = start < 0 ? Math.max(0, start + len) : Math.min(len, start); + end = end < 0 ? Math.max(0, end + len) : Math.min(len, end); + var ret = []; + + for (var i = start; i < end; i += step) { + var tmp = this._trace(unshift(i, expr), val, path, parent, parentPropName, callback); + + if (Array.isArray(tmp)) { + // This was causing excessive stack size in Node (with or without Babel) against our performance test: `ret.push(...tmp);` + tmp.forEach(function (t) { + ret.push(t); + }); + } else { + ret.push(tmp); + } + } + + return ret; + }; + + JSONPath.prototype._eval = function (code, _v, _vname, path, parent, parentPropName) { + if (!this._obj || !_v) { + return false; + } + + if (code.includes('@parentProperty')) { + this.currSandbox._$_parentProperty = parentPropName; + code = code.replace(/@parentProperty/g, '_$_parentProperty'); + } + + if (code.includes('@parent')) { + this.currSandbox._$_parent = parent; + code = code.replace(/@parent/g, '_$_parent'); + } + + if (code.includes('@property')) { + this.currSandbox._$_property = _vname; + code = code.replace(/@property/g, '_$_property'); + } + + if (code.includes('@path')) { + this.currSandbox._$_path = JSONPath.toPathString(path.concat([_vname])); + code = code.replace(/@path/g, '_$_path'); + } + + if (code.match(/@([.\s)[])/)) { + this.currSandbox._$_v = _v; + code = code.replace(/@([.\s)[])/g, '_$_v$1'); + } + + try { + return vm.runInNewContext(code, this.currSandbox); + } catch (e) { + // eslint-disable-next-line no-console + console.log(e); + throw new Error('jsonPath: ' + e.message + ': ' + code); + } + }; // PUBLIC CLASS PROPERTIES AND METHODS + // Could store the cache object itself + + + JSONPath.cache = {}; + /** + * @param {string[]} pathArr Array to convert + * @returns {string} The path string + */ + + JSONPath.toPathString = function (pathArr) { + var x = pathArr, + n = x.length; + var p = '$'; + + for (var i = 1; i < n; i++) { + if (!/^(~|\^|@.*?\(\))$/.test(x[i])) { + p += /^[0-9*]+$/.test(x[i]) ? '[' + x[i] + ']' : "['" + x[i] + "']"; + } + } + + return p; + }; + /** + * @param {string} pointer JSON Path + * @returns {string} JSON Pointer + */ + + + JSONPath.toPointer = function (pointer) { + var x = pointer, + n = x.length; + var p = ''; + + for (var i = 1; i < n; i++) { + if (!/^(~|\^|@.*?\(\))$/.test(x[i])) { + p += '/' + x[i].toString().replace(/~/g, '~0').replace(/\//g, '~1'); + } + } + + return p; + }; + /** + * @param {string} expr Expression to convert + * @returns {string[]} + */ + + + JSONPath.toPathArray = function (expr) { + var cache = JSONPath.cache; + + if (cache[expr]) { + return cache[expr].concat(); + } + + var subx = []; + var normalized = expr // Properties + .replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g, ';$&;') // Parenthetical evaluations (filtering and otherwise), directly + // within brackets or single quotes + .replace(/[['](\??\(.*?\))[\]']/g, function ($0, $1) { + return '[#' + (subx.push($1) - 1) + ']'; + }) // Escape periods and tildes within properties + .replace(/\['([^'\]]*)'\]/g, function ($0, prop) { + return "['" + prop.replace(/\./g, '%@%').replace(/~/g, '%%@@%%') + "']"; + }) // Properties operator + .replace(/~/g, ';~;') // Split by property boundaries + .replace(/'?\.'?(?![^[]*\])|\['?/g, ';') // Reinsert periods within properties + .replace(/%@%/g, '.') // Reinsert tildes within properties + .replace(/%%@@%%/g, '~') // Parent + .replace(/(?:;)?(\^+)(?:;)?/g, function ($0, ups) { + return ';' + ups.split('').join(';') + ';'; + }) // Descendents + .replace(/;;;|;;/g, ';..;') // Remove trailing + .replace(/;$|'?\]|'$/g, ''); + var exprList = normalized.split(';').map(function (exp) { + var match = exp.match(/#(\d+)/); + return !match || !match[1] ? exp : subx[match[1]]; + }); + cache[expr] = exprList; + return cache[expr]; + }; + + exports.JSONPath = JSONPath; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); + + +/***/ }), + +/***/ 25738: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +/* + * lib/jsprim.js: utilities for primitive JavaScript types + */ + +var mod_assert = __nccwpck_require__(41706); +var mod_util = __nccwpck_require__(73837); + +var mod_extsprintf = __nccwpck_require__(40122); +var mod_verror = __nccwpck_require__(32154); +var mod_jsonschema = __nccwpck_require__(50176); + +/* + * Public interface + */ +exports.deepCopy = deepCopy; +exports.deepEqual = deepEqual; +exports.isEmpty = isEmpty; +exports.hasKey = hasKey; +exports.forEachKey = forEachKey; +exports.pluck = pluck; +exports.flattenObject = flattenObject; +exports.flattenIter = flattenIter; +exports.validateJsonObject = validateJsonObjectJS; +exports.validateJsonObjectJS = validateJsonObjectJS; +exports.randElt = randElt; +exports.extraProperties = extraProperties; +exports.mergeObjects = mergeObjects; + +exports.startsWith = startsWith; +exports.endsWith = endsWith; + +exports.parseInteger = parseInteger; + +exports.iso8601 = iso8601; +exports.rfc1123 = rfc1123; +exports.parseDateTime = parseDateTime; + +exports.hrtimediff = hrtimeDiff; +exports.hrtimeDiff = hrtimeDiff; +exports.hrtimeAccum = hrtimeAccum; +exports.hrtimeAdd = hrtimeAdd; +exports.hrtimeNanosec = hrtimeNanosec; +exports.hrtimeMicrosec = hrtimeMicrosec; +exports.hrtimeMillisec = hrtimeMillisec; + + +/* + * Deep copy an acyclic *basic* Javascript object. This only handles basic + * scalars (strings, numbers, booleans) and arbitrarily deep arrays and objects + * containing these. This does *not* handle instances of other classes. + */ +function deepCopy(obj) +{ + var ret, key; + var marker = '__deepCopy'; + + if (obj && obj[marker]) + throw (new Error('attempted deep copy of cyclic object')); + + if (obj && obj.constructor == Object) { + ret = {}; + obj[marker] = true; + + for (key in obj) { + if (key == marker) + continue; + + ret[key] = deepCopy(obj[key]); + } + + delete (obj[marker]); + return (ret); + } + + if (obj && obj.constructor == Array) { + ret = []; + obj[marker] = true; + + for (key = 0; key < obj.length; key++) + ret.push(deepCopy(obj[key])); + + delete (obj[marker]); + return (ret); + } + + /* + * It must be a primitive type -- just return it. + */ + return (obj); +} + +function deepEqual(obj1, obj2) +{ + if (typeof (obj1) != typeof (obj2)) + return (false); + + if (obj1 === null || obj2 === null || typeof (obj1) != 'object') + return (obj1 === obj2); + + if (obj1.constructor != obj2.constructor) + return (false); + + var k; + for (k in obj1) { + if (!obj2.hasOwnProperty(k)) + return (false); + + if (!deepEqual(obj1[k], obj2[k])) + return (false); + } + + for (k in obj2) { + if (!obj1.hasOwnProperty(k)) + return (false); + } + + return (true); +} + +function isEmpty(obj) +{ + var key; + for (key in obj) + return (false); + return (true); +} + +function hasKey(obj, key) +{ + mod_assert.equal(typeof (key), 'string'); + return (Object.prototype.hasOwnProperty.call(obj, key)); +} + +function forEachKey(obj, callback) +{ + for (var key in obj) { + if (hasKey(obj, key)) { + callback(key, obj[key]); + } + } +} + +function pluck(obj, key) +{ + mod_assert.equal(typeof (key), 'string'); + return (pluckv(obj, key)); +} + +function pluckv(obj, key) +{ + if (obj === null || typeof (obj) !== 'object') + return (undefined); + + if (obj.hasOwnProperty(key)) + return (obj[key]); + + var i = key.indexOf('.'); + if (i == -1) + return (undefined); + + var key1 = key.substr(0, i); + if (!obj.hasOwnProperty(key1)) + return (undefined); + + return (pluckv(obj[key1], key.substr(i + 1))); +} + +/* + * Invoke callback(row) for each entry in the array that would be returned by + * flattenObject(data, depth). This is just like flattenObject(data, + * depth).forEach(callback), except that the intermediate array is never + * created. + */ +function flattenIter(data, depth, callback) +{ + doFlattenIter(data, depth, [], callback); +} + +function doFlattenIter(data, depth, accum, callback) +{ + var each; + var key; + + if (depth === 0) { + each = accum.slice(0); + each.push(data); + callback(each); + return; + } + + mod_assert.ok(data !== null); + mod_assert.equal(typeof (data), 'object'); + mod_assert.equal(typeof (depth), 'number'); + mod_assert.ok(depth >= 0); + + for (key in data) { + each = accum.slice(0); + each.push(key); + doFlattenIter(data[key], depth - 1, each, callback); + } +} + +function flattenObject(data, depth) +{ + if (depth === 0) + return ([ data ]); + + mod_assert.ok(data !== null); + mod_assert.equal(typeof (data), 'object'); + mod_assert.equal(typeof (depth), 'number'); + mod_assert.ok(depth >= 0); + + var rv = []; + var key; + + for (key in data) { + flattenObject(data[key], depth - 1).forEach(function (p) { + rv.push([ key ].concat(p)); + }); + } + + return (rv); +} + +function startsWith(str, prefix) +{ + return (str.substr(0, prefix.length) == prefix); +} + +function endsWith(str, suffix) +{ + return (str.substr( + str.length - suffix.length, suffix.length) == suffix); +} + +function iso8601(d) +{ + if (typeof (d) == 'number') + d = new Date(d); + mod_assert.ok(d.constructor === Date); + return (mod_extsprintf.sprintf('%4d-%02d-%02dT%02d:%02d:%02d.%03dZ', + d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate(), + d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), + d.getUTCMilliseconds())); +} + +var RFC1123_MONTHS = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; +var RFC1123_DAYS = [ + 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + +function rfc1123(date) { + return (mod_extsprintf.sprintf('%s, %02d %s %04d %02d:%02d:%02d GMT', + RFC1123_DAYS[date.getUTCDay()], date.getUTCDate(), + RFC1123_MONTHS[date.getUTCMonth()], date.getUTCFullYear(), + date.getUTCHours(), date.getUTCMinutes(), + date.getUTCSeconds())); +} + +/* + * Parses a date expressed as a string, as either a number of milliseconds since + * the epoch or any string format that Date accepts, giving preference to the + * former where these two sets overlap (e.g., small numbers). + */ +function parseDateTime(str) +{ + /* + * This is irritatingly implicit, but significantly more concise than + * alternatives. The "+str" will convert a string containing only a + * number directly to a Number, or NaN for other strings. Thus, if the + * conversion succeeds, we use it (this is the milliseconds-since-epoch + * case). Otherwise, we pass the string directly to the Date + * constructor to parse. + */ + var numeric = +str; + if (!isNaN(numeric)) { + return (new Date(numeric)); + } else { + return (new Date(str)); + } +} + + +/* + * Number.*_SAFE_INTEGER isn't present before node v0.12, so we hardcode + * the ES6 definitions here, while allowing for them to someday be higher. + */ +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; +var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991; + + +/* + * Default options for parseInteger(). + */ +var PI_DEFAULTS = { + base: 10, + allowSign: true, + allowPrefix: false, + allowTrailing: false, + allowImprecise: false, + trimWhitespace: false, + leadingZeroIsOctal: false +}; + +var CP_0 = 0x30; +var CP_9 = 0x39; + +var CP_A = 0x41; +var CP_B = 0x42; +var CP_O = 0x4f; +var CP_T = 0x54; +var CP_X = 0x58; +var CP_Z = 0x5a; + +var CP_a = 0x61; +var CP_b = 0x62; +var CP_o = 0x6f; +var CP_t = 0x74; +var CP_x = 0x78; +var CP_z = 0x7a; + +var PI_CONV_DEC = 0x30; +var PI_CONV_UC = 0x37; +var PI_CONV_LC = 0x57; + + +/* + * A stricter version of parseInt() that provides options for changing what + * is an acceptable string (for example, disallowing trailing characters). + */ +function parseInteger(str, uopts) +{ + mod_assert.string(str, 'str'); + mod_assert.optionalObject(uopts, 'options'); + + var baseOverride = false; + var options = PI_DEFAULTS; + + if (uopts) { + baseOverride = hasKey(uopts, 'base'); + options = mergeObjects(options, uopts); + mod_assert.number(options.base, 'options.base'); + mod_assert.ok(options.base >= 2, 'options.base >= 2'); + mod_assert.ok(options.base <= 36, 'options.base <= 36'); + mod_assert.bool(options.allowSign, 'options.allowSign'); + mod_assert.bool(options.allowPrefix, 'options.allowPrefix'); + mod_assert.bool(options.allowTrailing, + 'options.allowTrailing'); + mod_assert.bool(options.allowImprecise, + 'options.allowImprecise'); + mod_assert.bool(options.trimWhitespace, + 'options.trimWhitespace'); + mod_assert.bool(options.leadingZeroIsOctal, + 'options.leadingZeroIsOctal'); + + if (options.leadingZeroIsOctal) { + mod_assert.ok(!baseOverride, + '"base" and "leadingZeroIsOctal" are ' + + 'mutually exclusive'); + } + } + + var c; + var pbase = -1; + var base = options.base; + var start; + var mult = 1; + var value = 0; + var idx = 0; + var len = str.length; + + /* Trim any whitespace on the left side. */ + if (options.trimWhitespace) { + while (idx < len && isSpace(str.charCodeAt(idx))) { + ++idx; + } + } + + /* Check the number for a leading sign. */ + if (options.allowSign) { + if (str[idx] === '-') { + idx += 1; + mult = -1; + } else if (str[idx] === '+') { + idx += 1; + } + } + + /* Parse the base-indicating prefix if there is one. */ + if (str[idx] === '0') { + if (options.allowPrefix) { + pbase = prefixToBase(str.charCodeAt(idx + 1)); + if (pbase !== -1 && (!baseOverride || pbase === base)) { + base = pbase; + idx += 2; + } + } + + if (pbase === -1 && options.leadingZeroIsOctal) { + base = 8; + } + } + + /* Parse the actual digits. */ + for (start = idx; idx < len; ++idx) { + c = translateDigit(str.charCodeAt(idx)); + if (c !== -1 && c < base) { + value *= base; + value += c; + } else { + break; + } + } + + /* If we didn't parse any digits, we have an invalid number. */ + if (start === idx) { + return (new Error('invalid number: ' + JSON.stringify(str))); + } + + /* Trim any whitespace on the right side. */ + if (options.trimWhitespace) { + while (idx < len && isSpace(str.charCodeAt(idx))) { + ++idx; + } + } + + /* Check for trailing characters. */ + if (idx < len && !options.allowTrailing) { + return (new Error('trailing characters after number: ' + + JSON.stringify(str.slice(idx)))); + } + + /* If our value is 0, we return now, to avoid returning -0. */ + if (value === 0) { + return (0); + } + + /* Calculate our final value. */ + var result = value * mult; + + /* + * If the string represents a value that cannot be precisely represented + * by JavaScript, then we want to check that: + * + * - We never increased the value past MAX_SAFE_INTEGER + * - We don't make the result negative and below MIN_SAFE_INTEGER + * + * Because we only ever increment the value during parsing, there's no + * chance of moving past MAX_SAFE_INTEGER and then dropping below it + * again, losing precision in the process. This means that we only need + * to do our checks here, at the end. + */ + if (!options.allowImprecise && + (value > MAX_SAFE_INTEGER || result < MIN_SAFE_INTEGER)) { + return (new Error('number is outside of the supported range: ' + + JSON.stringify(str.slice(start, idx)))); + } + + return (result); +} + + +/* + * Interpret a character code as a base-36 digit. + */ +function translateDigit(d) +{ + if (d >= CP_0 && d <= CP_9) { + /* '0' to '9' -> 0 to 9 */ + return (d - PI_CONV_DEC); + } else if (d >= CP_A && d <= CP_Z) { + /* 'A' - 'Z' -> 10 to 35 */ + return (d - PI_CONV_UC); + } else if (d >= CP_a && d <= CP_z) { + /* 'a' - 'z' -> 10 to 35 */ + return (d - PI_CONV_LC); + } else { + /* Invalid character code */ + return (-1); + } +} + + +/* + * Test if a value matches the ECMAScript definition of trimmable whitespace. + */ +function isSpace(c) +{ + return (c === 0x20) || + (c >= 0x0009 && c <= 0x000d) || + (c === 0x00a0) || + (c === 0x1680) || + (c === 0x180e) || + (c >= 0x2000 && c <= 0x200a) || + (c === 0x2028) || + (c === 0x2029) || + (c === 0x202f) || + (c === 0x205f) || + (c === 0x3000) || + (c === 0xfeff); +} + + +/* + * Determine which base a character indicates (e.g., 'x' indicates hex). + */ +function prefixToBase(c) +{ + if (c === CP_b || c === CP_B) { + /* 0b/0B (binary) */ + return (2); + } else if (c === CP_o || c === CP_O) { + /* 0o/0O (octal) */ + return (8); + } else if (c === CP_t || c === CP_T) { + /* 0t/0T (decimal) */ + return (10); + } else if (c === CP_x || c === CP_X) { + /* 0x/0X (hexadecimal) */ + return (16); + } else { + /* Not a meaningful character */ + return (-1); + } +} + + +function validateJsonObjectJS(schema, input) +{ + var report = mod_jsonschema.validate(input, schema); + + if (report.errors.length === 0) + return (null); + + /* Currently, we only do anything useful with the first error. */ + var error = report.errors[0]; + + /* The failed property is given by a URI with an irrelevant prefix. */ + var propname = error['property']; + var reason = error['message'].toLowerCase(); + var i, j; + + /* + * There's at least one case where the property error message is + * confusing at best. We work around this here. + */ + if ((i = reason.indexOf('the property ')) != -1 && + (j = reason.indexOf(' is not defined in the schema and the ' + + 'schema does not allow additional properties')) != -1) { + i += 'the property '.length; + if (propname === '') + propname = reason.substr(i, j - i); + else + propname = propname + '.' + reason.substr(i, j - i); + + reason = 'unsupported property'; + } + + var rv = new mod_verror.VError('property "%s": %s', propname, reason); + rv.jsv_details = error; + return (rv); +} + +function randElt(arr) +{ + mod_assert.ok(Array.isArray(arr) && arr.length > 0, + 'randElt argument must be a non-empty array'); + + return (arr[Math.floor(Math.random() * arr.length)]); +} + +function assertHrtime(a) +{ + mod_assert.ok(a[0] >= 0 && a[1] >= 0, + 'negative numbers not allowed in hrtimes'); + mod_assert.ok(a[1] < 1e9, 'nanoseconds column overflow'); +} + +/* + * Compute the time elapsed between hrtime readings A and B, where A is later + * than B. hrtime readings come from Node's process.hrtime(). There is no + * defined way to represent negative deltas, so it's illegal to diff B from A + * where the time denoted by B is later than the time denoted by A. If this + * becomes valuable, we can define a representation and extend the + * implementation to support it. + */ +function hrtimeDiff(a, b) +{ + assertHrtime(a); + assertHrtime(b); + mod_assert.ok(a[0] > b[0] || (a[0] == b[0] && a[1] >= b[1]), + 'negative differences not allowed'); + + var rv = [ a[0] - b[0], 0 ]; + + if (a[1] >= b[1]) { + rv[1] = a[1] - b[1]; + } else { + rv[0]--; + rv[1] = 1e9 - (b[1] - a[1]); + } + + return (rv); +} + +/* + * Convert a hrtime reading from the array format returned by Node's + * process.hrtime() into a scalar number of nanoseconds. + */ +function hrtimeNanosec(a) +{ + assertHrtime(a); + + return (Math.floor(a[0] * 1e9 + a[1])); +} + +/* + * Convert a hrtime reading from the array format returned by Node's + * process.hrtime() into a scalar number of microseconds. + */ +function hrtimeMicrosec(a) +{ + assertHrtime(a); + + return (Math.floor(a[0] * 1e6 + a[1] / 1e3)); +} + +/* + * Convert a hrtime reading from the array format returned by Node's + * process.hrtime() into a scalar number of milliseconds. + */ +function hrtimeMillisec(a) +{ + assertHrtime(a); + + return (Math.floor(a[0] * 1e3 + a[1] / 1e6)); +} + +/* + * Add two hrtime readings A and B, overwriting A with the result of the + * addition. This function is useful for accumulating several hrtime intervals + * into a counter. Returns A. + */ +function hrtimeAccum(a, b) +{ + assertHrtime(a); + assertHrtime(b); + + /* + * Accumulate the nanosecond component. + */ + a[1] += b[1]; + if (a[1] >= 1e9) { + /* + * The nanosecond component overflowed, so carry to the seconds + * field. + */ + a[0]++; + a[1] -= 1e9; + } + + /* + * Accumulate the seconds component. + */ + a[0] += b[0]; + + return (a); +} + +/* + * Add two hrtime readings A and B, returning the result as a new hrtime array. + * Does not modify either input argument. + */ +function hrtimeAdd(a, b) +{ + assertHrtime(a); + + var rv = [ a[0], a[1] ]; + + return (hrtimeAccum(rv, b)); +} + + +/* + * Check an object for unexpected properties. Accepts the object to check, and + * an array of allowed property names (strings). Returns an array of key names + * that were found on the object, but did not appear in the list of allowed + * properties. If no properties were found, the returned array will be of + * zero length. + */ +function extraProperties(obj, allowed) +{ + mod_assert.ok(typeof (obj) === 'object' && obj !== null, + 'obj argument must be a non-null object'); + mod_assert.ok(Array.isArray(allowed), + 'allowed argument must be an array of strings'); + for (var i = 0; i < allowed.length; i++) { + mod_assert.ok(typeof (allowed[i]) === 'string', + 'allowed argument must be an array of strings'); + } + + return (Object.keys(obj).filter(function (key) { + return (allowed.indexOf(key) === -1); + })); +} + +/* + * Given three sets of properties "provided" (may be undefined), "overrides" + * (required), and "defaults" (may be undefined), construct an object containing + * the union of these sets with "overrides" overriding "provided", and + * "provided" overriding "defaults". None of the input objects are modified. + */ +function mergeObjects(provided, overrides, defaults) +{ + var rv, k; + + rv = {}; + if (defaults) { + for (k in defaults) + rv[k] = defaults[k]; + } + + if (provided) { + for (k in provided) + rv[k] = provided[k]; + } + + if (overrides) { + for (k in overrides) + rv[k] = overrides[k]; + } + + return (rv); +} + + +/***/ }), + +/***/ 26554: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const EventEmitter = __nccwpck_require__(82361); +const JSONB = __nccwpck_require__(78146); + +const loadStore = options => { + const adapters = { + redis: '@keyv/redis', + mongodb: '@keyv/mongo', + mongo: '@keyv/mongo', + sqlite: '@keyv/sqlite', + postgresql: '@keyv/postgres', + postgres: '@keyv/postgres', + mysql: '@keyv/mysql', + }; + if (options.adapter || options.uri) { + const adapter = options.adapter || /^[^:]*/.exec(options.uri)[0]; + return new (require(adapters[adapter]))(options); + } + + return new Map(); +}; + +class Keyv extends EventEmitter { + constructor(uri, options) { + super(); + this.opts = Object.assign( + { + namespace: 'keyv', + serialize: JSONB.stringify, + deserialize: JSONB.parse, + }, + (typeof uri === 'string') ? { uri } : uri, + options, + ); + + if (!this.opts.store) { + const adapterOptions = Object.assign({}, this.opts); + this.opts.store = loadStore(adapterOptions); + } + + if (typeof this.opts.store.on === 'function') { + this.opts.store.on('error', error => this.emit('error', error)); + } + + this.opts.store.namespace = this.opts.namespace; + } + + _getKeyPrefix(key) { + return `${this.opts.namespace}:${key}`; + } + + get(key, options) { + const keyPrefixed = this._getKeyPrefix(key); + const { store } = this.opts; + return Promise.resolve() + .then(() => store.get(keyPrefixed)) + .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : data) + .then(data => { + if (data === undefined) { + return undefined; + } + + if (typeof data.expires === 'number' && Date.now() > data.expires) { + this.delete(key); + return undefined; + } + + return (options && options.raw) ? data : data.value; + }); + } + + set(key, value, ttl) { + const keyPrefixed = this._getKeyPrefix(key); + if (typeof ttl === 'undefined') { + ttl = this.opts.ttl; + } + + if (ttl === 0) { + ttl = undefined; + } + + const { store } = this.opts; + + return Promise.resolve() + .then(() => { + const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null; + value = { value, expires }; + return this.opts.serialize(value); + }) + .then(value => store.set(keyPrefixed, value, ttl)) + .then(() => true); + } + + delete(key) { + const keyPrefixed = this._getKeyPrefix(key); + const { store } = this.opts; + return Promise.resolve() + .then(() => store.delete(keyPrefixed)); + } + + clear() { + const { store } = this.opts; + return Promise.resolve() + .then(() => store.clear()); + } +} + +module.exports = Keyv; + + +/***/ }), + +/***/ 29955: +/***/ ((module) => { + +"use strict"; + +module.exports = object => { + const result = {}; + + for (const [key, value] of Object.entries(object)) { + result[key.toLowerCase()] = value; + } + + return result; +}; + + +/***/ }), + +/***/ 31588: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// A linked list to keep track of recently-used-ness +const Yallist = __nccwpck_require__(56128) + +const MAX = Symbol('max') +const LENGTH = Symbol('length') +const LENGTH_CALCULATOR = Symbol('lengthCalculator') +const ALLOW_STALE = Symbol('allowStale') +const MAX_AGE = Symbol('maxAge') +const DISPOSE = Symbol('dispose') +const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') +const LRU_LIST = Symbol('lruList') +const CACHE = Symbol('cache') +const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + +const naiveLength = () => 1 + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +class LRUCache { + constructor (options) { + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + // Kind of weird to have a default max of Infinity, but oh well. + const max = this[MAX] = options.max || Infinity + + const lc = options.length || naiveLength + this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() + } + + // resize the cache when the max changes. + set max (mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') + + this[MAX] = mL || Infinity + trim(this) + } + get max () { + return this[MAX] + } + + set allowStale (allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale () { + return this[ALLOW_STALE] + } + + set maxAge (mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') + + this[MAX_AGE] = mA + trim(this) + } + get maxAge () { + return this[MAX_AGE] + } + + // resize the cache when the lengthCalculator changes. + set lengthCalculator (lC) { + if (typeof lC !== 'function') + lC = naiveLength + + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(hit => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }) + } + trim(this) + } + get lengthCalculator () { return this[LENGTH_CALCULATOR] } + + get length () { return this[LENGTH] } + get itemCount () { return this[LRU_LIST].length } + + rforEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null;) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } + } + + forEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null;) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } + } + + keys () { + return this[LRU_LIST].toArray().map(k => k.key) + } + + values () { + return this[LRU_LIST].toArray().map(k => k.value) + } + + reset () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list + } + + dump () { + return this[LRU_LIST].map(hit => + isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter(h => h) + } + + dumpLru () { + return this[LRU_LIST] + } + + set (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') + + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + const node = this[CACHE].get(key) + const item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value) + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + const hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value) + + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true + } + + has (key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) + } + + get (key) { + return get(this, key, true) + } + + peek (key) { + return get(this, key, false) + } + + pop () { + const node = this[LRU_LIST].tail + if (!node) + return null + + del(this, node) + return node.value + } + + del (key) { + del(this, this[CACHE].get(key)) + } + + load (arr) { + // reset the cache + this.reset() + + const now = Date.now() + // A previous serialized cache has the most recent items first + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const expiresAt = hit.e || 0 + if (expiresAt === 0) + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + else { + const maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } + } + + prune () { + this[CACHE].forEach((value, key) => get(this, key, false)) + } +} + +const get = (self, key, doUse) => { + const node = self[CACHE].get(key) + if (node) { + const hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + return undefined + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now() + self[LRU_LIST].unshiftNode(node) + } + } + return hit.value + } +} + +const isStale = (self, hit) => { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) + return false + + const diff = Date.now() - hit.now + return hit.maxAge ? diff > hit.maxAge + : self[MAX_AGE] && (diff > self[MAX_AGE]) +} + +const trim = self => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + const prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +const del = (self, node) => { + if (node) { + const hit = node.value + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value) + + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +class Entry { + constructor (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } +} + +const forEachStep = (self, fn, node, thisp) => { + let hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + hit = undefined + } + if (hit) + fn.call(thisp, hit.value, hit.key, self) +} + +module.exports = LRUCache + + +/***/ }), + +/***/ 24083: +/***/ ((module, exports) => { + +"use strict"; +// ISC @ Julien Fontanet + + + +// =================================================================== + +var construct = typeof Reflect !== "undefined" ? Reflect.construct : undefined; +var defineProperty = Object.defineProperty; + +// ------------------------------------------------------------------- + +var captureStackTrace = Error.captureStackTrace; +if (captureStackTrace === undefined) { + captureStackTrace = function captureStackTrace(error) { + var container = new Error(); + + defineProperty(error, "stack", { + configurable: true, + get: function getStack() { + var stack = container.stack; + + // Replace property with value for faster future accesses. + defineProperty(this, "stack", { + configurable: true, + value: stack, + writable: true, + }); + + return stack; + }, + set: function setStack(stack) { + defineProperty(error, "stack", { + configurable: true, + value: stack, + writable: true, + }); + }, + }); + }; +} + +// ------------------------------------------------------------------- + +function BaseError(message) { + if (message !== undefined) { + defineProperty(this, "message", { + configurable: true, + value: message, + writable: true, + }); + } + + var cname = this.constructor.name; + if (cname !== undefined && cname !== this.name) { + defineProperty(this, "name", { + configurable: true, + value: cname, + writable: true, + }); + } + + captureStackTrace(this, this.constructor); +} + +BaseError.prototype = Object.create(Error.prototype, { + // See: https://github.com/JsCommunity/make-error/issues/4 + constructor: { + configurable: true, + value: BaseError, + writable: true, + }, +}); + +// ------------------------------------------------------------------- + +// Sets the name of a function if possible (depends of the JS engine). +var setFunctionName = (function() { + function setFunctionName(fn, name) { + return defineProperty(fn, "name", { + configurable: true, + value: name, + }); + } + try { + var f = function() {}; + setFunctionName(f, "foo"); + if (f.name === "foo") { + return setFunctionName; + } + } catch (_) {} +})(); + +// ------------------------------------------------------------------- + +function makeError(constructor, super_) { + if (super_ == null || super_ === Error) { + super_ = BaseError; + } else if (typeof super_ !== "function") { + throw new TypeError("super_ should be a function"); + } + + var name; + if (typeof constructor === "string") { + name = constructor; + constructor = + construct !== undefined + ? function() { + return construct(super_, arguments, this.constructor); + } + : function() { + super_.apply(this, arguments); + }; + + // If the name can be set, do it once and for all. + if (setFunctionName !== undefined) { + setFunctionName(constructor, name); + name = undefined; + } + } else if (typeof constructor !== "function") { + throw new TypeError("constructor should be either a string or a function"); + } + + // Also register the super constructor also as `constructor.super_` just + // like Node's `util.inherits()`. + // + // eslint-disable-next-line dot-notation + constructor.super_ = constructor["super"] = super_; + + var properties = { + constructor: { + configurable: true, + value: constructor, + writable: true, + }, + }; + + // If the name could not be set on the constructor, set it on the + // prototype. + if (name !== undefined) { + properties.name = { + configurable: true, + value: name, + writable: true, + }; + } + constructor.prototype = Object.create(super_.prototype, properties); + + return constructor; +} +exports = module.exports = makeError; +exports.BaseError = BaseError; + + +/***/ }), + +/***/ 1980: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { PassThrough } = __nccwpck_require__(12781); + +module.exports = function (/*streams...*/) { + var sources = [] + var output = new PassThrough({objectMode: true}) + + output.setMaxListeners(0) + + output.add = add + output.isEmpty = isEmpty + + output.on('unpipe', remove) + + Array.prototype.slice.call(arguments).forEach(add) + + return output + + function add (source) { + if (Array.isArray(source)) { + source.forEach(add) + return this + } + + sources.push(source); + source.once('end', remove.bind(null, source)) + source.once('error', output.emit.bind(output, 'error')) + source.pipe(output, {end: false}) + return this + } + + function isEmpty () { + return sources.length == 0; + } + + function remove (source) { + sources = sources.filter(function (it) { return it !== source }) + if (!sources.length && output.readable) { output.end() } + } +} + + +/***/ }), + +/***/ 75063: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = __nccwpck_require__(53765) + + +/***/ }), + +/***/ 38098: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + + + +/** + * Module dependencies. + * @private + */ + +var db = __nccwpck_require__(75063) +var extname = (__nccwpck_require__(71017).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 + } + }) +} + + +/***/ }), + +/***/ 66010: +/***/ ((module) => { + +"use strict"; + + +const mimicFn = (to, from) => { + for (const prop of Reflect.ownKeys(from)) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + + return to; +}; + +module.exports = mimicFn; +// TODO: Remove this for the next major release +module.exports["default"] = mimicFn; + + +/***/ }), + +/***/ 41058: +/***/ ((module) => { + +"use strict"; + + +// We define these manually to ensure they're always copied +// even if they would move up the prototype chain +// https://nodejs.org/api/http.html#http_class_http_incomingmessage +const knownProps = [ + 'destroy', + 'setTimeout', + 'socket', + 'headers', + 'trailers', + 'rawHeaders', + 'statusCode', + 'httpVersion', + 'httpVersionMinor', + 'httpVersionMajor', + 'rawTrailers', + 'statusMessage' +]; + +module.exports = (fromStream, toStream) => { + const fromProps = new Set(Object.keys(fromStream).concat(knownProps)); + + for (const prop of fromProps) { + // Don't overwrite existing properties + if (prop in toStream) { + continue; + } + + toStream[prop] = typeof fromStream[prop] === 'function' ? fromStream[prop].bind(fromStream) : fromStream[prop]; + } +}; + + +/***/ }), + +/***/ 32959: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = __nccwpck_require__(71017) +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = __nccwpck_require__(90308) + +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, '\\$&') +} + + +/***/ }), + +/***/ 27948: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const proc = typeof process === 'object' && process ? process : { + stdout: null, + stderr: null, +} +const EE = __nccwpck_require__(82361) +const Stream = __nccwpck_require__(12781) +const Yallist = __nccwpck_require__(56128) +const SD = (__nccwpck_require__(71576).StringDecoder) + +const EOF = Symbol('EOF') +const MAYBE_EMIT_END = Symbol('maybeEmitEnd') +const EMITTED_END = Symbol('emittedEnd') +const EMITTING_END = Symbol('emittingEnd') +const EMITTED_ERROR = Symbol('emittedError') +const CLOSED = Symbol('closed') +const READ = Symbol('read') +const FLUSH = Symbol('flush') +const FLUSHCHUNK = Symbol('flushChunk') +const ENCODING = Symbol('encoding') +const DECODER = Symbol('decoder') +const FLOWING = Symbol('flowing') +const PAUSED = Symbol('paused') +const RESUME = Symbol('resume') +const BUFFERLENGTH = Symbol('bufferLength') +const BUFFERPUSH = Symbol('bufferPush') +const BUFFERSHIFT = Symbol('bufferShift') +const OBJECTMODE = Symbol('objectMode') +const DESTROYED = Symbol('destroyed') + +// TODO remove when Node v8 support drops +const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' +const ASYNCITERATOR = doIter && Symbol.asyncIterator + || Symbol('asyncIterator not implemented') +const ITERATOR = doIter && Symbol.iterator + || Symbol('iterator not implemented') + +// events that mean 'the stream is over' +// these are treated specially, and re-emitted +// if they are listened for after emitting. +const isEndish = ev => + ev === 'end' || + ev === 'finish' || + ev === 'prefinish' + +const isArrayBuffer = b => b instanceof ArrayBuffer || + typeof b === 'object' && + b.constructor && + b.constructor.name === 'ArrayBuffer' && + b.byteLength >= 0 + +const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) + +module.exports = class Minipass extends Stream { + constructor (options) { + super() + this[FLOWING] = false + // whether we're explicitly paused + this[PAUSED] = false + this.pipes = new Yallist() + this.buffer = new Yallist() + this[OBJECTMODE] = options && options.objectMode || false + if (this[OBJECTMODE]) + this[ENCODING] = null + else + this[ENCODING] = options && options.encoding || null + if (this[ENCODING] === 'buffer') + this[ENCODING] = null + this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null + this[EOF] = false + this[EMITTED_END] = false + this[EMITTING_END] = false + this[CLOSED] = false + this[EMITTED_ERROR] = null + this.writable = true + this.readable = true + this[BUFFERLENGTH] = 0 + this[DESTROYED] = false + } + + get bufferLength () { return this[BUFFERLENGTH] } + + get encoding () { return this[ENCODING] } + set encoding (enc) { + if (this[OBJECTMODE]) + throw new Error('cannot set encoding in objectMode') + + if (this[ENCODING] && enc !== this[ENCODING] && + (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) + throw new Error('cannot change encoding') + + if (this[ENCODING] !== enc) { + this[DECODER] = enc ? new SD(enc) : null + if (this.buffer.length) + this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) + } + + this[ENCODING] = enc + } + + setEncoding (enc) { + this.encoding = enc + } + + get objectMode () { return this[OBJECTMODE] } + set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om } + + write (chunk, encoding, cb) { + if (this[EOF]) + throw new Error('write after end') + + if (this[DESTROYED]) { + this.emit('error', Object.assign( + new Error('Cannot call write after a stream was destroyed'), + { code: 'ERR_STREAM_DESTROYED' } + )) + return true + } + + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + + if (!encoding) + encoding = 'utf8' + + // convert array buffers and typed array views into buffers + // at some point in the future, we may want to do the opposite! + // leave strings and buffers as-is + // anything else switches us into object mode + if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { + if (isArrayBufferView(chunk)) + chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) + else if (isArrayBuffer(chunk)) + chunk = Buffer.from(chunk) + else if (typeof chunk !== 'string') + // use the setter so we throw if we have encoding set + this.objectMode = true + } + + // this ensures at this point that the chunk is a buffer or string + // don't buffer it up or send it to the decoder + if (!this.objectMode && !chunk.length) { + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') + if (cb) + cb() + return this.flowing + } + + // fast-path writing strings of same encoding to a stream with + // an empty buffer, skipping the buffer/decoder dance + if (typeof chunk === 'string' && !this[OBJECTMODE] && + // unless it is a string already ready for us to use + !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { + chunk = Buffer.from(chunk, encoding) + } + + if (Buffer.isBuffer(chunk) && this[ENCODING]) + chunk = this[DECODER].write(chunk) + + if (this.flowing) { + // if we somehow have something in the buffer, but we think we're + // flowing, then we need to flush all that out first, or we get + // chunks coming in out of order. Can't emit 'drain' here though, + // because we're mid-write, so that'd be bad. + if (this[BUFFERLENGTH] !== 0) + this[FLUSH](true) + this.emit('data', chunk) + } else + this[BUFFERPUSH](chunk) + + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') + + if (cb) + cb() + + return this.flowing + } + + read (n) { + if (this[DESTROYED]) + return null + + try { + if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) + return null + + if (this[OBJECTMODE]) + n = null + + if (this.buffer.length > 1 && !this[OBJECTMODE]) { + if (this.encoding) + this.buffer = new Yallist([ + Array.from(this.buffer).join('') + ]) + else + this.buffer = new Yallist([ + Buffer.concat(Array.from(this.buffer), this[BUFFERLENGTH]) + ]) + } + + return this[READ](n || null, this.buffer.head.value) + } finally { + this[MAYBE_EMIT_END]() + } + } + + [READ] (n, chunk) { + if (n === chunk.length || n === null) + this[BUFFERSHIFT]() + else { + this.buffer.head.value = chunk.slice(n) + chunk = chunk.slice(0, n) + this[BUFFERLENGTH] -= n + } + + this.emit('data', chunk) + + if (!this.buffer.length && !this[EOF]) + this.emit('drain') + + return chunk + } + + end (chunk, encoding, cb) { + if (typeof chunk === 'function') + cb = chunk, chunk = null + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + if (chunk) + this.write(chunk, encoding) + if (cb) + this.once('end', cb) + this[EOF] = true + this.writable = false + + // if we haven't written anything, then go ahead and emit, + // even if we're not reading. + // we'll re-emit if a new 'end' listener is added anyway. + // This makes MP more suitable to write-only use cases. + if (this.flowing || !this[PAUSED]) + this[MAYBE_EMIT_END]() + return this + } + + // don't let the internal resume be overwritten + [RESUME] () { + if (this[DESTROYED]) + return + + this[PAUSED] = false + this[FLOWING] = true + this.emit('resume') + if (this.buffer.length) + this[FLUSH]() + else if (this[EOF]) + this[MAYBE_EMIT_END]() + else + this.emit('drain') + } + + resume () { + return this[RESUME]() + } + + pause () { + this[FLOWING] = false + this[PAUSED] = true + } + + get destroyed () { + return this[DESTROYED] + } + + get flowing () { + return this[FLOWING] + } + + get paused () { + return this[PAUSED] + } + + [BUFFERPUSH] (chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1 + else + this[BUFFERLENGTH] += chunk.length + return this.buffer.push(chunk) + } + + [BUFFERSHIFT] () { + if (this.buffer.length) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1 + else + this[BUFFERLENGTH] -= this.buffer.head.value.length + } + return this.buffer.shift() + } + + [FLUSH] (noDrain) { + do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) + + if (!noDrain && !this.buffer.length && !this[EOF]) + this.emit('drain') + } + + [FLUSHCHUNK] (chunk) { + return chunk ? (this.emit('data', chunk), this.flowing) : false + } + + pipe (dest, opts) { + if (this[DESTROYED]) + return + + const ended = this[EMITTED_END] + opts = opts || {} + if (dest === proc.stdout || dest === proc.stderr) + opts.end = false + else + opts.end = opts.end !== false + + const p = { dest: dest, opts: opts, ondrain: _ => this[RESUME]() } + this.pipes.push(p) + + dest.on('drain', p.ondrain) + this[RESUME]() + // piping an ended stream ends immediately + if (ended && p.opts.end) + p.dest.end() + return dest + } + + addListener (ev, fn) { + return this.on(ev, fn) + } + + on (ev, fn) { + try { + return super.on(ev, fn) + } finally { + if (ev === 'data' && !this.pipes.length && !this.flowing) + this[RESUME]() + else if (isEndish(ev) && this[EMITTED_END]) { + super.emit(ev) + this.removeAllListeners(ev) + } else if (ev === 'error' && this[EMITTED_ERROR]) { + fn.call(this, this[EMITTED_ERROR]) + } + } + } + + get emittedEnd () { + return this[EMITTED_END] + } + + [MAYBE_EMIT_END] () { + if (!this[EMITTING_END] && + !this[EMITTED_END] && + !this[DESTROYED] && + this.buffer.length === 0 && + this[EOF]) { + this[EMITTING_END] = true + this.emit('end') + this.emit('prefinish') + this.emit('finish') + if (this[CLOSED]) + this.emit('close') + this[EMITTING_END] = false + } + } + + emit (ev, data) { + // error and close are only events allowed after calling destroy() + if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) + return + else if (ev === 'data') { + if (!data) + return + + if (this.pipes.length) + this.pipes.forEach(p => + p.dest.write(data) === false && this.pause()) + } else if (ev === 'end') { + // only actual end gets this treatment + if (this[EMITTED_END] === true) + return + + this[EMITTED_END] = true + this.readable = false + + if (this[DECODER]) { + data = this[DECODER].end() + if (data) { + this.pipes.forEach(p => p.dest.write(data)) + super.emit('data', data) + } + } + + this.pipes.forEach(p => { + p.dest.removeListener('drain', p.ondrain) + if (p.opts.end) + p.dest.end() + }) + } else if (ev === 'close') { + this[CLOSED] = true + // don't emit close before 'end' and 'finish' + if (!this[EMITTED_END] && !this[DESTROYED]) + return + } else if (ev === 'error') { + this[EMITTED_ERROR] = data + } + + // TODO: replace with a spread operator when Node v4 support drops + const args = new Array(arguments.length) + args[0] = ev + args[1] = data + if (arguments.length > 2) { + for (let i = 2; i < arguments.length; i++) { + args[i] = arguments[i] + } + } + + try { + return super.emit.apply(this, args) + } finally { + if (!isEndish(ev)) + this[MAYBE_EMIT_END]() + else + this.removeAllListeners(ev) + } + } + + // const all = await stream.collect() + collect () { + const buf = [] + if (!this[OBJECTMODE]) + buf.dataLength = 0 + // set the promise first, in case an error is raised + // by triggering the flow here. + const p = this.promise() + this.on('data', c => { + buf.push(c) + if (!this[OBJECTMODE]) + buf.dataLength += c.length + }) + return p.then(() => buf) + } + + // const data = await stream.concat() + concat () { + return this[OBJECTMODE] + ? Promise.reject(new Error('cannot concat in objectMode')) + : this.collect().then(buf => + this[OBJECTMODE] + ? Promise.reject(new Error('cannot concat in objectMode')) + : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength)) + } + + // stream.promise().then(() => done, er => emitted error) + promise () { + return new Promise((resolve, reject) => { + this.on(DESTROYED, () => reject(new Error('stream destroyed'))) + this.on('error', er => reject(er)) + this.on('end', () => resolve()) + }) + } + + // for await (let chunk of stream) + [ASYNCITERATOR] () { + const next = () => { + const res = this.read() + if (res !== null) + return Promise.resolve({ done: false, value: res }) + + if (this[EOF]) + return Promise.resolve({ done: true }) + + let resolve = null + let reject = null + const onerr = er => { + this.removeListener('data', ondata) + this.removeListener('end', onend) + reject(er) + } + const ondata = value => { + this.removeListener('error', onerr) + this.removeListener('end', onend) + this.pause() + resolve({ value: value, done: !!this[EOF] }) + } + const onend = () => { + this.removeListener('error', onerr) + this.removeListener('data', ondata) + resolve({ done: true }) + } + const ondestroy = () => onerr(new Error('stream destroyed')) + return new Promise((res, rej) => { + reject = rej + resolve = res + this.once(DESTROYED, ondestroy) + this.once('error', onerr) + this.once('end', onend) + this.once('data', ondata) + }) + } + + return { next } + } + + // for (let chunk of stream) + [ITERATOR] () { + const next = () => { + const value = this.read() + const done = value === null + return { value, done } + } + return { next } + } + + destroy (er) { + if (this[DESTROYED]) { + if (er) + this.emit('error', er) + else + this.emit(DESTROYED) + return this + } + + this[DESTROYED] = true + + // throw away all buffered data, it's never coming out + this.buffer = new Yallist() + this[BUFFERLENGTH] = 0 + + if (typeof this.close === 'function' && !this[CLOSED]) + this.close() + + if (er) + this.emit('error', er) + else // if no error to emit, still reject pending promises + this.emit(DESTROYED) + + return this + } + + static isStream (s) { + return !!s && (s instanceof Minipass || s instanceof Stream || + s instanceof EE && ( + typeof s.pipe === 'function' || // readable + (typeof s.write === 'function' && typeof s.end === 'function') // writable + )) + } +} + + +/***/ }), + +/***/ 16778: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Update with any zlib constants that are added or changed in the future. +// Node v6 didn't export this, so we just hard code the version and rely +// on all the other hard-coded values from zlib v4736. When node v6 +// support drops, we can just export the realZlibConstants object. +const realZlibConstants = (__nccwpck_require__(59796).constants) || + /* istanbul ignore next */ { ZLIB_VERNUM: 4736 } + +module.exports = Object.freeze(Object.assign(Object.create(null), { + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + Z_VERSION_ERROR: -6, + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + DEFLATE: 1, + INFLATE: 2, + GZIP: 3, + GUNZIP: 4, + DEFLATERAW: 5, + INFLATERAW: 6, + UNZIP: 7, + BROTLI_DECODE: 8, + BROTLI_ENCODE: 9, + Z_MIN_WINDOWBITS: 8, + Z_MAX_WINDOWBITS: 15, + Z_DEFAULT_WINDOWBITS: 15, + Z_MIN_CHUNK: 64, + Z_MAX_CHUNK: Infinity, + Z_DEFAULT_CHUNK: 16384, + Z_MIN_MEMLEVEL: 1, + Z_MAX_MEMLEVEL: 9, + Z_DEFAULT_MEMLEVEL: 8, + Z_MIN_LEVEL: -1, + Z_MAX_LEVEL: 9, + Z_DEFAULT_LEVEL: -1, + BROTLI_OPERATION_PROCESS: 0, + BROTLI_OPERATION_FLUSH: 1, + BROTLI_OPERATION_FINISH: 2, + BROTLI_OPERATION_EMIT_METADATA: 3, + BROTLI_MODE_GENERIC: 0, + BROTLI_MODE_TEXT: 1, + BROTLI_MODE_FONT: 2, + BROTLI_DEFAULT_MODE: 0, + BROTLI_MIN_QUALITY: 0, + BROTLI_MAX_QUALITY: 11, + BROTLI_DEFAULT_QUALITY: 11, + BROTLI_MIN_WINDOW_BITS: 10, + BROTLI_MAX_WINDOW_BITS: 24, + BROTLI_LARGE_MAX_WINDOW_BITS: 30, + BROTLI_DEFAULT_WINDOW: 22, + BROTLI_MIN_INPUT_BLOCK_BITS: 16, + BROTLI_MAX_INPUT_BLOCK_BITS: 24, + BROTLI_PARAM_MODE: 0, + BROTLI_PARAM_QUALITY: 1, + BROTLI_PARAM_LGWIN: 2, + BROTLI_PARAM_LGBLOCK: 3, + BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, + BROTLI_PARAM_SIZE_HINT: 5, + BROTLI_PARAM_LARGE_WINDOW: 6, + BROTLI_PARAM_NPOSTFIX: 7, + BROTLI_PARAM_NDIRECT: 8, + BROTLI_DECODER_RESULT_ERROR: 0, + BROTLI_DECODER_RESULT_SUCCESS: 1, + BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, + BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, + BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, + BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, + BROTLI_DECODER_NO_ERROR: 0, + BROTLI_DECODER_SUCCESS: 1, + BROTLI_DECODER_NEEDS_MORE_INPUT: 2, + BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, + BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, + BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, + BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, + BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, + BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, + BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, + BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, + BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, + BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, + BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, + BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, + BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, + BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, + BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, + BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, + BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, + BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, + BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, + BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, + BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, + BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, + BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, + BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, + BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, + BROTLI_DECODER_ERROR_UNREACHABLE: -31, +}, realZlibConstants)) + + +/***/ }), + +/***/ 96097: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const assert = __nccwpck_require__(39491) +const Buffer = (__nccwpck_require__(14300).Buffer) +const realZlib = __nccwpck_require__(59796) + +const constants = exports.constants = __nccwpck_require__(16778) +const Minipass = __nccwpck_require__(27948) + +const OriginalBufferConcat = Buffer.concat + +const _superWrite = Symbol('_superWrite') +class ZlibError extends Error { + constructor (err) { + super('zlib: ' + err.message) + this.code = err.code + this.errno = err.errno + /* istanbul ignore if */ + if (!this.code) + this.code = 'ZLIB_ERROR' + + this.message = 'zlib: ' + err.message + Error.captureStackTrace(this, this.constructor) + } + + get name () { + return 'ZlibError' + } +} + +// the Zlib class they all inherit from +// This thing manages the queue of requests, and returns +// true or false if there is anything in the queue when +// you call the .write() method. +const _opts = Symbol('opts') +const _flushFlag = Symbol('flushFlag') +const _finishFlushFlag = Symbol('finishFlushFlag') +const _fullFlushFlag = Symbol('fullFlushFlag') +const _handle = Symbol('handle') +const _onError = Symbol('onError') +const _sawError = Symbol('sawError') +const _level = Symbol('level') +const _strategy = Symbol('strategy') +const _ended = Symbol('ended') +const _defaultFullFlush = Symbol('_defaultFullFlush') + +class ZlibBase extends Minipass { + constructor (opts, mode) { + if (!opts || typeof opts !== 'object') + throw new TypeError('invalid options for ZlibBase constructor') + + super(opts) + this[_sawError] = false + this[_ended] = false + this[_opts] = opts + + this[_flushFlag] = opts.flush + this[_finishFlushFlag] = opts.finishFlush + // this will throw if any options are invalid for the class selected + try { + this[_handle] = new realZlib[mode](opts) + } catch (er) { + // make sure that all errors get decorated properly + throw new ZlibError(er) + } + + this[_onError] = (err) => { + // no sense raising multiple errors, since we abort on the first one. + if (this[_sawError]) + return + + this[_sawError] = true + + // there is no way to cleanly recover. + // continuing only obscures problems. + this.close() + this.emit('error', err) + } + + this[_handle].on('error', er => this[_onError](new ZlibError(er))) + this.once('end', () => this.close) + } + + close () { + if (this[_handle]) { + this[_handle].close() + this[_handle] = null + this.emit('close') + } + } + + reset () { + if (!this[_sawError]) { + assert(this[_handle], 'zlib binding closed') + return this[_handle].reset() + } + } + + flush (flushFlag) { + if (this.ended) + return + + if (typeof flushFlag !== 'number') + flushFlag = this[_fullFlushFlag] + this.write(Object.assign(Buffer.alloc(0), { [_flushFlag]: flushFlag })) + } + + end (chunk, encoding, cb) { + if (chunk) + this.write(chunk, encoding) + this.flush(this[_finishFlushFlag]) + this[_ended] = true + return super.end(null, null, cb) + } + + get ended () { + return this[_ended] + } + + write (chunk, encoding, cb) { + // process the chunk using the sync process + // then super.write() all the outputted chunks + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + + if (typeof chunk === 'string') + chunk = Buffer.from(chunk, encoding) + + if (this[_sawError]) + return + assert(this[_handle], 'zlib binding closed') + + // _processChunk tries to .close() the native handle after it's done, so we + // intercept that by temporarily making it a no-op. + const nativeHandle = this[_handle]._handle + const originalNativeClose = nativeHandle.close + nativeHandle.close = () => {} + const originalClose = this[_handle].close + this[_handle].close = () => {} + // It also calls `Buffer.concat()` at the end, which may be convenient + // for some, but which we are not interested in as it slows us down. + Buffer.concat = (args) => args + let result + try { + const flushFlag = typeof chunk[_flushFlag] === 'number' + ? chunk[_flushFlag] : this[_flushFlag] + result = this[_handle]._processChunk(chunk, flushFlag) + // if we don't throw, reset it back how it was + Buffer.concat = OriginalBufferConcat + } catch (err) { + // or if we do, put Buffer.concat() back before we emit error + // Error events call into user code, which may call Buffer.concat() + Buffer.concat = OriginalBufferConcat + this[_onError](new ZlibError(err)) + } finally { + if (this[_handle]) { + // Core zlib resets `_handle` to null after attempting to close the + // native handle. Our no-op handler prevented actual closure, but we + // need to restore the `._handle` property. + this[_handle]._handle = nativeHandle + nativeHandle.close = originalNativeClose + this[_handle].close = originalClose + // `_processChunk()` adds an 'error' listener. If we don't remove it + // after each call, these handlers start piling up. + this[_handle].removeAllListeners('error') + // make sure OUR error listener is still attached tho + } + } + + if (this[_handle]) + this[_handle].on('error', er => this[_onError](new ZlibError(er))) + + let writeReturn + if (result) { + if (Array.isArray(result) && result.length > 0) { + // The first buffer is always `handle._outBuffer`, which would be + // re-used for later invocations; so, we always have to copy that one. + writeReturn = this[_superWrite](Buffer.from(result[0])) + for (let i = 1; i < result.length; i++) { + writeReturn = this[_superWrite](result[i]) + } + } else { + writeReturn = this[_superWrite](Buffer.from(result)) + } + } + + if (cb) + cb() + return writeReturn + } + + [_superWrite] (data) { + return super.write(data) + } +} + +class Zlib extends ZlibBase { + constructor (opts, mode) { + opts = opts || {} + + opts.flush = opts.flush || constants.Z_NO_FLUSH + opts.finishFlush = opts.finishFlush || constants.Z_FINISH + super(opts, mode) + + this[_fullFlushFlag] = constants.Z_FULL_FLUSH + this[_level] = opts.level + this[_strategy] = opts.strategy + } + + params (level, strategy) { + if (this[_sawError]) + return + + if (!this[_handle]) + throw new Error('cannot switch params when binding is closed') + + // no way to test this without also not supporting params at all + /* istanbul ignore if */ + if (!this[_handle].params) + throw new Error('not supported in this implementation') + + if (this[_level] !== level || this[_strategy] !== strategy) { + this.flush(constants.Z_SYNC_FLUSH) + assert(this[_handle], 'zlib binding closed') + // .params() calls .flush(), but the latter is always async in the + // core zlib. We override .flush() temporarily to intercept that and + // flush synchronously. + const origFlush = this[_handle].flush + this[_handle].flush = (flushFlag, cb) => { + this.flush(flushFlag) + cb() + } + try { + this[_handle].params(level, strategy) + } finally { + this[_handle].flush = origFlush + } + /* istanbul ignore else */ + if (this[_handle]) { + this[_level] = level + this[_strategy] = strategy + } + } + } +} + +// minimal 2-byte header +class Deflate extends Zlib { + constructor (opts) { + super(opts, 'Deflate') + } +} + +class Inflate extends Zlib { + constructor (opts) { + super(opts, 'Inflate') + } +} + +// gzip - bigger header, same deflate compression +const _portable = Symbol('_portable') +class Gzip extends Zlib { + constructor (opts) { + super(opts, 'Gzip') + this[_portable] = opts && !!opts.portable + } + + [_superWrite] (data) { + if (!this[_portable]) + return super[_superWrite](data) + + // we'll always get the header emitted in one first chunk + // overwrite the OS indicator byte with 0xFF + this[_portable] = false + data[9] = 255 + return super[_superWrite](data) + } +} + +class Gunzip extends Zlib { + constructor (opts) { + super(opts, 'Gunzip') + } +} + +// raw - no header +class DeflateRaw extends Zlib { + constructor (opts) { + super(opts, 'DeflateRaw') + } +} + +class InflateRaw extends Zlib { + constructor (opts) { + super(opts, 'InflateRaw') + } +} + +// auto-detect header. +class Unzip extends Zlib { + constructor (opts) { + super(opts, 'Unzip') + } +} + +class Brotli extends ZlibBase { + constructor (opts, mode) { + opts = opts || {} + + opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS + opts.finishFlush = opts.finishFlush || constants.BROTLI_OPERATION_FINISH + + super(opts, mode) + + this[_fullFlushFlag] = constants.BROTLI_OPERATION_FLUSH + } +} + +class BrotliCompress extends Brotli { + constructor (opts) { + super(opts, 'BrotliCompress') + } +} + +class BrotliDecompress extends Brotli { + constructor (opts) { + super(opts, 'BrotliDecompress') + } +} + +exports.Deflate = Deflate +exports.Inflate = Inflate +exports.Gzip = Gzip +exports.Gunzip = Gunzip +exports.DeflateRaw = DeflateRaw +exports.InflateRaw = InflateRaw +exports.Unzip = Unzip +/* istanbul ignore else */ +if (typeof realZlib.BrotliCompress === 'function') { + exports.BrotliCompress = BrotliCompress + exports.BrotliDecompress = BrotliDecompress +} else { + exports.BrotliCompress = exports.BrotliDecompress = class { + constructor () { + throw new Error('Brotli is not supported in this version of Node.js') + } + } +} + + +/***/ }), + +/***/ 26646: +/***/ ((module) => { + +"use strict"; + + +// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs +const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain'; +const DATA_URL_DEFAULT_CHARSET = 'us-ascii'; + +const testParameter = (name, filters) => { + return filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); +}; + +const normalizeDataURL = (urlString, {stripHash}) => { + const match = /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(urlString); + + if (!match) { + throw new Error(`Invalid URL: ${urlString}`); + } + + let {type, data, hash} = match.groups; + const mediaType = type.split(';'); + hash = stripHash ? '' : hash; + + let isBase64 = false; + if (mediaType[mediaType.length - 1] === 'base64') { + mediaType.pop(); + isBase64 = true; + } + + // Lowercase MIME type + const mimeType = (mediaType.shift() || '').toLowerCase(); + const attributes = mediaType + .map(attribute => { + let [key, value = ''] = attribute.split('=').map(string => string.trim()); + + // Lowercase `charset` + if (key === 'charset') { + value = value.toLowerCase(); + + if (value === DATA_URL_DEFAULT_CHARSET) { + return ''; + } + } + + return `${key}${value ? `=${value}` : ''}`; + }) + .filter(Boolean); + + const normalizedMediaType = [ + ...attributes + ]; + + if (isBase64) { + normalizedMediaType.push('base64'); + } + + if (normalizedMediaType.length !== 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) { + normalizedMediaType.unshift(mimeType); + } + + return `data:${normalizedMediaType.join(';')},${isBase64 ? data.trim() : data}${hash ? `#${hash}` : ''}`; +}; + +const normalizeUrl = (urlString, options) => { + options = { + defaultProtocol: 'http:', + normalizeProtocol: true, + forceHttp: false, + forceHttps: false, + stripAuthentication: true, + stripHash: false, + stripTextFragment: true, + stripWWW: true, + removeQueryParameters: [/^utm_\w+/i], + removeTrailingSlash: true, + removeSingleSlash: true, + removeDirectoryIndex: false, + sortQueryParameters: true, + ...options + }; + + urlString = urlString.trim(); + + // Data URL + if (/^data:/i.test(urlString)) { + return normalizeDataURL(urlString, options); + } + + if (/^view-source:/i.test(urlString)) { + throw new Error('`view-source:` is not supported as it is a non-standard protocol'); + } + + const hasRelativeProtocol = urlString.startsWith('//'); + const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); + + // Prepend protocol + if (!isRelativeUrl) { + urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); + } + + const urlObj = new URL(urlString); + + if (options.forceHttp && options.forceHttps) { + throw new Error('The `forceHttp` and `forceHttps` options cannot be used together'); + } + + if (options.forceHttp && urlObj.protocol === 'https:') { + urlObj.protocol = 'http:'; + } + + if (options.forceHttps && urlObj.protocol === 'http:') { + urlObj.protocol = 'https:'; + } + + // Remove auth + if (options.stripAuthentication) { + urlObj.username = ''; + urlObj.password = ''; + } + + // Remove hash + if (options.stripHash) { + urlObj.hash = ''; + } else if (options.stripTextFragment) { + urlObj.hash = urlObj.hash.replace(/#?:~:text.*?$/i, ''); + } + + // Remove duplicate slashes if not preceded by a protocol + if (urlObj.pathname) { + urlObj.pathname = urlObj.pathname.replace(/(? 0) { + let pathComponents = urlObj.pathname.split('/'); + const lastComponent = pathComponents[pathComponents.length - 1]; + + if (testParameter(lastComponent, options.removeDirectoryIndex)) { + pathComponents = pathComponents.slice(0, pathComponents.length - 1); + urlObj.pathname = pathComponents.slice(1).join('/') + '/'; + } + } + + if (urlObj.hostname) { + // Remove trailing dot + urlObj.hostname = urlObj.hostname.replace(/\.$/, ''); + + // Remove `www.` + if (options.stripWWW && /^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(urlObj.hostname)) { + // Each label should be max 63 at length (min: 1). + // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names + // Each TLD should be up to 63 characters long (min: 2). + // It is technically possible to have a single character TLD, but none currently exist. + urlObj.hostname = urlObj.hostname.replace(/^www\./, ''); + } + } + + // Remove query unwanted parameters + if (Array.isArray(options.removeQueryParameters)) { + for (const key of [...urlObj.searchParams.keys()]) { + if (testParameter(key, options.removeQueryParameters)) { + urlObj.searchParams.delete(key); + } + } + } + + if (options.removeQueryParameters === true) { + urlObj.search = ''; + } + + // Sort query parameters + if (options.sortQueryParameters) { + urlObj.searchParams.sort(); + } + + if (options.removeTrailingSlash) { + urlObj.pathname = urlObj.pathname.replace(/\/$/, ''); + } + + const oldUrlString = urlString; + + // Take advantage of many of the Node `url` normalizations + urlString = urlObj.toString(); + + if (!options.removeSingleSlash && urlObj.pathname === '/' && !oldUrlString.endsWith('/') && urlObj.hash === '') { + urlString = urlString.replace(/\/$/, ''); + } + + // Remove ending `/` unless removeSingleSlash is false + if ((options.removeTrailingSlash || urlObj.pathname === '/') && urlObj.hash === '' && options.removeSingleSlash) { + urlString = urlString.replace(/\/$/, ''); + } + + // Restore relative protocol, if applicable + if (hasRelativeProtocol && !options.normalizeProtocol) { + urlString = urlString.replace(/^http:\/\//, '//'); + } + + // Remove http/https + if (options.stripProtocol) { + urlString = urlString.replace(/^(?:https?:)?\/\//, ''); + } + + return urlString; +}; + +module.exports = normalizeUrl; + + +/***/ }), + +/***/ 1142: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +var crypto = __nccwpck_require__(6113) + +function sha (key, body, algorithm) { + return crypto.createHmac(algorithm, key).update(body).digest('base64') +} + +function rsa (key, body) { + return crypto.createSign('RSA-SHA1').update(body).sign(key, 'base64') +} + +function rfc3986 (str) { + return encodeURIComponent(str) + .replace(/!/g,'%21') + .replace(/\*/g,'%2A') + .replace(/\(/g,'%28') + .replace(/\)/g,'%29') + .replace(/'/g,'%27') +} + +// Maps object to bi-dimensional array +// Converts { foo: 'A', bar: [ 'b', 'B' ]} to +// [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ] +function map (obj) { + var key, val, arr = [] + for (key in obj) { + val = obj[key] + if (Array.isArray(val)) + for (var i = 0; i < val.length; i++) + arr.push([key, val[i]]) + else if (typeof val === 'object') + for (var prop in val) + arr.push([key + '[' + prop + ']', val[prop]]) + else + arr.push([key, val]) + } + return arr +} + +// Compare function for sort +function compare (a, b) { + return a > b ? 1 : a < b ? -1 : 0 +} + +function generateBase (httpMethod, base_uri, params) { + // adapted from https://dev.twitter.com/docs/auth/oauth and + // https://dev.twitter.com/docs/auth/creating-signature + + // Parameter normalization + // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2 + var normalized = map(params) + // 1. First, the name and value of each parameter are encoded + .map(function (p) { + return [ rfc3986(p[0]), rfc3986(p[1] || '') ] + }) + // 2. The parameters are sorted by name, using ascending byte value + // ordering. If two or more parameters share the same name, they + // are sorted by their value. + .sort(function (a, b) { + return compare(a[0], b[0]) || compare(a[1], b[1]) + }) + // 3. The name of each parameter is concatenated to its corresponding + // value using an "=" character (ASCII code 61) as a separator, even + // if the value is empty. + .map(function (p) { return p.join('=') }) + // 4. The sorted name/value pairs are concatenated together into a + // single string by using an "&" character (ASCII code 38) as + // separator. + .join('&') + + var base = [ + rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'), + rfc3986(base_uri), + rfc3986(normalized) + ].join('&') + + return base +} + +function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { + var base = generateBase(httpMethod, base_uri, params) + var key = [ + consumer_secret || '', + token_secret || '' + ].map(rfc3986).join('&') + + return sha(key, base, 'sha1') +} + +function hmacsign256 (httpMethod, base_uri, params, consumer_secret, token_secret) { + var base = generateBase(httpMethod, base_uri, params) + var key = [ + consumer_secret || '', + token_secret || '' + ].map(rfc3986).join('&') + + return sha(key, base, 'sha256') +} + +function rsasign (httpMethod, base_uri, params, private_key, token_secret) { + var base = generateBase(httpMethod, base_uri, params) + var key = private_key || '' + + return rsa(key, base) +} + +function plaintext (consumer_secret, token_secret) { + var key = [ + consumer_secret || '', + token_secret || '' + ].map(rfc3986).join('&') + + return key +} + +function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) { + var method + var skipArgs = 1 + + switch (signMethod) { + case 'RSA-SHA1': + method = rsasign + break + case 'HMAC-SHA1': + method = hmacsign + break + case 'HMAC-SHA256': + method = hmacsign256 + break + case 'PLAINTEXT': + method = plaintext + skipArgs = 4 + break + default: + throw new Error('Signature method not supported: ' + signMethod) + } + + return method.apply(null, [].slice.call(arguments, skipArgs)) +} + +exports.hmacsign = hmacsign +exports.hmacsign256 = hmacsign256 +exports.rsasign = rsasign +exports.plaintext = plaintext +exports.sign = sign +exports.rfc3986 = rfc3986 +exports.generateBase = generateBase + +/***/ }), + +/***/ 20330: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +var crypto = __nccwpck_require__(6113); + +/** + * Exported function + * + * Options: + * + * - `algorithm` hash algo to be used by this instance: *'sha1', 'md5' + * - `excludeValues` {true|*false} hash object keys, values ignored + * - `encoding` hash encoding, supports 'buffer', '*hex', 'binary', 'base64' + * - `ignoreUnknown` {true|*false} ignore unknown object types + * - `replacer` optional function that replaces values before hashing + * - `respectFunctionProperties` {*true|false} consider function properties when hashing + * - `respectFunctionNames` {*true|false} consider 'name' property of functions for hashing + * - `respectType` {*true|false} Respect special properties (prototype, constructor) + * when hashing to distinguish between types + * - `unorderedArrays` {true|*false} Sort all arrays before hashing + * - `unorderedSets` {*true|false} Sort `Set` and `Map` instances before hashing + * * = default + * + * @param {object} object value to hash + * @param {object} options hashing options + * @return {string} hash value + * @api public + */ +exports = module.exports = objectHash; + +function objectHash(object, options){ + options = applyDefaults(object, options); + + return hash(object, options); +} + +/** + * Exported sugar methods + * + * @param {object} object value to hash + * @return {string} hash value + * @api public + */ +exports.sha1 = function(object){ + return objectHash(object); +}; +exports.keys = function(object){ + return objectHash(object, {excludeValues: true, algorithm: 'sha1', encoding: 'hex'}); +}; +exports.MD5 = function(object){ + return objectHash(object, {algorithm: 'md5', encoding: 'hex'}); +}; +exports.keysMD5 = function(object){ + return objectHash(object, {algorithm: 'md5', encoding: 'hex', excludeValues: true}); +}; + +// Internals +var hashes = crypto.getHashes ? crypto.getHashes().slice() : ['sha1', 'md5']; +hashes.push('passthrough'); +var encodings = ['buffer', 'hex', 'binary', 'base64']; + +function applyDefaults(object, sourceOptions){ + sourceOptions = sourceOptions || {}; + + // create a copy rather than mutating + var options = {}; + options.algorithm = sourceOptions.algorithm || 'sha1'; + options.encoding = sourceOptions.encoding || 'hex'; + options.excludeValues = sourceOptions.excludeValues ? true : false; + options.algorithm = options.algorithm.toLowerCase(); + options.encoding = options.encoding.toLowerCase(); + options.ignoreUnknown = sourceOptions.ignoreUnknown !== true ? false : true; // default to false + options.respectType = sourceOptions.respectType === false ? false : true; // default to true + options.respectFunctionNames = sourceOptions.respectFunctionNames === false ? false : true; + options.respectFunctionProperties = sourceOptions.respectFunctionProperties === false ? false : true; + options.unorderedArrays = sourceOptions.unorderedArrays !== true ? false : true; // default to false + options.unorderedSets = sourceOptions.unorderedSets === false ? false : true; // default to false + options.unorderedObjects = sourceOptions.unorderedObjects === false ? false : true; // default to true + options.replacer = sourceOptions.replacer || undefined; + options.excludeKeys = sourceOptions.excludeKeys || undefined; + + if(typeof object === 'undefined') { + throw new Error('Object argument required.'); + } + + // if there is a case-insensitive match in the hashes list, accept it + // (i.e. SHA256 for sha256) + for (var i = 0; i < hashes.length; ++i) { + if (hashes[i].toLowerCase() === options.algorithm.toLowerCase()) { + options.algorithm = hashes[i]; + } + } + + if(hashes.indexOf(options.algorithm) === -1){ + throw new Error('Algorithm "' + options.algorithm + '" not supported. ' + + 'supported values: ' + hashes.join(', ')); + } + + if(encodings.indexOf(options.encoding) === -1 && + options.algorithm !== 'passthrough'){ + throw new Error('Encoding "' + options.encoding + '" not supported. ' + + 'supported values: ' + encodings.join(', ')); + } + + return options; +} + +/** Check if the given function is a native function */ +function isNativeFunction(f) { + if ((typeof f) !== 'function') { + return false; + } + var exp = /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i; + return exp.exec(Function.prototype.toString.call(f)) != null; +} + +function hash(object, options) { + var hashingStream; + + if (options.algorithm !== 'passthrough') { + hashingStream = crypto.createHash(options.algorithm); + } else { + hashingStream = new PassThrough(); + } + + if (typeof hashingStream.write === 'undefined') { + hashingStream.write = hashingStream.update; + hashingStream.end = hashingStream.update; + } + + var hasher = typeHasher(options, hashingStream); + hasher.dispatch(object); + if (!hashingStream.update) { + hashingStream.end(''); + } + + if (hashingStream.digest) { + return hashingStream.digest(options.encoding === 'buffer' ? undefined : options.encoding); + } + + var buf = hashingStream.read(); + if (options.encoding === 'buffer') { + return buf; + } + + return buf.toString(options.encoding); +} + +/** + * Expose streaming API + * + * @param {object} object Value to serialize + * @param {object} options Options, as for hash() + * @param {object} stream A stream to write the serializiation to + * @api public + */ +exports.writeToStream = function(object, options, stream) { + if (typeof stream === 'undefined') { + stream = options; + options = {}; + } + + options = applyDefaults(object, options); + + return typeHasher(options, stream).dispatch(object); +}; + +function typeHasher(options, writeTo, context){ + context = context || []; + var write = function(str) { + if (writeTo.update) { + return writeTo.update(str, 'utf8'); + } else { + return writeTo.write(str, 'utf8'); + } + }; + + return { + dispatch: function(value){ + if (options.replacer) { + value = options.replacer(value); + } + + var type = typeof value; + if (value === null) { + type = 'null'; + } + + //console.log("[DEBUG] Dispatch: ", value, "->", type, " -> ", "_" + type); + + return this['_' + type](value); + }, + _object: function(object) { + var pattern = (/\[object (.*)\]/i); + var objString = Object.prototype.toString.call(object); + var objType = pattern.exec(objString); + if (!objType) { // object type did not match [object ...] + objType = 'unknown:[' + objString + ']'; + } else { + objType = objType[1]; // take only the class name + } + + objType = objType.toLowerCase(); + + var objectNumber = null; + + if ((objectNumber = context.indexOf(object)) >= 0) { + return this.dispatch('[CIRCULAR:' + objectNumber + ']'); + } else { + context.push(object); + } + + if (typeof Buffer !== 'undefined' && Buffer.isBuffer && Buffer.isBuffer(object)) { + write('buffer:'); + return write(object); + } + + if(objType !== 'object' && objType !== 'function' && objType !== 'asyncfunction') { + if(this['_' + objType]) { + this['_' + objType](object); + } else if (options.ignoreUnknown) { + return write('[' + objType + ']'); + } else { + throw new Error('Unknown object type "' + objType + '"'); + } + }else{ + var keys = Object.keys(object); + if (options.unorderedObjects) { + keys = keys.sort(); + } + // Make sure to incorporate special properties, so + // Types with different prototypes will produce + // a different hash and objects derived from + // different functions (`new Foo`, `new Bar`) will + // produce different hashes. + // We never do this for native functions since some + // seem to break because of that. + if (options.respectType !== false && !isNativeFunction(object)) { + keys.splice(0, 0, 'prototype', '__proto__', 'constructor'); + } + + if (options.excludeKeys) { + keys = keys.filter(function(key) { return !options.excludeKeys(key); }); + } + + write('object:' + keys.length + ':'); + var self = this; + return keys.forEach(function(key){ + self.dispatch(key); + write(':'); + if(!options.excludeValues) { + self.dispatch(object[key]); + } + write(','); + }); + } + }, + _array: function(arr, unordered){ + unordered = typeof unordered !== 'undefined' ? unordered : + options.unorderedArrays !== false; // default to options.unorderedArrays + + var self = this; + write('array:' + arr.length + ':'); + if (!unordered || arr.length <= 1) { + return arr.forEach(function(entry) { + return self.dispatch(entry); + }); + } + + // the unordered case is a little more complicated: + // since there is no canonical ordering on objects, + // i.e. {a:1} < {a:2} and {a:1} > {a:2} are both false, + // we first serialize each entry using a PassThrough stream + // before sorting. + // also: we can’t use the same context array for all entries + // since the order of hashing should *not* matter. instead, + // we keep track of the additions to a copy of the context array + // and add all of them to the global context array when we’re done + var contextAdditions = []; + var entries = arr.map(function(entry) { + var strm = new PassThrough(); + var localContext = context.slice(); // make copy + var hasher = typeHasher(options, strm, localContext); + hasher.dispatch(entry); + // take only what was added to localContext and append it to contextAdditions + contextAdditions = contextAdditions.concat(localContext.slice(context.length)); + return strm.read().toString(); + }); + context = context.concat(contextAdditions); + entries.sort(); + return this._array(entries, false); + }, + _date: function(date){ + return write('date:' + date.toJSON()); + }, + _symbol: function(sym){ + return write('symbol:' + sym.toString()); + }, + _error: function(err){ + return write('error:' + err.toString()); + }, + _boolean: function(bool){ + return write('bool:' + bool.toString()); + }, + _string: function(string){ + write('string:' + string.length + ':'); + write(string.toString()); + }, + _function: function(fn){ + write('fn:'); + if (isNativeFunction(fn)) { + this.dispatch('[native]'); + } else { + this.dispatch(fn.toString()); + } + + if (options.respectFunctionNames !== false) { + // Make sure we can still distinguish native functions + // by their name, otherwise String and Function will + // have the same hash + this.dispatch("function-name:" + String(fn.name)); + } + + if (options.respectFunctionProperties) { + this._object(fn); + } + }, + _number: function(number){ + return write('number:' + number.toString()); + }, + _xml: function(xml){ + return write('xml:' + xml.toString()); + }, + _null: function() { + return write('Null'); + }, + _undefined: function() { + return write('Undefined'); + }, + _regexp: function(regex){ + return write('regex:' + regex.toString()); + }, + _uint8array: function(arr){ + write('uint8array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _uint8clampedarray: function(arr){ + write('uint8clampedarray:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _int8array: function(arr){ + write('uint8array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _uint16array: function(arr){ + write('uint16array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _int16array: function(arr){ + write('uint16array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _uint32array: function(arr){ + write('uint32array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _int32array: function(arr){ + write('uint32array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _float32array: function(arr){ + write('float32array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _float64array: function(arr){ + write('float64array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _arraybuffer: function(arr){ + write('arraybuffer:'); + return this.dispatch(new Uint8Array(arr)); + }, + _url: function(url) { + return write('url:' + url.toString(), 'utf8'); + }, + _map: function(map) { + write('map:'); + var arr = Array.from(map); + return this._array(arr, options.unorderedSets !== false); + }, + _set: function(set) { + write('set:'); + var arr = Array.from(set); + return this._array(arr, options.unorderedSets !== false); + }, + _file: function(file) { + write('file:'); + return this.dispatch([file.name, file.size, file.type, file.lastModfied]); + }, + _blob: function() { + if (options.ignoreUnknown) { + return write('[blob]'); + } + + throw Error('Hashing Blob objects is currently not supported\n' + + '(see https://github.com/puleos/object-hash/issues/26)\n' + + 'Use "options.replacer" or "options.ignoreUnknown"\n'); + }, + _domwindow: function() { return write('domwindow'); }, + _bigint: function(number){ + return write('bigint:' + number.toString()); + }, + /* Node.js standard native objects */ + _process: function() { return write('process'); }, + _timer: function() { return write('timer'); }, + _pipe: function() { return write('pipe'); }, + _tcp: function() { return write('tcp'); }, + _udp: function() { return write('udp'); }, + _tty: function() { return write('tty'); }, + _statwatcher: function() { return write('statwatcher'); }, + _securecontext: function() { return write('securecontext'); }, + _connection: function() { return write('connection'); }, + _zlib: function() { return write('zlib'); }, + _context: function() { return write('context'); }, + _nodescript: function() { return write('nodescript'); }, + _httpparser: function() { return write('httpparser'); }, + _dataview: function() { return write('dataview'); }, + _signal: function() { return write('signal'); }, + _fsevent: function() { return write('fsevent'); }, + _tlswrap: function() { return write('tlswrap'); }, + }; +} + +// Mini-implementation of stream.PassThrough +// We are far from having need for the full implementation, and we can +// make assumptions like "many writes, then only one final read" +// and we can ignore encoding specifics +function PassThrough() { + return { + buf: '', + + write: function(b) { + this.buf += b; + }, + + end: function(b) { + this.buf += b; + }, + + read: function() { + return this.buf; + } + }; +} + + +/***/ }), + +/***/ 32493: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { strict: assert } = __nccwpck_require__(39491); +const { createHash } = __nccwpck_require__(6113); +const { format } = __nccwpck_require__(73837); + +const shake256 = __nccwpck_require__(940); + +let encode; +if (Buffer.isEncoding('base64url')) { + encode = (input) => input.toString('base64url'); +} else { + const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); + encode = (input) => fromBase64(input.toString('base64')); +} + +/** SPECIFICATION + * Its (_hash) value is the base64url encoding of the left-most half of the hash of the octets of + * the ASCII representation of the token value, where the hash algorithm used is the hash algorithm + * used in the alg Header Parameter of the ID Token's JOSE Header. For instance, if the alg is + * RS256, hash the token value with SHA-256, then take the left-most 128 bits and base64url encode + * them. The _hash value is a case sensitive string. + */ + +/** + * @name getHash + * @api private + * + * returns the sha length based off the JOSE alg heade value, defaults to sha256 + * + * @param token {String} token value to generate the hash from + * @param alg {String} ID Token JOSE header alg value (i.e. RS256, HS384, ES512, PS256) + * @param [crv] {String} For EdDSA the curve decides what hash algorithm is used. Required for EdDSA + */ +function getHash(alg, crv) { + switch (alg) { + case 'HS256': + case 'RS256': + case 'PS256': + case 'ES256': + case 'ES256K': + return createHash('sha256'); + + case 'HS384': + case 'RS384': + case 'PS384': + case 'ES384': + return createHash('sha384'); + + case 'HS512': + case 'RS512': + case 'PS512': + case 'ES512': + return createHash('sha512'); + + case 'EdDSA': + switch (crv) { + case 'Ed25519': + return createHash('sha512'); + case 'Ed448': + if (!shake256) { + throw new TypeError('Ed448 *_hash calculation is not supported in your Node.js runtime version'); + } + + return createHash('shake256', { outputLength: 114 }); + default: + throw new TypeError('unrecognized or invalid EdDSA curve provided'); + } + + default: + throw new TypeError('unrecognized or invalid JWS algorithm provided'); + } +} + +function generate(token, alg, crv) { + const digest = getHash(alg, crv).update(token).digest(); + return encode(digest.slice(0, digest.length / 2)); +} + +function validate(names, actual, source, alg, crv) { + if (typeof names.claim !== 'string' || !names.claim) { + throw new TypeError('names.claim must be a non-empty string'); + } + + if (typeof names.source !== 'string' || !names.source) { + throw new TypeError('names.source must be a non-empty string'); + } + + assert(typeof actual === 'string' && actual, `${names.claim} must be a non-empty string`); + assert(typeof source === 'string' && source, `${names.source} must be a non-empty string`); + + let expected; + let msg; + try { + expected = generate(source, alg, crv); + } catch (err) { + msg = format('%s could not be validated (%s)', names.claim, err.message); + } + + msg = msg || format('%s mismatch, expected %s, got: %s', names.claim, expected, actual); + + assert.equal(expected, actual, msg); +} + +module.exports = { + validate, + generate, +}; + + +/***/ }), + +/***/ 940: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const crypto = __nccwpck_require__(6113); + +const [major, minor] = process.version.substr(1).split('.').map((x) => parseInt(x, 10)); +const xofOutputLength = major > 12 || (major === 12 && minor >= 8); +const shake256 = xofOutputLength && crypto.getHashes().includes('shake256'); + +module.exports = shake256; + + +/***/ }), + +/***/ 38953: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(23985) +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 +} + + +/***/ }), + +/***/ 85611: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const mimicFn = __nccwpck_require__(66010); + +const calledFunctions = new WeakMap(); + +const onetime = (function_, options = {}) => { + if (typeof function_ !== 'function') { + throw new TypeError('Expected a function'); + } + + let returnValue; + let callCount = 0; + const functionName = function_.displayName || function_.name || ''; + + const onetime = function (...arguments_) { + calledFunctions.set(onetime, ++callCount); + + if (callCount === 1) { + returnValue = function_.apply(this, arguments_); + function_ = null; + } else if (options.throw === true) { + throw new Error(`Function \`${functionName}\` can only be called once`); + } + + return returnValue; + }; + + mimicFn(onetime, function_); + calledFunctions.set(onetime, callCount); + + return onetime; +}; + +module.exports = onetime; +// TODO: Remove this for the next major release +module.exports["default"] = onetime; + +module.exports.callCount = function_ => { + if (!calledFunctions.has(function_)) { + throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); + } + + return calledFunctions.get(function_); +}; + + +/***/ }), + +/***/ 15770: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable max-classes-per-file */ + +const { inspect } = __nccwpck_require__(73837); +const stdhttp = __nccwpck_require__(13685); +const crypto = __nccwpck_require__(6113); +const { strict: assert } = __nccwpck_require__(39491); +const querystring = __nccwpck_require__(63477); +const url = __nccwpck_require__(57310); + +const { ParseError } = __nccwpck_require__(2562); +const jose = __nccwpck_require__(68545); +const tokenHash = __nccwpck_require__(32493); + +const base64url = __nccwpck_require__(73216); +const defaults = __nccwpck_require__(2083); +const { assertSigningAlgValuesSupport, assertIssuerConfiguration } = __nccwpck_require__(97865); +const pick = __nccwpck_require__(35747); +const isPlainObject = __nccwpck_require__(39252); +const processResponse = __nccwpck_require__(15131); +const TokenSet = __nccwpck_require__(40095); +const { OPError, RPError } = __nccwpck_require__(56366); +const now = __nccwpck_require__(36413); +const { random } = __nccwpck_require__(40084); +const request = __nccwpck_require__(41477); +const { + CALLBACK_PROPERTIES, CLIENT_DEFAULTS, JWT_CONTENT, CLOCK_TOLERANCE, +} = __nccwpck_require__(28299); +const issuerRegistry = __nccwpck_require__(4317); +const instance = __nccwpck_require__(17914); +const { authenticatedPost, resolveResponseType, resolveRedirectUri } = __nccwpck_require__(41635); +const DeviceFlowHandle = __nccwpck_require__(87367); + +function pickCb(input) { + return pick(input, ...CALLBACK_PROPERTIES); +} + +function authorizationHeaderValue(token, tokenType = 'Bearer') { + return `${tokenType} ${token}`; +} + +function cleanUpClaims(claims) { + if (Object.keys(claims._claim_names).length === 0) { + delete claims._claim_names; + } + if (Object.keys(claims._claim_sources).length === 0) { + delete claims._claim_sources; + } +} + +function assignClaim(target, source, sourceName, throwOnMissing = true) { + return ([claim, inSource]) => { + if (inSource === sourceName) { + if (throwOnMissing && source[claim] === undefined) { + throw new RPError(`expected claim "${claim}" in "${sourceName}"`); + } else if (source[claim] !== undefined) { + target[claim] = source[claim]; + } + delete target._claim_names[claim]; + } + }; +} + +function verifyPresence(payload, jwt, prop) { + if (payload[prop] === undefined) { + throw new RPError({ + message: `missing required JWT property ${prop}`, + jwt, + }); + } +} + +function authorizationParams(params) { + const authParams = { + client_id: this.client_id, + scope: 'openid', + response_type: resolveResponseType.call(this), + redirect_uri: resolveRedirectUri.call(this), + ...params, + }; + + Object.entries(authParams).forEach(([key, value]) => { + if (value === null || value === undefined) { + delete authParams[key]; + } else if (key === 'claims' && typeof value === 'object') { + authParams[key] = JSON.stringify(value); + } else if (key === 'resource' && Array.isArray(value)) { + authParams[key] = value; + } else if (typeof value !== 'string') { + authParams[key] = String(value); + } + }); + + return authParams; +} + +async function claimJWT(label, jwt) { + try { + const { header, payload } = jose.JWT.decode(jwt, { complete: true }); + const { iss } = payload; + + if (header.alg === 'none') { + return payload; + } + + let key; + if (!iss || iss === this.issuer.issuer) { + key = await this.issuer.queryKeyStore(header); + } else if (issuerRegistry.has(iss)) { + key = await issuerRegistry.get(iss).queryKeyStore(header); + } else { + const discovered = await this.issuer.constructor.discover(iss); + key = await discovered.queryKeyStore(header); + } + return jose.JWT.verify(jwt, key); + } catch (err) { + if (err instanceof RPError || err instanceof OPError || err.name === 'AggregateError') { + throw err; + } else { + throw new RPError({ + printf: ['failed to validate the %s JWT (%s: %s)', label, err.name, err.message], + jwt, + }); + } + } +} + +function getKeystore(jwks) { + if (!isPlainObject(jwks) || !Array.isArray(jwks.keys) || jwks.keys.some((k) => !isPlainObject(k) || !('kty' in k))) { + throw new TypeError('jwks must be a JSON Web Key Set formatted object'); + } + + // eslint-disable-next-line no-restricted-syntax + for (const jwk of jwks.keys) { + if (jwk.kid === undefined) { + jwk.kid = `DONOTUSE.${random()}`; + } + } + + const keystore = jose.JWKS.asKeyStore(jwks); + if (keystore.all().some((key) => key.type !== 'private')) { + throw new TypeError('jwks must only contain private keys'); + } + return keystore; +} + +// if an OP doesnt support client_secret_basic but supports client_secret_post, use it instead +// this is in place to take care of most common pitfalls when first using discovered Issuers without +// the support for default values defined by Discovery 1.0 +function checkBasicSupport(client, metadata, properties) { + try { + const supported = client.issuer.token_endpoint_auth_methods_supported; + if (!supported.includes(properties.token_endpoint_auth_method)) { + if (supported.includes('client_secret_post')) { + properties.token_endpoint_auth_method = 'client_secret_post'; + } + } + } catch (err) {} +} + +function handleCommonMistakes(client, metadata, properties) { + if (!metadata.token_endpoint_auth_method) { // if no explicit value was provided + checkBasicSupport(client, metadata, properties); + } + + // :fp: c'mon people... RTFM + if (metadata.redirect_uri) { + if (metadata.redirect_uris) { + throw new TypeError('provide a redirect_uri or redirect_uris, not both'); + } + properties.redirect_uris = [metadata.redirect_uri]; + delete properties.redirect_uri; + } + + if (metadata.response_type) { + if (metadata.response_types) { + throw new TypeError('provide a response_type or response_types, not both'); + } + properties.response_types = [metadata.response_type]; + delete properties.response_type; + } +} + +function getDefaultsForEndpoint(endpoint, issuer, properties) { + if (!issuer[`${endpoint}_endpoint`]) return; + + const tokenEndpointAuthMethod = properties.token_endpoint_auth_method; + const tokenEndpointAuthSigningAlg = properties.token_endpoint_auth_signing_alg; + + const eam = `${endpoint}_endpoint_auth_method`; + const easa = `${endpoint}_endpoint_auth_signing_alg`; + + if (properties[eam] === undefined && properties[easa] === undefined) { + if (tokenEndpointAuthMethod !== undefined) { + properties[eam] = tokenEndpointAuthMethod; + } + if (tokenEndpointAuthSigningAlg !== undefined) { + properties[easa] = tokenEndpointAuthSigningAlg; + } + } +} + +class BaseClient {} + +module.exports = (issuer, aadIssValidation = false) => class Client extends BaseClient { + /** + * @name constructor + * @api public + */ + constructor(metadata = {}, jwks, options) { + super(); + + if (typeof metadata.client_id !== 'string' || !metadata.client_id) { + throw new TypeError('client_id is required'); + } + + const properties = { ...CLIENT_DEFAULTS, ...metadata }; + + handleCommonMistakes(this, metadata, properties); + + assertSigningAlgValuesSupport('token', this.issuer, properties); + + ['introspection', 'revocation'].forEach((endpoint) => { + getDefaultsForEndpoint(endpoint, this.issuer, properties); + assertSigningAlgValuesSupport(endpoint, this.issuer, properties); + }); + + Object.entries(properties).forEach(([key, value]) => { + instance(this).get('metadata').set(key, value); + if (!this[key]) { + Object.defineProperty(this, key, { + get() { return instance(this).get('metadata').get(key); }, + enumerable: true, + }); + } + }); + + if (jwks !== undefined) { + const keystore = getKeystore.call(this, jwks); + instance(this).set('keystore', keystore); + } + + if (options !== undefined) { + instance(this).set('options', options); + } + + this[CLOCK_TOLERANCE] = 0; + } + + /** + * @name authorizationUrl + * @api public + */ + authorizationUrl(params = {}) { + if (!isPlainObject(params)) { + throw new TypeError('params must be a plain object'); + } + assertIssuerConfiguration(this.issuer, 'authorization_endpoint'); + const target = url.parse(this.issuer.authorization_endpoint, true); + target.search = null; + target.query = { + ...target.query, + ...authorizationParams.call(this, params), + }; + return url.format(target); + } + + /** + * @name authorizationPost + * @api public + */ + authorizationPost(params = {}) { + if (!isPlainObject(params)) { + throw new TypeError('params must be a plain object'); + } + const inputs = authorizationParams.call(this, params); + const formInputs = Object.keys(inputs) + .map((name) => ``).join('\n'); + + return ` + + Requesting Authorization + + +
+ ${formInputs} +
+ +`; + } + + /** + * @name endSessionUrl + * @api public + */ + endSessionUrl(params = {}) { + assertIssuerConfiguration(this.issuer, 'end_session_endpoint'); + + const { + 0: postLogout, + length, + } = this.post_logout_redirect_uris || []; + + const { + post_logout_redirect_uri = length === 1 ? postLogout : undefined, + } = params; + + let hint = params.id_token_hint; + + if (hint instanceof TokenSet) { + if (!hint.id_token) { + throw new TypeError('id_token not present in TokenSet'); + } + hint = hint.id_token; + } + + const target = url.parse(this.issuer.end_session_endpoint, true); + target.search = null; + target.query = { + ...params, + ...target.query, + ...{ + post_logout_redirect_uri, + id_token_hint: hint, + }, + }; + + Object.entries(target.query).forEach(([key, value]) => { + if (value === null || value === undefined) { + delete target.query[key]; + } + }); + + return url.format(target); + } + + /** + * @name callbackParams + * @api public + */ + callbackParams(input) { // eslint-disable-line class-methods-use-this + const isIncomingMessage = input instanceof stdhttp.IncomingMessage + || (input && input.method && input.url); + const isString = typeof input === 'string'; + + if (!isString && !isIncomingMessage) { + throw new TypeError('#callbackParams only accepts string urls, http.IncomingMessage or a lookalike'); + } + + if (isIncomingMessage) { + switch (input.method) { + case 'GET': + return pickCb(url.parse(input.url, true).query); + case 'POST': + if (input.body === undefined) { + throw new TypeError('incoming message body missing, include a body parser prior to this method call'); + } + switch (typeof input.body) { + case 'object': + case 'string': + if (Buffer.isBuffer(input.body)) { + return pickCb(querystring.parse(input.body.toString('utf-8'))); + } + if (typeof input.body === 'string') { + return pickCb(querystring.parse(input.body)); + } + + return pickCb(input.body); + default: + throw new TypeError('invalid IncomingMessage body object'); + } + default: + throw new TypeError('invalid IncomingMessage method'); + } + } else { + return pickCb(url.parse(input, true).query); + } + } + + /** + * @name callback + * @api public + */ + async callback( + redirectUri, + parameters, + checks = {}, + { exchangeBody, clientAssertionPayload, DPoP } = {}, + ) { + let params = pickCb(parameters); + + if (checks.jarm && !('response' in parameters)) { + throw new RPError({ + message: 'expected a JARM response', + checks, + params, + }); + } else if ('response' in parameters) { + const decrypted = await this.decryptJARM(params.response); + params = await this.validateJARM(decrypted); + } + + if (this.default_max_age && !checks.max_age) { + checks.max_age = this.default_max_age; + } + + if (params.state && !checks.state) { + throw new TypeError('checks.state argument is missing'); + } + + if (!params.state && checks.state) { + throw new RPError({ + message: 'state missing from the response', + checks, + params, + }); + } + + if (checks.state !== params.state) { + throw new RPError({ + printf: ['state mismatch, expected %s, got: %s', checks.state, params.state], + checks, + params, + }); + } + + if (params.error) { + throw new OPError(params); + } + + const RESPONSE_TYPE_REQUIRED_PARAMS = { + code: ['code'], + id_token: ['id_token'], + token: ['access_token', 'token_type'], + }; + + if (checks.response_type) { + for (const type of checks.response_type.split(' ')) { // eslint-disable-line no-restricted-syntax + if (type === 'none') { + if (params.code || params.id_token || params.access_token) { + throw new RPError({ + message: 'unexpected params encountered for "none" response', + checks, + params, + }); + } + } else { + for (const param of RESPONSE_TYPE_REQUIRED_PARAMS[type]) { // eslint-disable-line no-restricted-syntax, max-len + if (!params[param]) { + throw new RPError({ + message: `${param} missing from response`, + checks, + params, + }); + } + } + } + } + } + + if (params.id_token) { + const tokenset = new TokenSet(params); + await this.decryptIdToken(tokenset); + await this.validateIdToken(tokenset, checks.nonce, 'authorization', checks.max_age, checks.state); + + if (!params.code) { + return tokenset; + } + } + + if (params.code) { + const tokenset = await this.grant({ + ...exchangeBody, + grant_type: 'authorization_code', + code: params.code, + redirect_uri: redirectUri, + code_verifier: checks.code_verifier, + }, { clientAssertionPayload, DPoP }); + + await this.decryptIdToken(tokenset); + await this.validateIdToken(tokenset, checks.nonce, 'token', checks.max_age); + + if (params.session_state) { + tokenset.session_state = params.session_state; + } + + return tokenset; + } + + return new TokenSet(params); + } + + /** + * @name oauthCallback + * @api public + */ + async oauthCallback( + redirectUri, + parameters, + checks = {}, + { exchangeBody, clientAssertionPayload, DPoP } = {}, + ) { + let params = pickCb(parameters); + + if (checks.jarm && !('response' in parameters)) { + throw new RPError({ + message: 'expected a JARM response', + checks, + params, + }); + } else if ('response' in parameters) { + const decrypted = await this.decryptJARM(params.response); + params = await this.validateJARM(decrypted); + } + + if (params.state && !checks.state) { + throw new TypeError('checks.state argument is missing'); + } + + if (!params.state && checks.state) { + throw new RPError({ + message: 'state missing from the response', + checks, + params, + }); + } + + if (checks.state !== params.state) { + throw new RPError({ + printf: ['state mismatch, expected %s, got: %s', checks.state, params.state], + checks, + params, + }); + } + + if (params.error) { + throw new OPError(params); + } + + const RESPONSE_TYPE_REQUIRED_PARAMS = { + code: ['code'], + token: ['access_token', 'token_type'], + }; + + if (checks.response_type) { + for (const type of checks.response_type.split(' ')) { // eslint-disable-line no-restricted-syntax + if (type === 'none') { + if (params.code || params.id_token || params.access_token) { + throw new RPError({ + message: 'unexpected params encountered for "none" response', + checks, + params, + }); + } + } + + if (RESPONSE_TYPE_REQUIRED_PARAMS[type]) { + for (const param of RESPONSE_TYPE_REQUIRED_PARAMS[type]) { // eslint-disable-line no-restricted-syntax, max-len + if (!params[param]) { + throw new RPError({ + message: `${param} missing from response`, + checks, + params, + }); + } + } + } + } + } + + if (params.code) { + return this.grant({ + ...exchangeBody, + grant_type: 'authorization_code', + code: params.code, + redirect_uri: redirectUri, + code_verifier: checks.code_verifier, + }, { clientAssertionPayload, DPoP }); + } + + return new TokenSet(params); + } + + /** + * @name decryptIdToken + * @api private + */ + async decryptIdToken(token) { + if (!this.id_token_encrypted_response_alg) { + return token; + } + + let idToken = token; + + if (idToken instanceof TokenSet) { + if (!idToken.id_token) { + throw new TypeError('id_token not present in TokenSet'); + } + idToken = idToken.id_token; + } + + const expectedAlg = this.id_token_encrypted_response_alg; + const expectedEnc = this.id_token_encrypted_response_enc; + + const result = await this.decryptJWE(idToken, expectedAlg, expectedEnc); + + if (token instanceof TokenSet) { + token.id_token = result; + return token; + } + + return result; + } + + async validateJWTUserinfo(body) { + const expectedAlg = this.userinfo_signed_response_alg; + + return this.validateJWT(body, expectedAlg, []); + } + + /** + * @name decryptJARM + * @api private + */ + async decryptJARM(response) { + if (!this.authorization_encrypted_response_alg) { + return response; + } + + const expectedAlg = this.authorization_encrypted_response_alg; + const expectedEnc = this.authorization_encrypted_response_enc; + + return this.decryptJWE(response, expectedAlg, expectedEnc); + } + + /** + * @name decryptJWTUserinfo + * @api private + */ + async decryptJWTUserinfo(body) { + if (!this.userinfo_encrypted_response_alg) { + return body; + } + + const expectedAlg = this.userinfo_encrypted_response_alg; + const expectedEnc = this.userinfo_encrypted_response_enc; + + return this.decryptJWE(body, expectedAlg, expectedEnc); + } + + /** + * @name decryptJWE + * @api private + */ + async decryptJWE(jwe, expectedAlg, expectedEnc = 'A128CBC-HS256') { + const header = JSON.parse(base64url.decode(jwe.split('.')[0])); + + if (header.alg !== expectedAlg) { + throw new RPError({ + printf: ['unexpected JWE alg received, expected %s, got: %s', expectedAlg, header.alg], + jwt: jwe, + }); + } + + if (header.enc !== expectedEnc) { + throw new RPError({ + printf: ['unexpected JWE enc received, expected %s, got: %s', expectedEnc, header.enc], + jwt: jwe, + }); + } + + let keyOrStore; + + if (expectedAlg.match(/^(?:RSA|ECDH)/)) { + keyOrStore = instance(this).get('keystore'); + } else { + keyOrStore = await this.joseSecret(expectedAlg === 'dir' ? expectedEnc : expectedAlg); + } + + const payload = jose.JWE.decrypt(jwe, keyOrStore); + return payload.toString('utf8'); + } + + /** + * @name validateIdToken + * @api private + */ + async validateIdToken(tokenSet, nonce, returnedBy, maxAge, state) { + let idToken = tokenSet; + + const expectedAlg = this.id_token_signed_response_alg; + + const isTokenSet = idToken instanceof TokenSet; + + if (isTokenSet) { + if (!idToken.id_token) { + throw new TypeError('id_token not present in TokenSet'); + } + idToken = idToken.id_token; + } + + idToken = String(idToken); + + const timestamp = now(); + const { protected: header, payload, key } = await this.validateJWT(idToken, expectedAlg); + + if (maxAge || (maxAge !== null && this.require_auth_time)) { + if (!payload.auth_time) { + throw new RPError({ + message: 'missing required JWT property auth_time', + jwt: idToken, + }); + } + if (typeof payload.auth_time !== 'number') { + throw new RPError({ + message: 'JWT auth_time claim must be a JSON numeric value', + jwt: idToken, + }); + } + } + + if (maxAge && (payload.auth_time + maxAge < timestamp - this[CLOCK_TOLERANCE])) { + throw new RPError({ + printf: ['too much time has elapsed since the last End-User authentication, max_age %i, auth_time: %i, now %i', maxAge, payload.auth_time, timestamp - this[CLOCK_TOLERANCE]], + now: timestamp, + tolerance: this[CLOCK_TOLERANCE], + auth_time: payload.auth_time, + jwt: idToken, + }); + } + + if (nonce !== null && (payload.nonce || nonce !== undefined) && payload.nonce !== nonce) { + throw new RPError({ + printf: ['nonce mismatch, expected %s, got: %s', nonce, payload.nonce], + jwt: idToken, + }); + } + + const fapi = this.constructor.name === 'FAPIClient'; + + if (returnedBy === 'authorization') { + if (!payload.at_hash && tokenSet.access_token) { + throw new RPError({ + message: 'missing required property at_hash', + jwt: idToken, + }); + } + + if (!payload.c_hash && tokenSet.code) { + throw new RPError({ + message: 'missing required property c_hash', + jwt: idToken, + }); + } + + if (fapi) { + if (!payload.s_hash && (tokenSet.state || state)) { + throw new RPError({ + message: 'missing required property s_hash', + jwt: idToken, + }); + } + } + + if (payload.s_hash) { + if (!state) { + throw new TypeError('cannot verify s_hash, "checks.state" property not provided'); + } + + try { + tokenHash.validate({ claim: 's_hash', source: 'state' }, payload.s_hash, state, header.alg, key && key.crv); + } catch (err) { + throw new RPError({ message: err.message, jwt: idToken }); + } + } + } + + if (fapi && payload.iat < timestamp - 3600) { + throw new RPError({ + printf: ['JWT issued too far in the past, now %i, iat %i', timestamp, payload.iat], + now: timestamp, + tolerance: this[CLOCK_TOLERANCE], + iat: payload.iat, + jwt: idToken, + }); + } + + if (tokenSet.access_token && payload.at_hash !== undefined) { + try { + tokenHash.validate({ claim: 'at_hash', source: 'access_token' }, payload.at_hash, tokenSet.access_token, header.alg, key && key.crv); + } catch (err) { + throw new RPError({ message: err.message, jwt: idToken }); + } + } + + if (tokenSet.code && payload.c_hash !== undefined) { + try { + tokenHash.validate({ claim: 'c_hash', source: 'code' }, payload.c_hash, tokenSet.code, header.alg, key && key.crv); + } catch (err) { + throw new RPError({ message: err.message, jwt: idToken }); + } + } + + return tokenSet; + } + + /** + * @name validateJWT + * @api private + */ + async validateJWT(jwt, expectedAlg, required = ['iss', 'sub', 'aud', 'exp', 'iat']) { + const isSelfIssued = this.issuer.issuer === 'https://self-issued.me'; + const timestamp = now(); + let header; + let payload; + try { + ({ header, payload } = jose.JWT.decode(jwt, { complete: true })); + } catch (err) { + throw new RPError({ + printf: ['failed to decode JWT (%s: %s)', err.name, err.message], + jwt, + }); + } + + if (header.alg !== expectedAlg) { + throw new RPError({ + printf: ['unexpected JWT alg received, expected %s, got: %s', expectedAlg, header.alg], + jwt, + }); + } + + if (isSelfIssued) { + required = [...required, 'sub_jwk']; // eslint-disable-line no-param-reassign + } + + required.forEach(verifyPresence.bind(undefined, payload, jwt)); + + if (payload.iss !== undefined) { + let expectedIss = this.issuer.issuer; + + if (aadIssValidation) { + expectedIss = this.issuer.issuer.replace('{tenantid}', payload.tid); + } + + if (payload.iss !== expectedIss) { + throw new RPError({ + printf: ['unexpected iss value, expected %s, got: %s', expectedIss, payload.iss], + jwt, + }); + } + } + + if (payload.iat !== undefined) { + if (typeof payload.iat !== 'number') { + throw new RPError({ + message: 'JWT iat claim must be a JSON numeric value', + jwt, + }); + } + } + + if (payload.nbf !== undefined) { + if (typeof payload.nbf !== 'number') { + throw new RPError({ + message: 'JWT nbf claim must be a JSON numeric value', + jwt, + }); + } + if (payload.nbf > timestamp + this[CLOCK_TOLERANCE]) { + throw new RPError({ + printf: ['JWT not active yet, now %i, nbf %i', timestamp + this[CLOCK_TOLERANCE], payload.nbf], + now: timestamp, + tolerance: this[CLOCK_TOLERANCE], + nbf: payload.nbf, + jwt, + }); + } + } + + if (payload.exp !== undefined) { + if (typeof payload.exp !== 'number') { + throw new RPError({ + message: 'JWT exp claim must be a JSON numeric value', + jwt, + }); + } + if (timestamp - this[CLOCK_TOLERANCE] >= payload.exp) { + throw new RPError({ + printf: ['JWT expired, now %i, exp %i', timestamp - this[CLOCK_TOLERANCE], payload.exp], + now: timestamp, + tolerance: this[CLOCK_TOLERANCE], + exp: payload.exp, + jwt, + }); + } + } + + if (payload.aud !== undefined) { + if (Array.isArray(payload.aud)) { + if (payload.aud.length > 1 && !payload.azp) { + throw new RPError({ + message: 'missing required JWT property azp', + jwt, + }); + } + + if (!payload.aud.includes(this.client_id)) { + throw new RPError({ + printf: ['aud is missing the client_id, expected %s to be included in %j', this.client_id, payload.aud], + jwt, + }); + } + } else if (payload.aud !== this.client_id) { + throw new RPError({ + printf: ['aud mismatch, expected %s, got: %s', this.client_id, payload.aud], + jwt, + }); + } + } + + if (payload.azp !== undefined) { + let { additionalAuthorizedParties } = instance(this).get('options') || {}; + + if (typeof additionalAuthorizedParties === 'string') { + additionalAuthorizedParties = [this.client_id, additionalAuthorizedParties]; + } else if (Array.isArray(additionalAuthorizedParties)) { + additionalAuthorizedParties = [this.client_id, ...additionalAuthorizedParties]; + } else { + additionalAuthorizedParties = [this.client_id]; + } + + if (!additionalAuthorizedParties.includes(payload.azp)) { + throw new RPError({ + printf: ['azp mismatch, got: %s', payload.azp], + jwt, + }); + } + } + + let key; + + if (isSelfIssued) { + try { + assert(isPlainObject(payload.sub_jwk)); + key = jose.JWK.asKey(payload.sub_jwk); + assert.equal(key.type, 'public'); + } catch (err) { + throw new RPError({ + message: 'failed to use sub_jwk claim as an asymmetric JSON Web Key', + jwt, + }); + } + if (key.thumbprint !== payload.sub) { + throw new RPError({ + message: 'failed to match the subject with sub_jwk', + jwt, + }); + } + } else if (header.alg.startsWith('HS')) { + key = await this.joseSecret(); + } else if (header.alg !== 'none') { + key = await this.issuer.queryKeyStore(header); + } + + if (!key && header.alg === 'none') { + return { protected: header, payload }; + } + + try { + return { + ...jose.JWS.verify(jwt, key, { complete: true }), + payload, + }; + } catch (err) { + throw new RPError({ + message: 'failed to validate JWT signature', + jwt, + }); + } + } + + /** + * @name refresh + * @api public + */ + async refresh(refreshToken, { exchangeBody, clientAssertionPayload, DPoP } = {}) { + let token = refreshToken; + + if (token instanceof TokenSet) { + if (!token.refresh_token) { + throw new TypeError('refresh_token not present in TokenSet'); + } + token = token.refresh_token; + } + + const tokenset = await this.grant({ + ...exchangeBody, + grant_type: 'refresh_token', + refresh_token: String(token), + }, { clientAssertionPayload, DPoP }); + + if (tokenset.id_token) { + await this.decryptIdToken(tokenset); + await this.validateIdToken(tokenset, null, 'token', null); + + if (refreshToken instanceof TokenSet && refreshToken.id_token) { + const expectedSub = refreshToken.claims().sub; + const actualSub = tokenset.claims().sub; + if (actualSub !== expectedSub) { + throw new RPError({ + printf: ['sub mismatch, expected %s, got: %s', expectedSub, actualSub], + jwt: tokenset.id_token, + }); + } + } + } + + return tokenset; + } + + async requestResource( + resourceUrl, + accessToken, + { + method, + headers, + body, + DPoP, + // eslint-disable-next-line no-nested-ternary + tokenType = DPoP ? 'DPoP' : accessToken instanceof TokenSet ? accessToken.token_type : 'Bearer', + } = {}, + ) { + if (accessToken instanceof TokenSet) { + if (!accessToken.access_token) { + throw new TypeError('access_token not present in TokenSet'); + } + accessToken = accessToken.access_token; // eslint-disable-line no-param-reassign + } + + const requestOpts = { + headers: { + Authorization: authorizationHeaderValue(accessToken, tokenType), + ...headers, + }, + body, + }; + + const mTLS = !!this.tls_client_certificate_bound_access_tokens; + + return request.call(this, { + ...requestOpts, + responseType: 'buffer', + method, + url: resourceUrl, + }, { accessToken, mTLS, DPoP }); + } + + /** + * @name userinfo + * @api public + */ + async userinfo(accessToken, { + method = 'GET', via = 'header', tokenType, params, DPoP, + } = {}) { + assertIssuerConfiguration(this.issuer, 'userinfo_endpoint'); + const options = { + tokenType, + method: String(method).toUpperCase(), + DPoP, + }; + + if (options.method !== 'GET' && options.method !== 'POST') { + throw new TypeError('#userinfo() method can only be POST or a GET'); + } + + if (via === 'query' && options.method !== 'GET') { + throw new TypeError('userinfo endpoints will only parse query strings for GET requests'); + } else if (via === 'body' && options.method !== 'POST') { + throw new TypeError('can only send body on POST'); + } + + const jwt = !!(this.userinfo_signed_response_alg || this.userinfo_encrypted_response_alg); + + if (jwt) { + options.headers = { Accept: 'application/jwt' }; + } else { + options.headers = { Accept: 'application/json' }; + } + + const mTLS = !!this.tls_client_certificate_bound_access_tokens; + + let targetUrl; + if (mTLS && this.issuer.mtls_endpoint_aliases) { + targetUrl = this.issuer.mtls_endpoint_aliases.userinfo_endpoint; + } + + targetUrl = new url.URL(targetUrl || this.issuer.userinfo_endpoint); + + // when via is not header we clear the Authorization header and add either + // query string parameters or urlencoded body access_token parameter + if (via === 'query') { + options.headers.Authorization = undefined; + targetUrl.searchParams.append('access_token', accessToken instanceof TokenSet ? accessToken.access_token : accessToken); + } else if (via === 'body') { + options.headers.Authorization = undefined; + options.headers['Content-Type'] = 'application/x-www-form-urlencoded'; + options.body = new url.URLSearchParams(); + options.body.append('access_token', accessToken instanceof TokenSet ? accessToken.access_token : accessToken); + } + + // handle additional parameters, GET via querystring, POST via urlencoded body + if (params) { + if (options.method === 'GET') { + Object.entries(params).forEach(([key, value]) => { + targetUrl.searchParams.append(key, value); + }); + } else if (options.body) { // POST && via body + Object.entries(params).forEach(([key, value]) => { + options.body.append(key, value); + }); + } else { // POST && via header + options.body = new url.URLSearchParams(); + options.headers['Content-Type'] = 'application/x-www-form-urlencoded'; + Object.entries(params).forEach(([key, value]) => { + options.body.append(key, value); + }); + } + } + + if (options.body) { + options.body = options.body.toString(); + } + + const response = await this.requestResource(targetUrl, accessToken, options); + + let parsed = processResponse(response, { bearer: true }); + + if (jwt) { + if (!JWT_CONTENT.test(response.headers['content-type'])) { + throw new RPError({ + message: 'expected application/jwt response from the userinfo_endpoint', + response, + }); + } + + const body = response.body.toString(); + const userinfo = await this.decryptJWTUserinfo(body); + if (!this.userinfo_signed_response_alg) { + try { + parsed = JSON.parse(userinfo); + assert(isPlainObject(parsed)); + } catch (err) { + throw new RPError({ + message: 'failed to parse userinfo JWE payload as JSON', + jwt: userinfo, + }); + } + } else { + ({ payload: parsed } = await this.validateJWTUserinfo(userinfo)); + } + } else { + try { + parsed = JSON.parse(response.body); + } catch (error) { + throw new ParseError(error, response); + } + } + + if (accessToken instanceof TokenSet && accessToken.id_token) { + const expectedSub = accessToken.claims().sub; + if (parsed.sub !== expectedSub) { + throw new RPError({ + printf: ['userinfo sub mismatch, expected %s, got: %s', expectedSub, parsed.sub], + body: parsed, + jwt: accessToken.id_token, + }); + } + } + + return parsed; + } + + /** + * @name derivedKey + * @api private + */ + async derivedKey(len) { + const cacheKey = `${len}_key`; + if (instance(this).has(cacheKey)) { + return instance(this).get(cacheKey); + } + + const hash = len <= 256 ? 'sha256' : len <= 384 ? 'sha384' : len <= 512 ? 'sha512' : false; // eslint-disable-line no-nested-ternary + if (!hash) { + throw new Error('unsupported symmetric encryption key derivation'); + } + + const derivedBuffer = crypto.createHash(hash) + .update(this.client_secret) + .digest() + .slice(0, len / 8); + + const key = jose.JWK.asKey({ k: base64url.encode(derivedBuffer), kty: 'oct' }); + instance(this).set(cacheKey, key); + + return key; + } + + /** + * @name joseSecret + * @api private + */ + async joseSecret(alg) { + if (!this.client_secret) { + throw new TypeError('client_secret is required'); + } + if (/^A(\d{3})(?:GCM)?KW$/.test(alg)) { + return this.derivedKey(parseInt(RegExp.$1, 10)); + } + + if (/^A(\d{3})(?:GCM|CBC-HS(\d{3}))$/.test(alg)) { + return this.derivedKey(parseInt(RegExp.$2 || RegExp.$1, 10)); + } + + if (instance(this).has('jose_secret')) { + return instance(this).get('jose_secret'); + } + + const key = jose.JWK.asKey({ k: base64url.encode(this.client_secret), kty: 'oct' }); + instance(this).set('jose_secret', key); + + return key; + } + + /** + * @name grant + * @api public + */ + async grant(body, { clientAssertionPayload, DPoP } = {}) { + assertIssuerConfiguration(this.issuer, 'token_endpoint'); + const response = await authenticatedPost.call( + this, + 'token', + { + form: body, + responseType: 'json', + }, + { clientAssertionPayload, DPoP }, + ); + const responseBody = processResponse(response); + + return new TokenSet(responseBody); + } + + /** + * @name deviceAuthorization + * @api public + */ + async deviceAuthorization(params = {}, { exchangeBody, clientAssertionPayload, DPoP } = {}) { + assertIssuerConfiguration(this.issuer, 'device_authorization_endpoint'); + assertIssuerConfiguration(this.issuer, 'token_endpoint'); + + const body = authorizationParams.call(this, { + client_id: this.client_id, + redirect_uri: null, + response_type: null, + ...params, + }); + + const response = await authenticatedPost.call( + this, + 'device_authorization', + { + responseType: 'json', + form: body, + }, + { clientAssertionPayload, endpointAuthMethod: 'token' }, + ); + const responseBody = processResponse(response); + + return new DeviceFlowHandle({ + client: this, + exchangeBody, + clientAssertionPayload, + response: responseBody, + maxAge: params.max_age, + DPoP, + }); + } + + /** + * @name revoke + * @api public + */ + async revoke(token, hint, { revokeBody, clientAssertionPayload } = {}) { + assertIssuerConfiguration(this.issuer, 'revocation_endpoint'); + if (hint !== undefined && typeof hint !== 'string') { + throw new TypeError('hint must be a string'); + } + + const form = { ...revokeBody, token }; + + if (hint) { + form.token_type_hint = hint; + } + + const response = await authenticatedPost.call( + this, + 'revocation', { + form, + }, { clientAssertionPayload }, + ); + processResponse(response, { body: false }); + } + + /** + * @name introspect + * @api public + */ + async introspect(token, hint, { introspectBody, clientAssertionPayload } = {}) { + assertIssuerConfiguration(this.issuer, 'introspection_endpoint'); + if (hint !== undefined && typeof hint !== 'string') { + throw new TypeError('hint must be a string'); + } + + const form = { ...introspectBody, token }; + if (hint) { + form.token_type_hint = hint; + } + + const response = await authenticatedPost.call( + this, + 'introspection', + { form, responseType: 'json' }, + { clientAssertionPayload }, + ); + + const responseBody = processResponse(response); + + return responseBody; + } + + /** + * @name fetchDistributedClaims + * @api public + */ + async fetchDistributedClaims(claims, tokens = {}) { + if (!isPlainObject(claims)) { + throw new TypeError('claims argument must be a plain object'); + } + + if (!isPlainObject(claims._claim_sources)) { + return claims; + } + + if (!isPlainObject(claims._claim_names)) { + return claims; + } + + const distributedSources = Object.entries(claims._claim_sources) + .filter(([, value]) => value && value.endpoint); + + await Promise.all(distributedSources.map(async ([sourceName, def]) => { + try { + const requestOpts = { + headers: { + Accept: 'application/jwt', + Authorization: authorizationHeaderValue(def.access_token || tokens[sourceName]), + }, + }; + + const response = await request.call(this, { + ...requestOpts, + method: 'GET', + url: def.endpoint, + }); + const body = processResponse(response, { bearer: true }); + + const decoded = await claimJWT.call(this, 'distributed', body); + delete claims._claim_sources[sourceName]; + Object.entries(claims._claim_names).forEach( + assignClaim(claims, decoded, sourceName, false), + ); + } catch (err) { + err.src = sourceName; + throw err; + } + })); + + cleanUpClaims(claims); + return claims; + } + + /** + * @name unpackAggregatedClaims + * @api public + */ + async unpackAggregatedClaims(claims) { + if (!isPlainObject(claims)) { + throw new TypeError('claims argument must be a plain object'); + } + + if (!isPlainObject(claims._claim_sources)) { + return claims; + } + + if (!isPlainObject(claims._claim_names)) { + return claims; + } + + const aggregatedSources = Object.entries(claims._claim_sources) + .filter(([, value]) => value && value.JWT); + + await Promise.all(aggregatedSources.map(async ([sourceName, def]) => { + try { + const decoded = await claimJWT.call(this, 'aggregated', def.JWT); + delete claims._claim_sources[sourceName]; + Object.entries(claims._claim_names).forEach(assignClaim(claims, decoded, sourceName)); + } catch (err) { + err.src = sourceName; + throw err; + } + })); + + cleanUpClaims(claims); + return claims; + } + + /** + * @name register + * @api public + */ + static async register(metadata, options = {}) { + const { initialAccessToken, jwks, ...clientOptions } = options; + + assertIssuerConfiguration(this.issuer, 'registration_endpoint'); + + if (jwks !== undefined && !(metadata.jwks || metadata.jwks_uri)) { + const keystore = getKeystore.call(this, jwks); + metadata.jwks = keystore.toJWKS(false); + // eslint-disable-next-line no-restricted-syntax + for (const jwk of metadata.jwks.keys) { + if (jwk.kid.startsWith('DONOTUSE.')) { + delete jwk.kid; + } + } + } + + const response = await request.call(this, { + headers: initialAccessToken ? { + Authorization: authorizationHeaderValue(initialAccessToken), + } : undefined, + responseType: 'json', + json: metadata, + url: this.issuer.registration_endpoint, + method: 'POST', + }); + const responseBody = processResponse(response, { statusCode: 201, bearer: true }); + + return new this(responseBody, jwks, clientOptions); + } + + /** + * @name metadata + * @api public + */ + get metadata() { + const copy = {}; + instance(this).get('metadata').forEach((value, key) => { + copy[key] = value; + }); + return copy; + } + + /** + * @name fromUri + * @api public + */ + static async fromUri(registrationClientUri, registrationAccessToken, jwks, clientOptions) { + const response = await request.call(this, { + method: 'GET', + url: registrationClientUri, + responseType: 'json', + headers: { Authorization: authorizationHeaderValue(registrationAccessToken) }, + }); + const responseBody = processResponse(response, { bearer: true }); + + return new this(responseBody, jwks, clientOptions); + } + + /** + * @name requestObject + * @api public + */ + async requestObject(requestObject = {}, { + sign: signingAlgorithm = this.request_object_signing_alg || 'none', + encrypt: { + alg: eKeyManagement = this.request_object_encryption_alg, + enc: eContentEncryption = this.request_object_encryption_enc || 'A128CBC-HS256', + } = {}, + } = {}) { + if (!isPlainObject(requestObject)) { + throw new TypeError('requestObject must be a plain object'); + } + + let signed; + let key; + + const fapi = this.constructor.name === 'FAPIClient'; + const unix = now(); + const header = { alg: signingAlgorithm, typ: 'oauth-authz-req+jwt' }; + const payload = JSON.stringify(defaults({}, requestObject, { + iss: this.client_id, + aud: this.issuer.issuer, + client_id: this.client_id, + jti: random(), + iat: unix, + exp: unix + 300, + ...(fapi ? { nbf: unix } : undefined), + })); + + if (signingAlgorithm === 'none') { + signed = [ + base64url.encode(JSON.stringify(header)), + base64url.encode(payload), + '', + ].join('.'); + } else { + const symmetric = signingAlgorithm.startsWith('HS'); + if (symmetric) { + key = await this.joseSecret(); + } else { + const keystore = instance(this).get('keystore'); + + if (!keystore) { + throw new TypeError(`no keystore present for client, cannot sign using alg ${signingAlgorithm}`); + } + key = keystore.get({ alg: signingAlgorithm, use: 'sig' }); + if (!key) { + throw new TypeError(`no key to sign with found for alg ${signingAlgorithm}`); + } + } + + signed = jose.JWS.sign(payload, key, { + ...header, + kid: symmetric || key.kid.startsWith('DONOTUSE.') ? undefined : key.kid, + }); + } + + if (!eKeyManagement) { + return signed; + } + + const fields = { alg: eKeyManagement, enc: eContentEncryption, cty: 'oauth-authz-req+jwt' }; + + if (fields.alg.match(/^(RSA|ECDH)/)) { + [key] = await this.issuer.queryKeyStore({ + alg: fields.alg, + enc: fields.enc, + use: 'enc', + }, { allowMulti: true }); + } else { + key = await this.joseSecret(fields.alg === 'dir' ? fields.enc : fields.alg); + } + + return jose.JWE.encrypt(signed, key, { + ...fields, + kid: key.kty === 'oct' ? undefined : key.kid, + }); + } + + /** + * @name pushedAuthorizationRequest + * @api public + */ + async pushedAuthorizationRequest(params = {}, { clientAssertionPayload } = {}) { + assertIssuerConfiguration(this.issuer, 'pushed_authorization_request_endpoint'); + + const body = { + ...('request' in params ? params : authorizationParams.call(this, params)), + client_id: this.client_id, + }; + + const response = await authenticatedPost.call( + this, + 'pushed_authorization_request', + { + responseType: 'json', + form: body, + }, + { clientAssertionPayload, endpointAuthMethod: 'token' }, + ); + const responseBody = processResponse(response, { statusCode: 201 }); + + if (!('expires_in' in responseBody)) { + throw new RPError({ + message: 'expected expires_in in Pushed Authorization Successful Response', + response, + }); + } + if (typeof responseBody.expires_in !== 'number') { + throw new RPError({ + message: 'invalid expires_in value in Pushed Authorization Successful Response', + response, + }); + } + if (!('request_uri' in responseBody)) { + throw new RPError({ + message: 'expected request_uri in Pushed Authorization Successful Response', + response, + }); + } + if (typeof responseBody.request_uri !== 'string') { + throw new RPError({ + message: 'invalid request_uri value in Pushed Authorization Successful Response', + response, + }); + } + + return responseBody; + } + + /** + * @name issuer + * @api public + */ + static get issuer() { + return issuer; + } + + /** + * @name issuer + * @api public + */ + get issuer() { // eslint-disable-line class-methods-use-this + return issuer; + } + + /* istanbul ignore next */ + [inspect.custom]() { + return `${this.constructor.name} ${inspect(this.metadata, { + depth: Infinity, + colors: process.stdout.isTTY, + compact: false, + sorted: true, + })}`; + } +}; + +/** + * @name validateJARM + * @api private + */ +async function validateJARM(response) { + const expectedAlg = this.authorization_signed_response_alg; + const { payload } = await this.validateJWT(response, expectedAlg, ['iss', 'exp', 'aud']); + return pickCb(payload); +} + +Object.defineProperty(BaseClient.prototype, 'validateJARM', { + enumerable: true, + configurable: true, + value(...args) { + process.emitWarning( + "The JARM API implements an OIDF implementer's draft. Breaking draft implementations are included as minor versions of the openid-client library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.", + 'DraftWarning', + ); + Object.defineProperty(BaseClient.prototype, 'validateJARM', { + enumerable: true, + configurable: true, + value: validateJARM, + }); + return this.validateJARM(...args); + }, +}); + +/** + * @name dpopProof + * @api private + */ +function dpopProof(payload, jwk, accessToken) { + if (!isPlainObject(payload)) { + throw new TypeError('payload must be a plain object'); + } + + let key; + try { + key = jose.JWK.asKey(jwk); + assert(key.type === 'private'); + } catch (err) { + throw new TypeError('"DPoP" option must be an asymmetric private key to sign the DPoP Proof JWT with'); + } + + let { alg } = key; + + if (!alg && this.issuer.dpop_signing_alg_values_supported) { + const algs = key.algorithms('sign'); + alg = this.issuer.dpop_signing_alg_values_supported.find((a) => algs.has(a)); + } + + if (!alg) { + [alg] = key.algorithms('sign'); + } + + return jose.JWS.sign({ + iat: now(), + jti: random(), + ath: accessToken ? base64url.encode(crypto.createHash('sha256').update(accessToken).digest()) : undefined, + ...payload, + }, jwk, { + alg, + typ: 'dpop+jwt', + jwk: pick(key, 'kty', 'crv', 'x', 'y', 'e', 'n'), + }); +} + +Object.defineProperty(BaseClient.prototype, 'dpopProof', { + enumerable: true, + configurable: true, + value(...args) { + process.emitWarning( + 'The DPoP APIs implements an IETF draft (https://www.ietf.org/archive/id/draft-ietf-oauth-dpop-03.html). Breaking draft implementations are included as minor versions of the openid-client library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.', + 'DraftWarning', + ); + Object.defineProperty(BaseClient.prototype, 'dpopProof', { + enumerable: true, + configurable: true, + value: dpopProof, + }); + return this.dpopProof(...args); + }, +}); + +module.exports.BaseClient = BaseClient; + + +/***/ }), + +/***/ 87367: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable camelcase */ +const { inspect } = __nccwpck_require__(73837); + +const { RPError, OPError } = __nccwpck_require__(56366); +const instance = __nccwpck_require__(17914); +const now = __nccwpck_require__(36413); +const { authenticatedPost } = __nccwpck_require__(41635); +const processResponse = __nccwpck_require__(15131); +const TokenSet = __nccwpck_require__(40095); + +class DeviceFlowHandle { + constructor({ + client, exchangeBody, clientAssertionPayload, response, maxAge, DPoP, + }) { + ['verification_uri', 'user_code', 'device_code'].forEach((prop) => { + if (typeof response[prop] !== 'string' || !response[prop]) { + throw new RPError(`expected ${prop} string to be returned by Device Authorization Response, got %j`, response[prop]); + } + }); + + if (!Number.isSafeInteger(response.expires_in)) { + throw new RPError('expected expires_in number to be returned by Device Authorization Response, got %j', response.expires_in); + } + + instance(this).expires_at = now() + response.expires_in; + instance(this).client = client; + instance(this).DPoP = DPoP; + instance(this).maxAge = maxAge; + instance(this).exchangeBody = exchangeBody; + instance(this).clientAssertionPayload = clientAssertionPayload; + instance(this).response = response; + instance(this).interval = response.interval * 1000 || 5000; + } + + abort() { + instance(this).aborted = true; + } + + async poll({ signal } = {}) { + if ((signal && signal.aborted) || instance(this).aborted) { + throw new RPError('polling aborted'); + } + + if (this.expired()) { + throw new RPError('the device code %j has expired and the device authorization session has concluded', this.device_code); + } + + await new Promise((resolve) => setTimeout(resolve, instance(this).interval)); + + const response = await authenticatedPost.call( + instance(this).client, + 'token', + { + form: { + ...instance(this).exchangeBody, + grant_type: 'urn:ietf:params:oauth:grant-type:device_code', + device_code: this.device_code, + }, + responseType: 'json', + }, + { clientAssertionPayload: instance(this).clientAssertionPayload, DPoP: instance(this).DPoP }, + ); + + let responseBody; + try { + responseBody = processResponse(response); + } catch (err) { + switch (err instanceof OPError && err.error) { + case 'slow_down': + instance(this).interval += 5000; + case 'authorization_pending': // eslint-disable-line no-fallthrough + return this.poll({ signal }); + default: + throw err; + } + } + + const tokenset = new TokenSet(responseBody); + + if ('id_token' in tokenset) { + await instance(this).client.decryptIdToken(tokenset); + await instance(this).client.validateIdToken(tokenset, undefined, 'token', instance(this).maxAge); + } + + return tokenset; + } + + get device_code() { + return instance(this).response.device_code; + } + + get user_code() { + return instance(this).response.user_code; + } + + get verification_uri() { + return instance(this).response.verification_uri; + } + + get verification_uri_complete() { + return instance(this).response.verification_uri_complete; + } + + get expires_in() { + return Math.max.apply(null, [instance(this).expires_at - now(), 0]); + } + + expired() { + return this.expires_in === 0; + } + + /* istanbul ignore next */ + [inspect.custom]() { + return `${this.constructor.name} ${inspect(instance(this).response, { + depth: Infinity, + colors: process.stdout.isTTY, + compact: false, + sorted: true, + })}`; + } +} + +module.exports = DeviceFlowHandle; + + +/***/ }), + +/***/ 56366: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable camelcase */ +const { format } = __nccwpck_require__(73837); + +const makeError = __nccwpck_require__(24083); + +function OPError({ + error_description, + error, + error_uri, + session_state, + state, + scope, +}, response) { + OPError.super.call(this, !error_description ? error : `${error} (${error_description})`); + + Object.assign( + this, + { error }, + (error_description && { error_description }), + (error_uri && { error_uri }), + (state && { state }), + (scope && { scope }), + (session_state && { session_state }), + ); + + if (response) { + Object.defineProperty(this, 'response', { + value: response, + }); + } +} + +makeError(OPError); + +function RPError(...args) { + if (typeof args[0] === 'string') { + RPError.super.call(this, format(...args)); + } else { + const { + message, printf, response, ...rest + } = args[0]; + if (printf) { + RPError.super.call(this, format(...printf)); + } else { + RPError.super.call(this, message); + } + Object.assign(this, rest); + if (response) { + Object.defineProperty(this, 'response', { + value: response, + }); + } + } +} + +makeError(RPError); + +module.exports = { + OPError, + RPError, +}; + + +/***/ }), + +/***/ 97865: +/***/ ((module) => { + +function assertSigningAlgValuesSupport(endpoint, issuer, properties) { + if (!issuer[`${endpoint}_endpoint`]) return; + + const eam = `${endpoint}_endpoint_auth_method`; + const easa = `${endpoint}_endpoint_auth_signing_alg`; + const easavs = `${endpoint}_endpoint_auth_signing_alg_values_supported`; + + if (properties[eam] && properties[eam].endsWith('_jwt') && !properties[easa] && !issuer[easavs]) { + throw new TypeError(`${easavs} must be configured on the issuer if ${easa} is not defined on a client`); + } +} + +function assertIssuerConfiguration(issuer, endpoint) { + if (!issuer[endpoint]) { + throw new TypeError(`${endpoint} must be configured on the issuer`); + } +} + +module.exports = { + assertSigningAlgValuesSupport, + assertIssuerConfiguration, +}; + + +/***/ }), + +/***/ 73216: +/***/ ((module) => { + +let encode; +if (Buffer.isEncoding('base64url')) { + encode = (input, encoding = 'utf8') => Buffer.from(input, encoding).toString('base64url'); +} else { + const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); + encode = (input, encoding = 'utf8') => fromBase64(Buffer.from(input, encoding).toString('base64')); +} + +const decode = (input) => Buffer.from(input, 'base64'); + +module.exports.decode = decode; +module.exports.encode = encode; + + +/***/ }), + +/***/ 41635: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const jose = __nccwpck_require__(68545); + +const { assertIssuerConfiguration } = __nccwpck_require__(97865); +const { random } = __nccwpck_require__(40084); +const now = __nccwpck_require__(36413); +const request = __nccwpck_require__(41477); +const instance = __nccwpck_require__(17914); +const merge = __nccwpck_require__(66678); + +const formUrlEncode = (value) => encodeURIComponent(value).replace(/%20/g, '+'); + +async function clientAssertion(endpoint, payload) { + let alg = this[`${endpoint}_endpoint_auth_signing_alg`]; + if (!alg) { + assertIssuerConfiguration(this.issuer, `${endpoint}_endpoint_auth_signing_alg_values_supported`); + } + + if (this[`${endpoint}_endpoint_auth_method`] === 'client_secret_jwt') { + const key = await this.joseSecret(); + + if (!alg) { + const supported = this.issuer[`${endpoint}_endpoint_auth_signing_alg_values_supported`]; + alg = Array.isArray(supported) && supported.find((signAlg) => key.algorithms('sign').has(signAlg)); + } + + return jose.JWS.sign(payload, key, { alg, typ: 'JWT' }); + } + + const keystore = instance(this).get('keystore'); + + if (!keystore) { + throw new TypeError('no client jwks provided for signing a client assertion with'); + } + + if (!alg) { + const algs = new Set(); + + keystore.all().forEach((key) => { + key.algorithms('sign').forEach(Set.prototype.add.bind(algs)); + }); + + const supported = this.issuer[`${endpoint}_endpoint_auth_signing_alg_values_supported`]; + alg = Array.isArray(supported) && supported.find((signAlg) => algs.has(signAlg)); + } + + const key = keystore.get({ alg, use: 'sig' }); + if (!key) { + throw new TypeError(`no key found in client jwks to sign a client assertion with using alg ${alg}`); + } + return jose.JWS.sign(payload, key, { alg, typ: 'JWT', kid: key.kid.startsWith('DONOTUSE.') ? undefined : key.kid }); +} + +async function authFor(endpoint, { clientAssertionPayload } = {}) { + const authMethod = this[`${endpoint}_endpoint_auth_method`]; + switch (authMethod) { + case 'self_signed_tls_client_auth': + case 'tls_client_auth': + case 'none': + return { form: { client_id: this.client_id } }; + case 'client_secret_post': + if (!this.client_secret) { + throw new TypeError('client_secret_post client authentication method requires a client_secret'); + } + return { form: { client_id: this.client_id, client_secret: this.client_secret } }; + case 'private_key_jwt': + case 'client_secret_jwt': { + const timestamp = now(); + + const mTLS = endpoint === 'token' && this.tls_client_certificate_bound_access_tokens; + const audience = [...new Set([ + this.issuer.issuer, + this.issuer.token_endpoint, + this.issuer[`${endpoint}_endpoint`], + mTLS && this.issuer.mtls_endpoint_aliases + ? this.issuer.mtls_endpoint_aliases.token_endpoint : undefined, + ].filter(Boolean))]; + + const assertion = await clientAssertion.call(this, endpoint, { + iat: timestamp, + exp: timestamp + 60, + jti: random(), + iss: this.client_id, + sub: this.client_id, + aud: audience, + ...clientAssertionPayload, + }); + + return { + form: { + client_id: this.client_id, + client_assertion: assertion, + client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', + }, + }; + } + default: { // client_secret_basic + // This is correct behaviour, see https://tools.ietf.org/html/rfc6749#section-2.3.1 and the + // related appendix. (also https://github.com/panva/node-openid-client/pull/91) + // > The client identifier is encoded using the + // > "application/x-www-form-urlencoded" encoding algorithm per + // > Appendix B, and the encoded value is used as the username; the client + // > password is encoded using the same algorithm and used as the + // > password. + if (!this.client_secret) { + throw new TypeError('client_secret_basic client authentication method requires a client_secret'); + } + const encoded = `${formUrlEncode(this.client_id)}:${formUrlEncode(this.client_secret)}`; + const value = Buffer.from(encoded).toString('base64'); + return { headers: { Authorization: `Basic ${value}` } }; + } + } +} + +function resolveResponseType() { + const { length, 0: value } = this.response_types; + + if (length === 1) { + return value; + } + + return undefined; +} + +function resolveRedirectUri() { + const { length, 0: value } = this.redirect_uris || []; + + if (length === 1) { + return value; + } + + return undefined; +} + +async function authenticatedPost(endpoint, opts, { + clientAssertionPayload, endpointAuthMethod = endpoint, DPoP, +} = {}) { + const auth = await authFor.call(this, endpointAuthMethod, { clientAssertionPayload }); + const requestOpts = merge(opts, auth); + + const mTLS = this[`${endpointAuthMethod}_endpoint_auth_method`].includes('tls_client_auth') + || (endpoint === 'token' && this.tls_client_certificate_bound_access_tokens); + + let targetUrl; + if (mTLS && this.issuer.mtls_endpoint_aliases) { + targetUrl = this.issuer.mtls_endpoint_aliases[`${endpoint}_endpoint`]; + } + + targetUrl = targetUrl || this.issuer[`${endpoint}_endpoint`]; + + if ('form' in requestOpts) { + for (const [key, value] of Object.entries(requestOpts.form)) { // eslint-disable-line no-restricted-syntax, max-len + if (typeof value === 'undefined') { + delete requestOpts.form[key]; + } + } + } + + return request.call(this, { + ...requestOpts, + method: 'POST', + url: targetUrl, + }, { mTLS, DPoP }); +} + +module.exports = { + resolveResponseType, + resolveRedirectUri, + authFor, + authenticatedPost, +}; + + +/***/ }), + +/***/ 28299: +/***/ ((module) => { + +const OIDC_DISCOVERY = '/.well-known/openid-configuration'; +const OAUTH2_DISCOVERY = '/.well-known/oauth-authorization-server'; +const WEBFINGER = '/.well-known/webfinger'; +const REL = 'http://openid.net/specs/connect/1.0/issuer'; +const AAD_MULTITENANT_DISCOVERY = [ + `https://login.microsoftonline.com/common${OIDC_DISCOVERY}`, + `https://login.microsoftonline.com/common/v2.0${OIDC_DISCOVERY}`, + `https://login.microsoftonline.com/organizations/v2.0${OIDC_DISCOVERY}`, + `https://login.microsoftonline.com/consumers/v2.0${OIDC_DISCOVERY}`, +]; + +const CLIENT_DEFAULTS = { + grant_types: ['authorization_code'], + id_token_signed_response_alg: 'RS256', + authorization_signed_response_alg: 'RS256', + response_types: ['code'], + token_endpoint_auth_method: 'client_secret_basic', +}; + +const ISSUER_DEFAULTS = { + claim_types_supported: ['normal'], + claims_parameter_supported: false, + grant_types_supported: ['authorization_code', 'implicit'], + request_parameter_supported: false, + request_uri_parameter_supported: true, + require_request_uri_registration: false, + response_modes_supported: ['query', 'fragment'], + token_endpoint_auth_methods_supported: ['client_secret_basic'], +}; + +const CALLBACK_PROPERTIES = [ + 'access_token', // 6749 + 'code', // 6749 + 'error', // 6749 + 'error_description', // 6749 + 'error_uri', // 6749 + 'expires_in', // 6749 + 'id_token', // Core 1.0 + 'state', // 6749 + 'token_type', // 6749 + 'session_state', // Session Management + 'response', // JARM +]; + +const JWT_CONTENT = /^application\/jwt/; + +const HTTP_OPTIONS = Symbol('openid-client.custom.http-options'); +const CLOCK_TOLERANCE = Symbol('openid-client.custom.clock-tolerance'); + +module.exports = { + AAD_MULTITENANT_DISCOVERY, + CALLBACK_PROPERTIES, + CLIENT_DEFAULTS, + CLOCK_TOLERANCE, + HTTP_OPTIONS, + ISSUER_DEFAULTS, + JWT_CONTENT, + OAUTH2_DISCOVERY, + OIDC_DISCOVERY, + REL, + WEBFINGER, +}; + + +/***/ }), + +/***/ 67217: +/***/ ((module) => { + +module.exports = (obj) => JSON.parse(JSON.stringify(obj)); + + +/***/ }), + +/***/ 2083: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable no-restricted-syntax, no-continue */ + +const isPlainObject = __nccwpck_require__(39252); + +function defaults(deep, target, ...sources) { + for (const source of sources) { + if (!isPlainObject(source)) { + continue; + } + for (const [key, value] of Object.entries(source)) { + /* istanbul ignore if */ + if (key === '__proto__' || key === 'constructor') { + continue; + } + if (typeof target[key] === 'undefined' && typeof value !== 'undefined') { + target[key] = value; + } + + if (deep && isPlainObject(target[key]) && isPlainObject(value)) { + defaults(true, target[key], value); + } + } + } + + return target; +} + +module.exports = defaults.bind(undefined, false); +module.exports.deep = defaults.bind(undefined, true); + + +/***/ }), + +/***/ 40084: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { createHash, randomBytes } = __nccwpck_require__(6113); + +const base64url = __nccwpck_require__(73216); + +const random = (bytes = 32) => base64url.encode(randomBytes(bytes)); + +module.exports = { + random, + state: random, + nonce: random, + codeVerifier: random, + codeChallenge: (codeVerifier) => base64url.encode(createHash('sha256').update(codeVerifier).digest()), +}; + + +/***/ }), + +/***/ 99406: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const url = __nccwpck_require__(57310); +const { strict: assert } = __nccwpck_require__(39491); + +module.exports = (target) => { + try { + const { protocol } = new url.URL(target); + assert(protocol.match(/^(https?:)$/)); + return true; + } catch (err) { + throw new TypeError('only valid absolute URLs can be requested'); + } +}; + + +/***/ }), + +/***/ 39252: +/***/ ((module) => { + +module.exports = (a) => !!a && a.constructor === Object; + + +/***/ }), + +/***/ 66678: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable no-restricted-syntax, no-param-reassign, no-continue */ + +const isPlainObject = __nccwpck_require__(39252); + +function merge(target, ...sources) { + for (const source of sources) { + if (!isPlainObject(source)) { + continue; + } + for (const [key, value] of Object.entries(source)) { + /* istanbul ignore if */ + if (key === '__proto__' || key === 'constructor') { + continue; + } + if (isPlainObject(target[key]) && isPlainObject(value)) { + target[key] = merge(target[key], value); + } else if (typeof value !== 'undefined') { + target[key] = value; + } + } + } + + return target; +} + +module.exports = merge; + + +/***/ }), + +/***/ 35747: +/***/ ((module) => { + +module.exports = function pick(object, ...paths) { + const obj = {}; + for (const path of paths) { // eslint-disable-line no-restricted-syntax + if (object[path]) { + obj[path] = object[path]; + } + } + return obj; +}; + + +/***/ }), + +/***/ 15131: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { STATUS_CODES } = __nccwpck_require__(13685); +const { format } = __nccwpck_require__(73837); + +const { OPError } = __nccwpck_require__(56366); + +const REGEXP = /(\w+)=("[^"]*")/g; +const throwAuthenticateErrors = (response) => { + const params = {}; + try { + while ((REGEXP.exec(response.headers['www-authenticate'])) !== null) { + if (RegExp.$1 && RegExp.$2) { + params[RegExp.$1] = RegExp.$2.slice(1, -1); + } + } + } catch (err) {} + + if (params.error) { + throw new OPError(params, response); + } +}; + +const isStandardBodyError = (response) => { + let result = false; + try { + let jsonbody; + if (typeof response.body !== 'object' || Buffer.isBuffer(response.body)) { + jsonbody = JSON.parse(response.body); + } else { + jsonbody = response.body; + } + result = typeof jsonbody.error === 'string' && jsonbody.error.length; + if (result) response.body = jsonbody; + } catch (err) {} + + return result; +}; + +function processResponse(response, { statusCode = 200, body = true, bearer = false } = {}) { + if (response.statusCode !== statusCode) { + if (bearer) { + throwAuthenticateErrors(response); + } + + if (isStandardBodyError(response)) { + throw new OPError(response.body, response); + } + + throw new OPError({ + error: format('expected %i %s, got: %i %s', statusCode, STATUS_CODES[statusCode], response.statusCode, STATUS_CODES[response.statusCode]), + }, response); + } + + if (body && !response.body) { + throw new OPError({ + error: format('expected %i %s with body but no body was returned', statusCode, STATUS_CODES[statusCode]), + }, response); + } + + return response.body; +} + +module.exports = processResponse; + + +/***/ }), + +/***/ 41477: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Got = __nccwpck_require__(2562); + +const pkg = __nccwpck_require__(82696); + +const { deep: defaultsDeep } = __nccwpck_require__(2083); +const isAbsoluteUrl = __nccwpck_require__(99406); +const { HTTP_OPTIONS } = __nccwpck_require__(28299); + +let DEFAULT_HTTP_OPTIONS; +let got; + +const setDefaults = (options) => { + DEFAULT_HTTP_OPTIONS = defaultsDeep({}, options, DEFAULT_HTTP_OPTIONS); + got = Got.extend(DEFAULT_HTTP_OPTIONS); +}; + +setDefaults({ + followRedirect: false, + headers: { 'User-Agent': `${pkg.name}/${pkg.version} (${pkg.homepage})` }, + retry: 0, + timeout: 3500, + throwHttpErrors: false, +}); + +module.exports = async function request(options, { accessToken, mTLS = false, DPoP } = {}) { + const { url } = options; + isAbsoluteUrl(url); + const optsFn = this[HTTP_OPTIONS]; + let opts = options; + + if (DPoP && 'dpopProof' in this) { + opts.headers = opts.headers || {}; + opts.headers.DPoP = this.dpopProof({ + htu: url, + htm: options.method, + }, DPoP, accessToken); + } + + if (optsFn) { + opts = optsFn.call(this, defaultsDeep({}, opts, DEFAULT_HTTP_OPTIONS)); + } + + if ( + mTLS + && ( + (!opts.key || !opts.cert) + && (!opts.https || !((opts.https.key && opts.https.certificate) || opts.https.pfx)) + ) + ) { + throw new TypeError('mutual-TLS certificate and key not set'); + } + + return got(opts); +}; + +module.exports.setDefaults = setDefaults; + + +/***/ }), + +/***/ 36413: +/***/ ((module) => { + +module.exports = () => Math.floor(Date.now() / 1000); + + +/***/ }), + +/***/ 17914: +/***/ ((module) => { + +const privateProps = new WeakMap(); + +module.exports = (ctx) => { + if (!privateProps.has(ctx)) { + privateProps.set(ctx, new Map([['metadata', new Map()]])); + } + return privateProps.get(ctx); +}; + + +/***/ }), + +/***/ 17302: +/***/ ((module) => { + +// Credit: https://github.com/rohe/pyoidc/blob/master/src/oic/utils/webfinger.py + +// -- Normalization -- +// A string of any other type is interpreted as a URI either the form of scheme +// "://" authority path-abempty [ "?" query ] [ "#" fragment ] or authority +// path-abempty [ "?" query ] [ "#" fragment ] per RFC 3986 [RFC3986] and is +// normalized according to the following rules: +// +// If the user input Identifier does not have an RFC 3986 [RFC3986] scheme +// portion, the string is interpreted as [userinfo "@"] host [":" port] +// path-abempty [ "?" query ] [ "#" fragment ] per RFC 3986 [RFC3986]. +// If the userinfo component is present and all of the path component, query +// component, and port component are empty, the acct scheme is assumed. In this +// case, the normalized URI is formed by prefixing acct: to the string as the +// scheme. Per the 'acct' URI Scheme [I‑D.ietf‑appsawg‑acct‑uri], if there is an +// at-sign character ('@') in the userinfo component, it needs to be +// percent-encoded as described in RFC 3986 [RFC3986]. +// For all other inputs without a scheme portion, the https scheme is assumed, +// and the normalized URI is formed by prefixing https:// to the string as the +// scheme. +// If the resulting URI contains a fragment portion, it MUST be stripped off +// together with the fragment delimiter character "#". +// The WebFinger [I‑D.ietf‑appsawg‑webfinger] Resource in this case is the +// resulting URI, and the WebFinger Host is the authority component. +// +// Note: Since the definition of authority in RFC 3986 [RFC3986] is +// [ userinfo "@" ] host [ ":" port ], it is legal to have a user input +// identifier like userinfo@host:port, e.g., alice@example.com:8080. + +const PORT = /^\d+$/; + +function hasScheme(input) { + if (input.includes('://')) return true; + + const authority = input.replace(/(\/|\?)/g, '#').split('#')[0]; + if (authority.includes(':')) { + const index = authority.indexOf(':'); + const hostOrPort = authority.slice(index + 1); + if (!PORT.test(hostOrPort)) { + return true; + } + } + + return false; +} + +function acctSchemeAssumed(input) { + if (!input.includes('@')) return false; + const parts = input.split('@'); + const host = parts[parts.length - 1]; + return !(host.includes(':') || host.includes('/') || host.includes('?')); +} + +function normalize(input) { + if (typeof input !== 'string') { + throw new TypeError('input must be a string'); + } + + let output; + if (hasScheme(input)) { + output = input; + } else if (acctSchemeAssumed(input)) { + output = `acct:${input}`; + } else { + output = `https://${input}`; + } + + return output.split('#')[0]; +} + +module.exports = normalize; + + +/***/ }), + +/***/ 76091: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Issuer = __nccwpck_require__(37508); +const { OPError, RPError } = __nccwpck_require__(56366); +const Registry = __nccwpck_require__(4317); +const Strategy = __nccwpck_require__(79785); +const TokenSet = __nccwpck_require__(40095); +const { CLOCK_TOLERANCE, HTTP_OPTIONS } = __nccwpck_require__(28299); +const generators = __nccwpck_require__(40084); +const { setDefaults } = __nccwpck_require__(41477); + +module.exports = { + Issuer, + Registry, + Strategy, + TokenSet, + errors: { + OPError, + RPError, + }, + custom: { + setHttpOptionsDefaults: setDefaults, + http_options: HTTP_OPTIONS, + clock_tolerance: CLOCK_TOLERANCE, + }, + generators, +}; + + +/***/ }), + +/***/ 37508: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable max-classes-per-file */ + +const { inspect } = __nccwpck_require__(73837); +const url = __nccwpck_require__(57310); + +const AggregateError = __nccwpck_require__(19655); +const jose = __nccwpck_require__(68545); +const LRU = __nccwpck_require__(31588); +const objectHash = __nccwpck_require__(20330); + +const { RPError } = __nccwpck_require__(56366); +const getClient = __nccwpck_require__(15770); +const registry = __nccwpck_require__(4317); +const processResponse = __nccwpck_require__(15131); +const webfingerNormalize = __nccwpck_require__(17302); +const instance = __nccwpck_require__(17914); +const request = __nccwpck_require__(41477); +const { assertIssuerConfiguration } = __nccwpck_require__(97865); +const { + ISSUER_DEFAULTS, OIDC_DISCOVERY, OAUTH2_DISCOVERY, WEBFINGER, REL, AAD_MULTITENANT_DISCOVERY, +} = __nccwpck_require__(28299); + +const AAD_MULTITENANT = Symbol('AAD_MULTITENANT'); + +class Issuer { + /** + * @name constructor + * @api public + */ + constructor(meta = {}) { + const aadIssValidation = meta[AAD_MULTITENANT]; + delete meta[AAD_MULTITENANT]; + + ['introspection', 'revocation'].forEach((endpoint) => { + // if intro/revocation endpoint auth specific meta is missing use the token ones if they + // are defined + if ( + meta[`${endpoint}_endpoint`] + && meta[`${endpoint}_endpoint_auth_methods_supported`] === undefined + && meta[`${endpoint}_endpoint_auth_signing_alg_values_supported`] === undefined + ) { + if (meta.token_endpoint_auth_methods_supported) { + meta[`${endpoint}_endpoint_auth_methods_supported`] = meta.token_endpoint_auth_methods_supported; + } + if (meta.token_endpoint_auth_signing_alg_values_supported) { + meta[`${endpoint}_endpoint_auth_signing_alg_values_supported`] = meta.token_endpoint_auth_signing_alg_values_supported; + } + } + }); + + Object.entries(meta).forEach(([key, value]) => { + instance(this).get('metadata').set(key, value); + if (!this[key]) { + Object.defineProperty(this, key, { + get() { return instance(this).get('metadata').get(key); }, + enumerable: true, + }); + } + }); + + instance(this).set('cache', new LRU({ max: 100 })); + + registry.set(this.issuer, this); + + const Client = getClient(this, aadIssValidation); + + Object.defineProperties(this, { + Client: { value: Client }, + FAPIClient: { value: class FAPIClient extends Client {} }, + }); + } + + /** + * @name keystore + * @api public + */ + async keystore(reload = false) { + assertIssuerConfiguration(this, 'jwks_uri'); + + const keystore = instance(this).get('keystore'); + const cache = instance(this).get('cache'); + + if (reload || !keystore) { + cache.reset(); + const response = await request.call(this, { + method: 'GET', + responseType: 'json', + url: this.jwks_uri, + }); + const jwks = processResponse(response); + + const joseKeyStore = jose.JWKS.asKeyStore(jwks, { ignoreErrors: true }); + cache.set('throttle', true, 60 * 1000); + instance(this).set('keystore', joseKeyStore); + return joseKeyStore; + } + + return keystore; + } + + /** + * @name queryKeyStore + * @api private + */ + async queryKeyStore({ + kid, kty, alg, use, key_ops: ops, + }, { allowMulti = false } = {}) { + const cache = instance(this).get('cache'); + + const def = { + kid, kty, alg, use, key_ops: ops, + }; + + const defHash = objectHash(def, { + algorithm: 'sha256', + ignoreUnknown: true, + unorderedArrays: true, + unorderedSets: true, + }); + + // refresh keystore on every unknown key but also only upto once every minute + const freshJwksUri = cache.get(defHash) || cache.get('throttle'); + + const keystore = await this.keystore(!freshJwksUri); + const keys = keystore.all(def); + + if (keys.length === 0) { + throw new RPError({ + printf: ["no valid key found in issuer's jwks_uri for key parameters %j", def], + jwks: keystore, + }); + } + + if (!allowMulti && keys.length > 1 && !kid) { + throw new RPError({ + printf: ["multiple matching keys found in issuer's jwks_uri for key parameters %j, kid must be provided in this case", def], + jwks: keystore, + }); + } + + cache.set(defHash, true); + + return new jose.JWKS.KeyStore(keys); + } + + /** + * @name metadata + * @api public + */ + get metadata() { + const copy = {}; + instance(this).get('metadata').forEach((value, key) => { + copy[key] = value; + }); + return copy; + } + + /** + * @name webfinger + * @api public + */ + static async webfinger(input) { + const resource = webfingerNormalize(input); + const { host } = url.parse(resource); + const webfingerUrl = `https://${host}${WEBFINGER}`; + + const response = await request.call(this, { + method: 'GET', + url: webfingerUrl, + responseType: 'json', + searchParams: { resource, rel: REL }, + followRedirect: true, + }); + const body = processResponse(response); + + const location = Array.isArray(body.links) && body.links.find((link) => typeof link === 'object' && link.rel === REL && link.href); + + if (!location) { + throw new RPError({ + message: 'no issuer found in webfinger response', + body, + }); + } + + if (typeof location.href !== 'string' || !location.href.startsWith('https://')) { + throw new RPError({ + printf: ['invalid issuer location %s', location.href], + body, + }); + } + + const expectedIssuer = location.href; + if (registry.has(expectedIssuer)) { + return registry.get(expectedIssuer); + } + + const issuer = await this.discover(expectedIssuer); + + if (issuer.issuer !== expectedIssuer) { + registry.delete(issuer.issuer); + throw new RPError('discovered issuer mismatch, expected %s, got: %s', expectedIssuer, issuer.issuer); + } + return issuer; + } + + /** + * @name discover + * @api public + */ + static async discover(uri) { + const parsed = url.parse(uri); + + if (parsed.pathname.includes('/.well-known/')) { + const response = await request.call(this, { + method: 'GET', + responseType: 'json', + url: uri, + }); + const body = processResponse(response); + return new Issuer({ + ...ISSUER_DEFAULTS, + ...body, + [AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find( + (discoveryURL) => uri.startsWith(discoveryURL), + ), + }); + } + + const pathnames = []; + if (parsed.pathname.endsWith('/')) { + pathnames.push(`${parsed.pathname}${OIDC_DISCOVERY.substring(1)}`); + } else { + pathnames.push(`${parsed.pathname}${OIDC_DISCOVERY}`); + } + if (parsed.pathname === '/') { + pathnames.push(`${OAUTH2_DISCOVERY}`); + } else { + pathnames.push(`${OAUTH2_DISCOVERY}${parsed.pathname}`); + } + + const errors = []; + // eslint-disable-next-line no-restricted-syntax + for (const pathname of pathnames) { + try { + const wellKnownUri = url.format({ ...parsed, pathname }); + // eslint-disable-next-line no-await-in-loop + const response = await request.call(this, { + method: 'GET', + responseType: 'json', + url: wellKnownUri, + }); + const body = processResponse(response); + return new Issuer({ + ...ISSUER_DEFAULTS, + ...body, + [AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find( + (discoveryURL) => wellKnownUri.startsWith(discoveryURL), + ), + }); + } catch (err) { + errors.push(err); + } + } + + const err = new AggregateError(errors); + err.message = `Issuer.discover() failed.${err.message.split('\n') + .filter((line) => !line.startsWith(' at')).join('\n')}`; + throw err; + } + + /* istanbul ignore next */ + [inspect.custom]() { + return `${this.constructor.name} ${inspect(this.metadata, { + depth: Infinity, + colors: process.stdout.isTTY, + compact: false, + sorted: true, + })}`; + } +} + +module.exports = Issuer; + + +/***/ }), + +/***/ 4317: +/***/ ((module) => { + +const REGISTRY = new Map(); + +module.exports = REGISTRY; + + +/***/ }), + +/***/ 79785: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable no-underscore-dangle */ + +const url = __nccwpck_require__(57310); +const { format } = __nccwpck_require__(73837); + +const cloneDeep = __nccwpck_require__(67217); +const { RPError, OPError } = __nccwpck_require__(56366); +const { BaseClient } = __nccwpck_require__(15770); +const { random, codeChallenge } = __nccwpck_require__(40084); +const pick = __nccwpck_require__(35747); +const { resolveResponseType, resolveRedirectUri } = __nccwpck_require__(41635); + +function verified(err, user, info = {}) { + if (err) { + this.error(err); + } else if (!user) { + this.fail(info); + } else { + this.success(user, info); + } +} + +/** + * @name constructor + * @api public + */ +function OpenIDConnectStrategy({ + client, + params = {}, + passReqToCallback = false, + sessionKey, + usePKCE = true, + extras = {}, +} = {}, verify) { + if (!(client instanceof BaseClient)) { + throw new TypeError('client must be an instance of openid-client Client'); + } + + if (typeof verify !== 'function') { + throw new TypeError('verify callback must be a function'); + } + + if (!client.issuer || !client.issuer.issuer) { + throw new TypeError('client must have an issuer with an identifier'); + } + + this._client = client; + this._issuer = client.issuer; + this._verify = verify; + this._passReqToCallback = passReqToCallback; + this._usePKCE = usePKCE; + this._key = sessionKey || `oidc:${url.parse(this._issuer.issuer).hostname}`; + this._params = cloneDeep(params); + this._extras = cloneDeep(extras); + + if (!this._params.response_type) this._params.response_type = resolveResponseType.call(client); + if (!this._params.redirect_uri) this._params.redirect_uri = resolveRedirectUri.call(client); + if (!this._params.scope) this._params.scope = 'openid'; + + if (this._usePKCE === true) { + const supportedMethods = Array.isArray(this._issuer.code_challenge_methods_supported) + ? this._issuer.code_challenge_methods_supported : false; + + if (supportedMethods && supportedMethods.includes('S256')) { + this._usePKCE = 'S256'; + } else if (supportedMethods && supportedMethods.includes('plain')) { + this._usePKCE = 'plain'; + } else if (supportedMethods) { + throw new TypeError('neither code_challenge_method supported by the client is supported by the issuer'); + } else { + this._usePKCE = 'S256'; + } + } else if (typeof this._usePKCE === 'string' && !['plain', 'S256'].includes(this._usePKCE)) { + throw new TypeError(`${this._usePKCE} is not valid/implemented PKCE code_challenge_method`); + } + + this.name = url.parse(client.issuer.issuer).hostname; +} + +OpenIDConnectStrategy.prototype.authenticate = function authenticate(req, options) { + (async () => { + const client = this._client; + if (!req.session) { + throw new TypeError('authentication requires session support'); + } + const reqParams = client.callbackParams(req); + const sessionKey = this._key; + + /* start authentication request */ + if (Object.keys(reqParams).length === 0) { + // provide options object with extra authentication parameters + const params = { + state: random(), + ...this._params, + ...options, + }; + + if (!params.nonce && params.response_type.includes('id_token')) { + params.nonce = random(); + } + + req.session[sessionKey] = pick(params, 'nonce', 'state', 'max_age', 'response_type'); + + if (this._usePKCE && params.response_type.includes('code')) { + const verifier = random(); + req.session[sessionKey].code_verifier = verifier; + + switch (this._usePKCE) { // eslint-disable-line default-case + case 'S256': + params.code_challenge = codeChallenge(verifier); + params.code_challenge_method = 'S256'; + break; + case 'plain': + params.code_challenge = verifier; + break; + } + } + + this.redirect(client.authorizationUrl(params)); + return; + } + /* end authentication request */ + + /* start authentication response */ + + const session = req.session[sessionKey]; + if (Object.keys(session || {}).length === 0) { + throw new Error(format('did not find expected authorization request details in session, req.session["%s"] is %j', sessionKey, session)); + } + + const { + state, nonce, max_age: maxAge, code_verifier: codeVerifier, response_type: responseType, + } = session; + + try { + delete req.session[sessionKey]; + } catch (err) {} + + const opts = { + redirect_uri: this._params.redirect_uri, + ...options, + }; + + const checks = { + state, + nonce, + max_age: maxAge, + code_verifier: codeVerifier, + response_type: responseType, + }; + + const tokenset = await client.callback(opts.redirect_uri, reqParams, checks, this._extras); + + const passReq = this._passReqToCallback; + const loadUserinfo = this._verify.length > (passReq ? 3 : 2) && client.issuer.userinfo_endpoint; + + const args = [tokenset, verified.bind(this)]; + + if (loadUserinfo) { + if (!tokenset.access_token) { + throw new RPError({ + message: 'expected access_token to be returned when asking for userinfo in verify callback', + tokenset, + }); + } + const userinfo = await client.userinfo(tokenset); + args.splice(1, 0, userinfo); + } + + if (passReq) { + args.unshift(req); + } + + this._verify(...args); + /* end authentication response */ + })().catch((error) => { + if ( + (error instanceof OPError && error.error !== 'server_error' && !error.error.startsWith('invalid')) + || error instanceof RPError + ) { + this.fail(error); + } else { + this.error(error); + } + }); +}; + +module.exports = OpenIDConnectStrategy; + + +/***/ }), + +/***/ 40095: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const base64url = __nccwpck_require__(73216); +const now = __nccwpck_require__(36413); + +class TokenSet { + /** + * @name constructor + * @api public + */ + constructor(values) { + Object.assign(this, values); + } + + /** + * @name expires_in= + * @api public + */ + set expires_in(value) { // eslint-disable-line camelcase + this.expires_at = now() + Number(value); + } + + /** + * @name expires_in + * @api public + */ + get expires_in() { // eslint-disable-line camelcase + return Math.max.apply(null, [this.expires_at - now(), 0]); + } + + /** + * @name expired + * @api public + */ + expired() { + return this.expires_in === 0; + } + + /** + * @name claims + * @api public + */ + claims() { + if (!this.id_token) { + throw new TypeError('id_token not present in TokenSet'); + } + + return JSON.parse(base64url.decode(this.id_token.split('.')[1])); + } +} + +module.exports = TokenSet; + + +/***/ }), + +/***/ 18502: +/***/ ((module) => { + +"use strict"; + + +class CancelError extends Error { + constructor(reason) { + super(reason || 'Promise was canceled'); + this.name = 'CancelError'; + } + + get isCanceled() { + return true; + } +} + +class PCancelable { + static fn(userFn) { + return (...arguments_) => { + return new PCancelable((resolve, reject, onCancel) => { + arguments_.push(onCancel); + // eslint-disable-next-line promise/prefer-await-to-then + userFn(...arguments_).then(resolve, reject); + }); + }; + } + + constructor(executor) { + this._cancelHandlers = []; + this._isPending = true; + this._isCanceled = false; + this._rejectOnCancel = true; + + this._promise = new Promise((resolve, reject) => { + this._reject = reject; + + const onResolve = value => { + if (!this._isCanceled || !onCancel.shouldReject) { + this._isPending = false; + resolve(value); + } + }; + + const onReject = error => { + this._isPending = false; + reject(error); + }; + + const onCancel = handler => { + if (!this._isPending) { + throw new Error('The `onCancel` handler was attached after the promise settled.'); + } + + this._cancelHandlers.push(handler); + }; + + Object.defineProperties(onCancel, { + shouldReject: { + get: () => this._rejectOnCancel, + set: boolean => { + this._rejectOnCancel = boolean; + } + } + }); + + return executor(onResolve, onReject, onCancel); + }); + } + + then(onFulfilled, onRejected) { + // eslint-disable-next-line promise/prefer-await-to-then + return this._promise.then(onFulfilled, onRejected); + } + + catch(onRejected) { + return this._promise.catch(onRejected); + } + + finally(onFinally) { + return this._promise.finally(onFinally); + } + + cancel(reason) { + if (!this._isPending || this._isCanceled) { + return; + } + + this._isCanceled = true; + + if (this._cancelHandlers.length > 0) { + try { + for (const handler of this._cancelHandlers) { + handler(); + } + } catch (error) { + this._reject(error); + return; + } + } + + if (this._rejectOnCancel) { + this._reject(new CancelError(reason)); + } + } + + get isCanceled() { + return this._isCanceled; + } +} + +Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); + +module.exports = PCancelable; +module.exports.CancelError = CancelError; + + +/***/ }), + +/***/ 53317: +/***/ ((module) => { + +"use strict"; + + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; + + +/***/ }), + +/***/ 40806: +/***/ (function(module) { + +// Generated by CoffeeScript 1.12.2 +(function() { + var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; + + if ((typeof performance !== "undefined" && performance !== null) && performance.now) { + module.exports = function() { + return performance.now(); + }; + } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { + module.exports = function() { + return (getNanoSeconds() - nodeLoadTime) / 1e6; + }; + hrtime = process.hrtime; + getNanoSeconds = function() { + var hr; + hr = hrtime(); + return hr[0] * 1e9 + hr[1]; + }; + moduleLoadTime = getNanoSeconds(); + upTime = process.uptime() * 1e9; + nodeLoadTime = moduleLoadTime - upTime; + } else if (Date.now) { + module.exports = function() { + return Date.now() - loadTime; + }; + loadTime = Date.now(); + } else { + module.exports = function() { + return new Date().getTime() - loadTime; + }; + loadTime = new Date().getTime(); + } + +}).call(this); + +//# sourceMappingURL=performance-now.js.map + + +/***/ }), + +/***/ 5982: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/*eslint no-var:0, prefer-arrow-callback: 0, object-shorthand: 0 */ + + + +var Punycode = __nccwpck_require__(85477); + + +var internals = {}; + + +// +// Read rules from file. +// +internals.rules = (__nccwpck_require__(3704).map)(function (rule) { + + return { + rule: rule, + suffix: rule.replace(/^(\*\.|\!)/, ''), + punySuffix: -1, + wildcard: rule.charAt(0) === '*', + exception: rule.charAt(0) === '!' + }; +}); + + +// +// Check is given string ends with `suffix`. +// +internals.endsWith = function (str, suffix) { + + return str.indexOf(suffix, str.length - suffix.length) !== -1; +}; + + +// +// Find rule for a given domain. +// +internals.findRule = function (domain) { + + var punyDomain = Punycode.toASCII(domain); + return internals.rules.reduce(function (memo, rule) { + + if (rule.punySuffix === -1){ + rule.punySuffix = Punycode.toASCII(rule.suffix); + } + if (!internals.endsWith(punyDomain, '.' + rule.punySuffix) && punyDomain !== rule.punySuffix) { + return memo; + } + // This has been commented out as it never seems to run. This is because + // sub tlds always appear after their parents and we never find a shorter + // match. + //if (memo) { + // var memoSuffix = Punycode.toASCII(memo.suffix); + // if (memoSuffix.length >= punySuffix.length) { + // return memo; + // } + //} + return rule; + }, null); +}; + + +// +// Error codes and messages. +// +exports.errorCodes = { + DOMAIN_TOO_SHORT: 'Domain name too short.', + DOMAIN_TOO_LONG: 'Domain name too long. It should be no more than 255 chars.', + LABEL_STARTS_WITH_DASH: 'Domain name label can not start with a dash.', + LABEL_ENDS_WITH_DASH: 'Domain name label can not end with a dash.', + LABEL_TOO_LONG: 'Domain name label should be at most 63 chars long.', + LABEL_TOO_SHORT: 'Domain name label should be at least 1 character long.', + LABEL_INVALID_CHARS: 'Domain name label can only contain alphanumeric characters or dashes.' +}; + + +// +// Validate domain name and throw if not valid. +// +// From wikipedia: +// +// Hostnames are composed of series of labels concatenated with dots, as are all +// domain names. Each label must be between 1 and 63 characters long, and the +// entire hostname (including the delimiting dots) has a maximum of 255 chars. +// +// Allowed chars: +// +// * `a-z` +// * `0-9` +// * `-` but not as a starting or ending character +// * `.` as a separator for the textual portions of a domain name +// +// * http://en.wikipedia.org/wiki/Domain_name +// * http://en.wikipedia.org/wiki/Hostname +// +internals.validate = function (input) { + + // Before we can validate we need to take care of IDNs with unicode chars. + var ascii = Punycode.toASCII(input); + + if (ascii.length < 1) { + return 'DOMAIN_TOO_SHORT'; + } + if (ascii.length > 255) { + return 'DOMAIN_TOO_LONG'; + } + + // Check each part's length and allowed chars. + var labels = ascii.split('.'); + var label; + + for (var i = 0; i < labels.length; ++i) { + label = labels[i]; + if (!label.length) { + return 'LABEL_TOO_SHORT'; + } + if (label.length > 63) { + return 'LABEL_TOO_LONG'; + } + if (label.charAt(0) === '-') { + return 'LABEL_STARTS_WITH_DASH'; + } + if (label.charAt(label.length - 1) === '-') { + return 'LABEL_ENDS_WITH_DASH'; + } + if (!/^[a-z0-9\-]+$/.test(label)) { + return 'LABEL_INVALID_CHARS'; + } + } +}; + + +// +// Public API +// + + +// +// Parse domain. +// +exports.parse = function (input) { + + if (typeof input !== 'string') { + throw new TypeError('Domain name must be a string.'); + } + + // Force domain to lowercase. + var domain = input.slice(0).toLowerCase(); + + // Handle FQDN. + // TODO: Simply remove trailing dot? + if (domain.charAt(domain.length - 1) === '.') { + domain = domain.slice(0, domain.length - 1); + } + + // Validate and sanitise input. + var error = internals.validate(domain); + if (error) { + return { + input: input, + error: { + message: exports.errorCodes[error], + code: error + } + }; + } + + var parsed = { + input: input, + tld: null, + sld: null, + domain: null, + subdomain: null, + listed: false + }; + + var domainParts = domain.split('.'); + + // Non-Internet TLD + if (domainParts[domainParts.length - 1] === 'local') { + return parsed; + } + + var handlePunycode = function () { + + if (!/xn--/.test(domain)) { + return parsed; + } + if (parsed.domain) { + parsed.domain = Punycode.toASCII(parsed.domain); + } + if (parsed.subdomain) { + parsed.subdomain = Punycode.toASCII(parsed.subdomain); + } + return parsed; + }; + + var rule = internals.findRule(domain); + + // Unlisted tld. + if (!rule) { + if (domainParts.length < 2) { + return parsed; + } + parsed.tld = domainParts.pop(); + parsed.sld = domainParts.pop(); + parsed.domain = [parsed.sld, parsed.tld].join('.'); + if (domainParts.length) { + parsed.subdomain = domainParts.pop(); + } + return handlePunycode(); + } + + // At this point we know the public suffix is listed. + parsed.listed = true; + + var tldParts = rule.suffix.split('.'); + var privateParts = domainParts.slice(0, domainParts.length - tldParts.length); + + if (rule.exception) { + privateParts.push(tldParts.shift()); + } + + parsed.tld = tldParts.join('.'); + + if (!privateParts.length) { + return handlePunycode(); + } + + if (rule.wildcard) { + tldParts.unshift(privateParts.pop()); + parsed.tld = tldParts.join('.'); + } + + if (!privateParts.length) { + return handlePunycode(); + } + + parsed.sld = privateParts.pop(); + parsed.domain = [parsed.sld, parsed.tld].join('.'); + + if (privateParts.length) { + parsed.subdomain = privateParts.join('.'); + } + + return handlePunycode(); +}; + + +// +// Get domain. +// +exports.get = function (domain) { + + if (!domain) { + return null; + } + return exports.parse(domain).domain || null; +}; + + +// +// Check whether domain belongs to a known public suffix. +// +exports.isValid = function (domain) { + + var parsed = exports.parse(domain); + return Boolean(parsed.domain && parsed.listed); +}; + + +/***/ }), + +/***/ 49394: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var once = __nccwpck_require__(38953) +var eos = __nccwpck_require__(528) +var fs = __nccwpck_require__(57147) // 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 + + +/***/ }), + +/***/ 11466: +/***/ ((module) => { + +"use strict"; + + +var replace = String.prototype.replace; +var percentTwenties = /%20/g; + +module.exports = { + 'default': 'RFC3986', + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return value; + } + }, + RFC1738: 'RFC1738', + RFC3986: 'RFC3986' +}; + + +/***/ }), + +/***/ 50737: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var stringify = __nccwpck_require__(53769); +var parse = __nccwpck_require__(22061); +var formats = __nccwpck_require__(11466); + +module.exports = { + formats: formats, + parse: parse, + stringify: stringify +}; + + +/***/ }), + +/***/ 22061: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var utils = __nccwpck_require__(63763); + +var has = Object.prototype.hasOwnProperty; + +var defaults = { + allowDots: false, + allowPrototypes: false, + arrayLimit: 20, + decoder: utils.decode, + delimiter: '&', + depth: 5, + parameterLimit: 1000, + plainObjects: false, + strictNullHandling: false +}; + +var parseValues = function parseQueryStringValues(str, options) { + var obj = {}; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); + + for (var i = 0; i < parts.length; ++i) { + var part = parts[i]; + + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; + + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder); + val = options.decoder(part.slice(pos + 1), defaults.decoder); + } + if (has.call(obj, key)) { + obj[key] = [].concat(obj[key]).concat(val); + } else { + obj[key] = val; + } + } + + return obj; +}; + +var parseObject = function (chain, val, options) { + var leaf = val; + + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; + + if (root === '[]') { + obj = []; + obj = obj.concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else { + obj[cleanRoot] = leaf; + } + } + + leaf = obj; + } + + return leaf; +}; + +var parseKeys = function parseQueryStringKeys(givenKey, val, options) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + + // Get the parent + + var segment = brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + + // Stash the parent if it exists + + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys + // that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(parent); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while ((segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options); +}; + +module.exports = function (str, opts) { + var options = opts ? utils.assign({}, opts) : {}; + + if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; + options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; + options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; + options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; + options.parseArrays = options.parseArrays !== false; + options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; + options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; + options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; + options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; + options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; + options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options); + obj = utils.merge(obj, newObj, options); + } + + return utils.compact(obj); +}; + + +/***/ }), + +/***/ 53769: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var utils = __nccwpck_require__(63763); +var formats = __nccwpck_require__(11466); + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { // eslint-disable-line func-name-matching + return prefix + '[]'; + }, + indices: function indices(prefix, key) { // eslint-disable-line func-name-matching + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { // eslint-disable-line func-name-matching + return prefix; + } +}; + +var toISO = Date.prototype.toISOString; + +var defaults = { + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; + +var stringify = function stringify( // eslint-disable-line func-name-matching + object, + prefix, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly +) { + var obj = object; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; + } + + obj = ''; + } + + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (Array.isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + if (Array.isArray(obj)) { + values = values.concat(stringify( + obj[key], + generateArrayPrefix(prefix, key), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } else { + values = values.concat(stringify( + obj[key], + prefix + (allowDots ? '.' + key : '[' + key + ']'), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } + } + + return values; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = opts ? utils.assign({}, opts) : {}; + + if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; + var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; + var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; + var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; + var sort = typeof options.sort === 'function' ? options.sort : null; + var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; + var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; + var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; + if (typeof options.format === 'undefined') { + options.format = formats['default']; + } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { + throw new TypeError('Unknown format option provided.'); + } + var formatter = formats.formatters[options.format]; + var objKeys; + var filter; + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (Array.isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (options.arrayFormat in arrayPrefixGenerators) { + arrayFormat = options.arrayFormat; + } else if ('indices' in options) { + arrayFormat = options.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (sort) { + objKeys.sort(sort); + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + keys = keys.concat(stringify( + obj[key], + key, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encode ? encoder : null, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } + + var joined = keys.join(delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; + + return joined.length > 0 ? prefix + joined : ''; +}; + + +/***/ }), + +/***/ 63763: +/***/ ((module) => { + +"use strict"; + + +var has = Object.prototype.hasOwnProperty; + +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } + + return array; +}()); + +var compactQueue = function compactQueue(queue) { + var obj; + + while (queue.length) { + var item = queue.pop(); + obj = item.obj[item.prop]; + + if (Array.isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } + + return obj; +}; + +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +var merge = function merge(target, source, options) { + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (Array.isArray(target)) { + target.push(source); + } else if (typeof target === 'object') { + if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + + return target; + } + + if (typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = arrayToObject(target, options); + } + + if (Array.isArray(target) && Array.isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + if (target[i] && typeof target[i] === 'object') { + target[i] = merge(target[i], item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +var decode = function (str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (e) { + return str; + } +}; + +var encode = function encode(str) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = typeof str === 'string' ? str : String(str); + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + return compactQueue(queue); +}; + +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +var isBuffer = function isBuffer(obj) { + if (obj === null || typeof obj === 'undefined') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + merge: merge +}; + + +/***/ }), + +/***/ 87119: +/***/ ((module) => { + +"use strict"; + + +class QuickLRU { + constructor(options = {}) { + if (!(options.maxSize && options.maxSize > 0)) { + throw new TypeError('`maxSize` must be a number greater than 0'); + } + + this.maxSize = options.maxSize; + this.onEviction = options.onEviction; + this.cache = new Map(); + this.oldCache = new Map(); + this._size = 0; + } + + _set(key, value) { + this.cache.set(key, value); + this._size++; + + if (this._size >= this.maxSize) { + this._size = 0; + + if (typeof this.onEviction === 'function') { + for (const [key, value] of this.oldCache.entries()) { + this.onEviction(key, value); + } + } + + this.oldCache = this.cache; + this.cache = new Map(); + } + } + + get(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } + + if (this.oldCache.has(key)) { + const value = this.oldCache.get(key); + this.oldCache.delete(key); + this._set(key, value); + return value; + } + } + + set(key, value) { + if (this.cache.has(key)) { + this.cache.set(key, value); + } else { + this._set(key, value); + } + + return this; + } + + has(key) { + return this.cache.has(key) || this.oldCache.has(key); + } + + peek(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } + + if (this.oldCache.has(key)) { + return this.oldCache.get(key); + } + } + + delete(key) { + const deleted = this.cache.delete(key); + if (deleted) { + this._size--; + } + + return this.oldCache.delete(key) || deleted; + } + + clear() { + this.cache.clear(); + this.oldCache.clear(); + this._size = 0; + } + + * keys() { + for (const [key] of this) { + yield key; + } + } + + * values() { + for (const [, value] of this) { + yield value; + } + } + + * [Symbol.iterator]() { + for (const item of this.cache) { + yield item; + } + + for (const item of this.oldCache) { + const [key] = item; + if (!this.cache.has(key)) { + yield item; + } + } + } + + get size() { + let oldCacheSize = 0; + for (const key of this.oldCache.keys()) { + if (!this.cache.has(key)) { + oldCacheSize++; + } + } + + return Math.min(this._size + oldCacheSize, this.maxSize); + } +} + +module.exports = QuickLRU; + + +/***/ }), + +/***/ 32956: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Copyright 2010-2012 Mikeal Rogers +// +// 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. + + + +var extend = __nccwpck_require__(7011) +var cookies = __nccwpck_require__(41629) +var helpers = __nccwpck_require__(30793) + +var paramsHaveRequestBody = helpers.paramsHaveRequestBody + +// organize params for patch, post, put, head, del +function initParams (uri, options, callback) { + if (typeof options === 'function') { + callback = options + } + + var params = {} + if (options !== null && typeof options === 'object') { + extend(params, options, {uri: uri}) + } else if (typeof uri === 'string') { + extend(params, {uri: uri}) + } else { + extend(params, uri) + } + + params.callback = callback || params.callback + return params +} + +function request (uri, options, callback) { + if (typeof uri === 'undefined') { + throw new Error('undefined is not a valid uri or options object.') + } + + var params = initParams(uri, options, callback) + + if (params.method === 'HEAD' && paramsHaveRequestBody(params)) { + throw new Error('HTTP HEAD requests MUST NOT include a request body.') + } + + return new request.Request(params) +} + +function verbFunc (verb) { + var method = verb.toUpperCase() + return function (uri, options, callback) { + var params = initParams(uri, options, callback) + params.method = method + return request(params, params.callback) + } +} + +// define like this to please codeintel/intellisense IDEs +request.get = verbFunc('get') +request.head = verbFunc('head') +request.options = verbFunc('options') +request.post = verbFunc('post') +request.put = verbFunc('put') +request.patch = verbFunc('patch') +request.del = verbFunc('delete') +request['delete'] = verbFunc('delete') + +request.jar = function (store) { + return cookies.jar(store) +} + +request.cookie = function (str) { + return cookies.parse(str) +} + +function wrapRequestMethod (method, options, requester, verb) { + return function (uri, opts, callback) { + var params = initParams(uri, opts, callback) + + var target = {} + extend(true, target, options, params) + + target.pool = params.pool || options.pool + + if (verb) { + target.method = verb.toUpperCase() + } + + if (typeof requester === 'function') { + method = requester + } + + return method(target, target.callback) + } +} + +request.defaults = function (options, requester) { + var self = this + + options = options || {} + + if (typeof options === 'function') { + requester = options + options = {} + } + + var defaults = wrapRequestMethod(self, options, requester) + + var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete'] + verbs.forEach(function (verb) { + defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) + }) + + defaults.cookie = wrapRequestMethod(self.cookie, options, requester) + defaults.jar = self.jar + defaults.defaults = self.defaults + return defaults +} + +request.forever = function (agentOptions, optionsArg) { + var options = {} + if (optionsArg) { + extend(options, optionsArg) + } + if (agentOptions) { + options.agentOptions = agentOptions + } + + options.forever = true + return request.defaults(options) +} + +// Exports + +module.exports = request +request.Request = __nccwpck_require__(51550) +request.initParams = initParams + +// Backwards compatibility for request.debug +Object.defineProperty(request, 'debug', { + enumerable: true, + get: function () { + return request.Request.debug + }, + set: function (debug) { + request.Request.debug = debug + } +}) + + +/***/ }), + +/***/ 91539: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var caseless = __nccwpck_require__(12146) +var uuid = __nccwpck_require__(13902) +var helpers = __nccwpck_require__(30793) + +var md5 = helpers.md5 +var toBase64 = helpers.toBase64 + +function Auth (request) { + // define all public properties here + this.request = request + this.hasAuth = false + this.sentAuth = false + this.bearerToken = null + this.user = null + this.pass = null +} + +Auth.prototype.basic = function (user, pass, sendImmediately) { + var self = this + if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) { + self.request.emit('error', new Error('auth() received invalid user or password')) + } + self.user = user + self.pass = pass + self.hasAuth = true + var header = user + ':' + (pass || '') + if (sendImmediately || typeof sendImmediately === 'undefined') { + var authHeader = 'Basic ' + toBase64(header) + self.sentAuth = true + return authHeader + } +} + +Auth.prototype.bearer = function (bearer, sendImmediately) { + var self = this + self.bearerToken = bearer + self.hasAuth = true + if (sendImmediately || typeof sendImmediately === 'undefined') { + if (typeof bearer === 'function') { + bearer = bearer() + } + var authHeader = 'Bearer ' + (bearer || '') + self.sentAuth = true + return authHeader + } +} + +Auth.prototype.digest = function (method, path, authHeader) { + // TODO: More complete implementation of RFC 2617. + // - handle challenge.domain + // - support qop="auth-int" only + // - handle Authentication-Info (not necessarily?) + // - check challenge.stale (not necessarily?) + // - increase nc (not necessarily?) + // For reference: + // http://tools.ietf.org/html/rfc2617#section-3 + // https://github.com/bagder/curl/blob/master/lib/http_digest.c + + var self = this + + var challenge = {} + var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi + while (true) { + var match = re.exec(authHeader) + if (!match) { + break + } + challenge[match[1]] = match[2] || match[3] + } + + /** + * RFC 2617: handle both MD5 and MD5-sess algorithms. + * + * If the algorithm directive's value is "MD5" or unspecified, then HA1 is + * HA1=MD5(username:realm:password) + * If the algorithm directive's value is "MD5-sess", then HA1 is + * HA1=MD5(MD5(username:realm:password):nonce:cnonce) + */ + var ha1Compute = function (algorithm, user, realm, pass, nonce, cnonce) { + var ha1 = md5(user + ':' + realm + ':' + pass) + if (algorithm && algorithm.toLowerCase() === 'md5-sess') { + return md5(ha1 + ':' + nonce + ':' + cnonce) + } else { + return ha1 + } + } + + var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' + var nc = qop && '00000001' + var cnonce = qop && uuid().replace(/-/g, '') + var ha1 = ha1Compute(challenge.algorithm, self.user, challenge.realm, self.pass, challenge.nonce, cnonce) + var ha2 = md5(method + ':' + path) + var digestResponse = qop + ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) + : md5(ha1 + ':' + challenge.nonce + ':' + ha2) + var authValues = { + username: self.user, + realm: challenge.realm, + nonce: challenge.nonce, + uri: path, + qop: qop, + response: digestResponse, + nc: nc, + cnonce: cnonce, + algorithm: challenge.algorithm, + opaque: challenge.opaque + } + + authHeader = [] + for (var k in authValues) { + if (authValues[k]) { + if (k === 'qop' || k === 'nc' || k === 'algorithm') { + authHeader.push(k + '=' + authValues[k]) + } else { + authHeader.push(k + '="' + authValues[k] + '"') + } + } + } + authHeader = 'Digest ' + authHeader.join(', ') + self.sentAuth = true + return authHeader +} + +Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) { + var self = this + var request = self.request + + var authHeader + if (bearer === undefined && user === undefined) { + self.request.emit('error', new Error('no auth mechanism defined')) + } else if (bearer !== undefined) { + authHeader = self.bearer(bearer, sendImmediately) + } else { + authHeader = self.basic(user, pass, sendImmediately) + } + if (authHeader) { + request.setHeader('authorization', authHeader) + } +} + +Auth.prototype.onResponse = function (response) { + var self = this + var request = self.request + + if (!self.hasAuth || self.sentAuth) { return null } + + var c = caseless(response.headers) + + var authHeader = c.get('www-authenticate') + var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase() + request.debug('reauth', authVerb) + + switch (authVerb) { + case 'basic': + return self.basic(self.user, self.pass, true) + + case 'bearer': + return self.bearer(self.bearerToken, true) + + case 'digest': + return self.digest(request.method, request.path, authHeader) + } +} + +exports.g = Auth + + +/***/ }), + +/***/ 41629: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var tough = __nccwpck_require__(23525) + +var Cookie = tough.Cookie +var CookieJar = tough.CookieJar + +exports.parse = function (str) { + if (str && str.uri) { + str = str.uri + } + if (typeof str !== 'string') { + throw new Error('The cookie function only accepts STRING as param') + } + return Cookie.parse(str, {loose: true}) +} + +// Adapt the sometimes-Async api of tough.CookieJar to our requirements +function RequestJar (store) { + var self = this + self._jar = new CookieJar(store, {looseMode: true}) +} +RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) { + var self = this + return self._jar.setCookieSync(cookieOrStr, uri, options || {}) +} +RequestJar.prototype.getCookieString = function (uri) { + var self = this + return self._jar.getCookieStringSync(uri) +} +RequestJar.prototype.getCookies = function (uri) { + var self = this + return self._jar.getCookiesSync(uri) +} + +exports.jar = function (store) { + return new RequestJar(store) +} + + +/***/ }), + +/***/ 2928: +/***/ ((module) => { + +"use strict"; + + +function formatHostname (hostname) { + // canonicalize the hostname, so that 'oogle.com' won't match 'google.com' + return hostname.replace(/^\.*/, '.').toLowerCase() +} + +function parseNoProxyZone (zone) { + zone = zone.trim().toLowerCase() + + var zoneParts = zone.split(':', 2) + var zoneHost = formatHostname(zoneParts[0]) + var zonePort = zoneParts[1] + var hasPort = zone.indexOf(':') > -1 + + return {hostname: zoneHost, port: zonePort, hasPort: hasPort} +} + +function uriInNoProxy (uri, noProxy) { + var port = uri.port || (uri.protocol === 'https:' ? '443' : '80') + var hostname = formatHostname(uri.hostname) + var noProxyList = noProxy.split(',') + + // iterate through the noProxyList until it finds a match. + return noProxyList.map(parseNoProxyZone).some(function (noProxyZone) { + var isMatchedAt = hostname.indexOf(noProxyZone.hostname) + var hostnameMatched = ( + isMatchedAt > -1 && + (isMatchedAt === hostname.length - noProxyZone.hostname.length) + ) + + if (noProxyZone.hasPort) { + return (port === noProxyZone.port) && hostnameMatched + } + + return hostnameMatched + }) +} + +function getProxyFromURI (uri) { + // Decide the proper request proxy to use based on the request URI object and the + // environmental variables (NO_PROXY, HTTP_PROXY, etc.) + // respect NO_PROXY environment variables (see: https://lynx.invisible-island.net/lynx2.8.7/breakout/lynx_help/keystrokes/environments.html) + + var noProxy = process.env.NO_PROXY || process.env.no_proxy || '' + + // if the noProxy is a wildcard then return null + + if (noProxy === '*') { + return null + } + + // if the noProxy is not empty and the uri is found return null + + if (noProxy !== '' && uriInNoProxy(uri, noProxy)) { + return null + } + + // Check for HTTP or HTTPS Proxy in environment Else default to null + + if (uri.protocol === 'http:') { + return process.env.HTTP_PROXY || + process.env.http_proxy || null + } + + if (uri.protocol === 'https:') { + return process.env.HTTPS_PROXY || + process.env.https_proxy || + process.env.HTTP_PROXY || + process.env.http_proxy || null + } + + // if none of that works, return null + // (What uri protocol are you using then?) + + return null +} + +module.exports = getProxyFromURI + + +/***/ }), + +/***/ 75746: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var fs = __nccwpck_require__(57147) +var qs = __nccwpck_require__(63477) +var validate = __nccwpck_require__(37033) +var extend = __nccwpck_require__(7011) + +function Har (request) { + this.request = request +} + +Har.prototype.reducer = function (obj, pair) { + // new property ? + if (obj[pair.name] === undefined) { + obj[pair.name] = pair.value + return obj + } + + // existing? convert to array + var arr = [ + obj[pair.name], + pair.value + ] + + obj[pair.name] = arr + + return obj +} + +Har.prototype.prep = function (data) { + // construct utility properties + data.queryObj = {} + data.headersObj = {} + data.postData.jsonObj = false + data.postData.paramsObj = false + + // construct query objects + if (data.queryString && data.queryString.length) { + data.queryObj = data.queryString.reduce(this.reducer, {}) + } + + // construct headers objects + if (data.headers && data.headers.length) { + // loweCase header keys + data.headersObj = data.headers.reduceRight(function (headers, header) { + headers[header.name] = header.value + return headers + }, {}) + } + + // construct Cookie header + if (data.cookies && data.cookies.length) { + var cookies = data.cookies.map(function (cookie) { + return cookie.name + '=' + cookie.value + }) + + if (cookies.length) { + data.headersObj.cookie = cookies.join('; ') + } + } + + // prep body + function some (arr) { + return arr.some(function (type) { + return data.postData.mimeType.indexOf(type) === 0 + }) + } + + if (some([ + 'multipart/mixed', + 'multipart/related', + 'multipart/form-data', + 'multipart/alternative'])) { + // reset values + data.postData.mimeType = 'multipart/form-data' + } else if (some([ + 'application/x-www-form-urlencoded'])) { + if (!data.postData.params) { + data.postData.text = '' + } else { + data.postData.paramsObj = data.postData.params.reduce(this.reducer, {}) + + // always overwrite + data.postData.text = qs.stringify(data.postData.paramsObj) + } + } else if (some([ + 'text/json', + 'text/x-json', + 'application/json', + 'application/x-json'])) { + data.postData.mimeType = 'application/json' + + if (data.postData.text) { + try { + data.postData.jsonObj = JSON.parse(data.postData.text) + } catch (e) { + this.request.debug(e) + + // force back to text/plain + data.postData.mimeType = 'text/plain' + } + } + } + + return data +} + +Har.prototype.options = function (options) { + // skip if no har property defined + if (!options.har) { + return options + } + + var har = {} + extend(har, options.har) + + // only process the first entry + if (har.log && har.log.entries) { + har = har.log.entries[0] + } + + // add optional properties to make validation successful + har.url = har.url || options.url || options.uri || options.baseUrl || '/' + har.httpVersion = har.httpVersion || 'HTTP/1.1' + har.queryString = har.queryString || [] + har.headers = har.headers || [] + har.cookies = har.cookies || [] + har.postData = har.postData || {} + har.postData.mimeType = har.postData.mimeType || 'application/octet-stream' + + har.bodySize = 0 + har.headersSize = 0 + har.postData.size = 0 + + if (!validate.request(har)) { + return options + } + + // clean up and get some utility properties + var req = this.prep(har) + + // construct new options + if (req.url) { + options.url = req.url + } + + if (req.method) { + options.method = req.method + } + + if (Object.keys(req.queryObj).length) { + options.qs = req.queryObj + } + + if (Object.keys(req.headersObj).length) { + options.headers = req.headersObj + } + + function test (type) { + return req.postData.mimeType.indexOf(type) === 0 + } + if (test('application/x-www-form-urlencoded')) { + options.form = req.postData.paramsObj + } else if (test('application/json')) { + if (req.postData.jsonObj) { + options.body = req.postData.jsonObj + options.json = true + } + } else if (test('multipart/form-data')) { + options.formData = {} + + req.postData.params.forEach(function (param) { + var attachment = {} + + if (!param.fileName && !param.contentType) { + options.formData[param.name] = param.value + return + } + + // attempt to read from disk! + if (param.fileName && !param.value) { + attachment.value = fs.createReadStream(param.fileName) + } else if (param.value) { + attachment.value = param.value + } + + if (param.fileName) { + attachment.options = { + filename: param.fileName, + contentType: param.contentType ? param.contentType : null + } + } + + options.formData[param.name] = attachment + }) + } else { + if (req.postData.text) { + options.body = req.postData.text + } + } + + return options +} + +exports.t = Har + + +/***/ }), + +/***/ 24956: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var crypto = __nccwpck_require__(6113) + +function randomString (size) { + var bits = (size + 1) * 6 + var buffer = crypto.randomBytes(Math.ceil(bits / 8)) + var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '') + return string.slice(0, size) +} + +function calculatePayloadHash (payload, algorithm, contentType) { + var hash = crypto.createHash(algorithm) + hash.update('hawk.1.payload\n') + hash.update((contentType ? contentType.split(';')[0].trim().toLowerCase() : '') + '\n') + hash.update(payload || '') + hash.update('\n') + return hash.digest('base64') +} + +exports.calculateMac = function (credentials, opts) { + var normalized = 'hawk.1.header\n' + + opts.ts + '\n' + + opts.nonce + '\n' + + (opts.method || '').toUpperCase() + '\n' + + opts.resource + '\n' + + opts.host.toLowerCase() + '\n' + + opts.port + '\n' + + (opts.hash || '') + '\n' + + if (opts.ext) { + normalized = normalized + opts.ext.replace('\\', '\\\\').replace('\n', '\\n') + } + + normalized = normalized + '\n' + + if (opts.app) { + normalized = normalized + opts.app + '\n' + (opts.dlg || '') + '\n' + } + + var hmac = crypto.createHmac(credentials.algorithm, credentials.key).update(normalized) + var digest = hmac.digest('base64') + return digest +} + +exports.header = function (uri, method, opts) { + var timestamp = opts.timestamp || Math.floor((Date.now() + (opts.localtimeOffsetMsec || 0)) / 1000) + var credentials = opts.credentials + if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) { + return '' + } + + if (['sha1', 'sha256'].indexOf(credentials.algorithm) === -1) { + return '' + } + + var artifacts = { + ts: timestamp, + nonce: opts.nonce || randomString(6), + method: method, + resource: uri.pathname + (uri.search || ''), + host: uri.hostname, + port: uri.port || (uri.protocol === 'http:' ? 80 : 443), + hash: opts.hash, + ext: opts.ext, + app: opts.app, + dlg: opts.dlg + } + + if (!artifacts.hash && (opts.payload || opts.payload === '')) { + artifacts.hash = calculatePayloadHash(opts.payload, credentials.algorithm, opts.contentType) + } + + var mac = exports.calculateMac(credentials, artifacts) + + var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== '' + var header = 'Hawk id="' + credentials.id + + '", ts="' + artifacts.ts + + '", nonce="' + artifacts.nonce + + (artifacts.hash ? '", hash="' + artifacts.hash : '') + + (hasExt ? '", ext="' + artifacts.ext.replace(/\\/g, '\\\\').replace(/"/g, '\\"') : '') + + '", mac="' + mac + '"' + + if (artifacts.app) { + header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"' + } + + return header +} + + +/***/ }), + +/***/ 30793: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var jsonSafeStringify = __nccwpck_require__(18849) +var crypto = __nccwpck_require__(6113) +var Buffer = (__nccwpck_require__(63215).Buffer) + +var defer = typeof setImmediate === 'undefined' + ? process.nextTick + : setImmediate + +function paramsHaveRequestBody (params) { + return ( + params.body || + params.requestBodyStream || + (params.json && typeof params.json !== 'boolean') || + params.multipart + ) +} + +function safeStringify (obj, replacer) { + var ret + try { + ret = JSON.stringify(obj, replacer) + } catch (e) { + ret = jsonSafeStringify(obj, replacer) + } + return ret +} + +function md5 (str) { + return crypto.createHash('md5').update(str).digest('hex') +} + +function isReadStream (rs) { + return rs.readable && rs.path && rs.mode +} + +function toBase64 (str) { + return Buffer.from(str || '', 'utf8').toString('base64') +} + +function copy (obj) { + var o = {} + Object.keys(obj).forEach(function (i) { + o[i] = obj[i] + }) + return o +} + +function version () { + var numbers = process.version.replace('v', '').split('.') + return { + major: parseInt(numbers[0], 10), + minor: parseInt(numbers[1], 10), + patch: parseInt(numbers[2], 10) + } +} + +exports.paramsHaveRequestBody = paramsHaveRequestBody +exports.safeStringify = safeStringify +exports.md5 = md5 +exports.isReadStream = isReadStream +exports.toBase64 = toBase64 +exports.copy = copy +exports.version = version +exports.defer = defer + + +/***/ }), + +/***/ 93612: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var uuid = __nccwpck_require__(13902) +var CombinedStream = __nccwpck_require__(93324) +var isstream = __nccwpck_require__(98201) +var Buffer = (__nccwpck_require__(63215).Buffer) + +function Multipart (request) { + this.request = request + this.boundary = uuid() + this.chunked = false + this.body = null +} + +Multipart.prototype.isChunked = function (options) { + var self = this + var chunked = false + var parts = options.data || options + + if (!parts.forEach) { + self.request.emit('error', new Error('Argument error, options.multipart.')) + } + + if (options.chunked !== undefined) { + chunked = options.chunked + } + + if (self.request.getHeader('transfer-encoding') === 'chunked') { + chunked = true + } + + if (!chunked) { + parts.forEach(function (part) { + if (typeof part.body === 'undefined') { + self.request.emit('error', new Error('Body attribute missing in multipart.')) + } + if (isstream(part.body)) { + chunked = true + } + }) + } + + return chunked +} + +Multipart.prototype.setHeaders = function (chunked) { + var self = this + + if (chunked && !self.request.hasHeader('transfer-encoding')) { + self.request.setHeader('transfer-encoding', 'chunked') + } + + var header = self.request.getHeader('content-type') + + if (!header || header.indexOf('multipart') === -1) { + self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) + } else { + if (header.indexOf('boundary') !== -1) { + self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1') + } else { + self.request.setHeader('content-type', header + '; boundary=' + self.boundary) + } + } +} + +Multipart.prototype.build = function (parts, chunked) { + var self = this + var body = chunked ? new CombinedStream() : [] + + function add (part) { + if (typeof part === 'number') { + part = part.toString() + } + return chunked ? body.append(part) : body.push(Buffer.from(part)) + } + + if (self.request.preambleCRLF) { + add('\r\n') + } + + parts.forEach(function (part) { + var preamble = '--' + self.boundary + '\r\n' + Object.keys(part).forEach(function (key) { + if (key === 'body') { return } + preamble += key + ': ' + part[key] + '\r\n' + }) + preamble += '\r\n' + add(preamble) + add(part.body) + add('\r\n') + }) + add('--' + self.boundary + '--') + + if (self.request.postambleCRLF) { + add('\r\n') + } + + return body +} + +Multipart.prototype.onRequest = function (options) { + var self = this + + var chunked = self.isChunked(options) + var parts = options.data || options + + self.setHeaders(chunked) + self.chunked = chunked + self.body = self.build(parts, chunked) +} + +exports.$ = Multipart + + +/***/ }), + +/***/ 76456: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var url = __nccwpck_require__(57310) +var qs = __nccwpck_require__(50737) +var caseless = __nccwpck_require__(12146) +var uuid = __nccwpck_require__(13902) +var oauth = __nccwpck_require__(1142) +var crypto = __nccwpck_require__(6113) +var Buffer = (__nccwpck_require__(63215).Buffer) + +function OAuth (request) { + this.request = request + this.params = null +} + +OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) { + var oa = {} + for (var i in _oauth) { + oa['oauth_' + i] = _oauth[i] + } + if (!oa.oauth_version) { + oa.oauth_version = '1.0' + } + if (!oa.oauth_timestamp) { + oa.oauth_timestamp = Math.floor(Date.now() / 1000).toString() + } + if (!oa.oauth_nonce) { + oa.oauth_nonce = uuid().replace(/-/g, '') + } + if (!oa.oauth_signature_method) { + oa.oauth_signature_method = 'HMAC-SHA1' + } + + var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key // eslint-disable-line camelcase + delete oa.oauth_consumer_secret + delete oa.oauth_private_key + + var token_secret = oa.oauth_token_secret // eslint-disable-line camelcase + delete oa.oauth_token_secret + + var realm = oa.oauth_realm + delete oa.oauth_realm + delete oa.oauth_transport_method + + var baseurl = uri.protocol + '//' + uri.host + uri.pathname + var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&')) + + oa.oauth_signature = oauth.sign( + oa.oauth_signature_method, + method, + baseurl, + params, + consumer_secret_or_private_key, // eslint-disable-line camelcase + token_secret // eslint-disable-line camelcase + ) + + if (realm) { + oa.realm = realm + } + + return oa +} + +OAuth.prototype.buildBodyHash = function (_oauth, body) { + if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) { + this.request.emit('error', new Error('oauth: ' + _oauth.signature_method + + ' signature_method not supported with body_hash signing.')) + } + + var shasum = crypto.createHash('sha1') + shasum.update(body || '') + var sha1 = shasum.digest('hex') + + return Buffer.from(sha1, 'hex').toString('base64') +} + +OAuth.prototype.concatParams = function (oa, sep, wrap) { + wrap = wrap || '' + + var params = Object.keys(oa).filter(function (i) { + return i !== 'realm' && i !== 'oauth_signature' + }).sort() + + if (oa.realm) { + params.splice(0, 0, 'realm') + } + params.push('oauth_signature') + + return params.map(function (i) { + return i + '=' + wrap + oauth.rfc3986(oa[i]) + wrap + }).join(sep) +} + +OAuth.prototype.onRequest = function (_oauth) { + var self = this + self.params = _oauth + + var uri = self.request.uri || {} + var method = self.request.method || '' + var headers = caseless(self.request.headers) + var body = self.request.body || '' + var qsLib = self.request.qsLib || qs + + var form + var query + var contentType = headers.get('content-type') || '' + var formContentType = 'application/x-www-form-urlencoded' + var transport = _oauth.transport_method || 'header' + + if (contentType.slice(0, formContentType.length) === formContentType) { + contentType = formContentType + form = body + } + if (uri.query) { + query = uri.query + } + if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) { + self.request.emit('error', new Error('oauth: transport_method of body requires POST ' + + 'and content-type ' + formContentType)) + } + + if (!form && typeof _oauth.body_hash === 'boolean') { + _oauth.body_hash = self.buildBodyHash(_oauth, self.request.body.toString()) + } + + var oa = self.buildParams(_oauth, uri, method, query, form, qsLib) + + switch (transport) { + case 'header': + self.request.setHeader('Authorization', 'OAuth ' + self.concatParams(oa, ',', '"')) + break + + case 'query': + var href = self.request.uri.href += (query ? '&' : '?') + self.concatParams(oa, '&') + self.request.uri = url.parse(href) + self.request.path = self.request.uri.path + break + + case 'body': + self.request.body = (form ? form + '&' : '') + self.concatParams(oa, '&') + break + + default: + self.request.emit('error', new Error('oauth: transport_method invalid')) + } +} + +exports.f = OAuth + + +/***/ }), + +/***/ 27198: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var qs = __nccwpck_require__(50737) +var querystring = __nccwpck_require__(63477) + +function Querystring (request) { + this.request = request + this.lib = null + this.useQuerystring = null + this.parseOptions = null + this.stringifyOptions = null +} + +Querystring.prototype.init = function (options) { + if (this.lib) { return } + + this.useQuerystring = options.useQuerystring + this.lib = (this.useQuerystring ? querystring : qs) + + this.parseOptions = options.qsParseOptions || {} + this.stringifyOptions = options.qsStringifyOptions || {} +} + +Querystring.prototype.stringify = function (obj) { + return (this.useQuerystring) + ? this.rfc3986(this.lib.stringify(obj, + this.stringifyOptions.sep || null, + this.stringifyOptions.eq || null, + this.stringifyOptions)) + : this.lib.stringify(obj, this.stringifyOptions) +} + +Querystring.prototype.parse = function (str) { + return (this.useQuerystring) + ? this.lib.parse(str, + this.parseOptions.sep || null, + this.parseOptions.eq || null, + this.parseOptions) + : this.lib.parse(str, this.parseOptions) +} + +Querystring.prototype.rfc3986 = function (str) { + return str.replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +Querystring.prototype.unescape = querystring.unescape + +exports.h = Querystring + + +/***/ }), + +/***/ 76067: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var url = __nccwpck_require__(57310) +var isUrl = /^https?:/ + +function Redirect (request) { + this.request = request + this.followRedirect = true + this.followRedirects = true + this.followAllRedirects = false + this.followOriginalHttpMethod = false + this.allowRedirect = function () { return true } + this.maxRedirects = 10 + this.redirects = [] + this.redirectsFollowed = 0 + this.removeRefererHeader = false +} + +Redirect.prototype.onRequest = function (options) { + var self = this + + if (options.maxRedirects !== undefined) { + self.maxRedirects = options.maxRedirects + } + if (typeof options.followRedirect === 'function') { + self.allowRedirect = options.followRedirect + } + if (options.followRedirect !== undefined) { + self.followRedirects = !!options.followRedirect + } + if (options.followAllRedirects !== undefined) { + self.followAllRedirects = options.followAllRedirects + } + if (self.followRedirects || self.followAllRedirects) { + self.redirects = self.redirects || [] + } + if (options.removeRefererHeader !== undefined) { + self.removeRefererHeader = options.removeRefererHeader + } + if (options.followOriginalHttpMethod !== undefined) { + self.followOriginalHttpMethod = options.followOriginalHttpMethod + } +} + +Redirect.prototype.redirectTo = function (response) { + var self = this + var request = self.request + + var redirectTo = null + if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) { + var location = response.caseless.get('location') + request.debug('redirect', location) + + if (self.followAllRedirects) { + redirectTo = location + } else if (self.followRedirects) { + switch (request.method) { + case 'PATCH': + case 'PUT': + case 'POST': + case 'DELETE': + // Do not follow redirects + break + default: + redirectTo = location + break + } + } + } else if (response.statusCode === 401) { + var authHeader = request._auth.onResponse(response) + if (authHeader) { + request.setHeader('authorization', authHeader) + redirectTo = request.uri + } + } + return redirectTo +} + +Redirect.prototype.onResponse = function (response) { + var self = this + var request = self.request + + var redirectTo = self.redirectTo(response) + if (!redirectTo || !self.allowRedirect.call(request, response)) { + return false + } + + request.debug('redirect to', redirectTo) + + // ignore any potential response body. it cannot possibly be useful + // to us at this point. + // response.resume should be defined, but check anyway before calling. Workaround for browserify. + if (response.resume) { + response.resume() + } + + if (self.redirectsFollowed >= self.maxRedirects) { + request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href)) + return false + } + self.redirectsFollowed += 1 + + if (!isUrl.test(redirectTo)) { + redirectTo = url.resolve(request.uri.href, redirectTo) + } + + var uriPrev = request.uri + request.uri = url.parse(redirectTo) + + // handle the case where we change protocol from https to http or vice versa + if (request.uri.protocol !== uriPrev.protocol) { + delete request.agent + } + + self.redirects.push({ statusCode: response.statusCode, redirectUri: redirectTo }) + + if (self.followAllRedirects && request.method !== 'HEAD' && + response.statusCode !== 401 && response.statusCode !== 307) { + request.method = self.followOriginalHttpMethod ? request.method : 'GET' + } + // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215 + delete request.src + delete request.req + delete request._started + if (response.statusCode !== 401 && response.statusCode !== 307) { + // Remove parameters from the previous response, unless this is the second request + // for a server that requires digest authentication. + delete request.body + delete request._form + if (request.headers) { + request.removeHeader('host') + request.removeHeader('content-type') + request.removeHeader('content-length') + if (request.uri.hostname !== request.originalHost.split(':')[0]) { + // Remove authorization if changing hostnames (but not if just + // changing ports or protocols). This matches the behavior of curl: + // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710 + request.removeHeader('authorization') + } + } + } + + if (!self.removeRefererHeader) { + request.setHeader('referer', uriPrev.href) + } + + request.emit('redirect') + + request.init() + + return true +} + +exports.l = Redirect + + +/***/ }), + +/***/ 99208: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var url = __nccwpck_require__(57310) +var tunnel = __nccwpck_require__(76566) + +var defaultProxyHeaderWhiteList = [ + 'accept', + 'accept-charset', + 'accept-encoding', + 'accept-language', + 'accept-ranges', + 'cache-control', + 'content-encoding', + 'content-language', + 'content-location', + 'content-md5', + 'content-range', + 'content-type', + 'connection', + 'date', + 'expect', + 'max-forwards', + 'pragma', + 'referer', + 'te', + 'user-agent', + 'via' +] + +var defaultProxyHeaderExclusiveList = [ + 'proxy-authorization' +] + +function constructProxyHost (uriObject) { + var port = uriObject.port + var protocol = uriObject.protocol + var proxyHost = uriObject.hostname + ':' + + if (port) { + proxyHost += port + } else if (protocol === 'https:') { + proxyHost += '443' + } else { + proxyHost += '80' + } + + return proxyHost +} + +function constructProxyHeaderWhiteList (headers, proxyHeaderWhiteList) { + var whiteList = proxyHeaderWhiteList + .reduce(function (set, header) { + set[header.toLowerCase()] = true + return set + }, {}) + + return Object.keys(headers) + .filter(function (header) { + return whiteList[header.toLowerCase()] + }) + .reduce(function (set, header) { + set[header] = headers[header] + return set + }, {}) +} + +function constructTunnelOptions (request, proxyHeaders) { + var proxy = request.proxy + + var tunnelOptions = { + proxy: { + host: proxy.hostname, + port: +proxy.port, + proxyAuth: proxy.auth, + headers: proxyHeaders + }, + headers: request.headers, + ca: request.ca, + cert: request.cert, + key: request.key, + passphrase: request.passphrase, + pfx: request.pfx, + ciphers: request.ciphers, + rejectUnauthorized: request.rejectUnauthorized, + secureOptions: request.secureOptions, + secureProtocol: request.secureProtocol + } + + return tunnelOptions +} + +function constructTunnelFnName (uri, proxy) { + var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http') + var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http') + return [uriProtocol, proxyProtocol].join('Over') +} + +function getTunnelFn (request) { + var uri = request.uri + var proxy = request.proxy + var tunnelFnName = constructTunnelFnName(uri, proxy) + return tunnel[tunnelFnName] +} + +function Tunnel (request) { + this.request = request + this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList + this.proxyHeaderExclusiveList = [] + if (typeof request.tunnel !== 'undefined') { + this.tunnelOverride = request.tunnel + } +} + +Tunnel.prototype.isEnabled = function () { + var self = this + var request = self.request + // Tunnel HTTPS by default. Allow the user to override this setting. + + // If self.tunnelOverride is set (the user specified a value), use it. + if (typeof self.tunnelOverride !== 'undefined') { + return self.tunnelOverride + } + + // If the destination is HTTPS, tunnel. + if (request.uri.protocol === 'https:') { + return true + } + + // Otherwise, do not use tunnel. + return false +} + +Tunnel.prototype.setup = function (options) { + var self = this + var request = self.request + + options = options || {} + + if (typeof request.proxy === 'string') { + request.proxy = url.parse(request.proxy) + } + + if (!request.proxy || !request.tunnel) { + return false + } + + // Setup Proxy Header Exclusive List and White List + if (options.proxyHeaderWhiteList) { + self.proxyHeaderWhiteList = options.proxyHeaderWhiteList + } + if (options.proxyHeaderExclusiveList) { + self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList + } + + var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList) + var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList) + + // Setup Proxy Headers and Proxy Headers Host + // Only send the Proxy White Listed Header names + var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList) + proxyHeaders.host = constructProxyHost(request.uri) + + proxyHeaderExclusiveList.forEach(request.removeHeader, request) + + // Set Agent from Tunnel Data + var tunnelFn = getTunnelFn(request) + var tunnelOptions = constructTunnelOptions(request, proxyHeaders) + request.agent = tunnelFn(tunnelOptions) + + return true +} + +Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList +Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList +exports.n = Tunnel + + +/***/ }), + +/***/ 23525: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +var net = __nccwpck_require__(41808); +var urlParse = (__nccwpck_require__(57310).parse); +var util = __nccwpck_require__(73837); +var pubsuffix = __nccwpck_require__(73126); +var Store = (__nccwpck_require__(72609)/* .Store */ .y); +var MemoryCookieStore = (__nccwpck_require__(40136)/* .MemoryCookieStore */ .m); +var pathMatch = (__nccwpck_require__(93995)/* .pathMatch */ .U); +var VERSION = __nccwpck_require__(21270); + +var punycode; +try { + punycode = __nccwpck_require__(85477); +} catch(e) { + console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization"); +} + +// From RFC6265 S4.1.1 +// note that it excludes \x3B ";" +var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; + +var CONTROL_CHARS = /[\x00-\x1F]/; + +// From Chromium // '\r', '\n' and '\0' should be treated as a terminator in +// the "relaxed" mode, see: +// https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60 +var TERMINATORS = ['\n', '\r', '\0']; + +// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' +// Note ';' is \x3B +var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; + +// date-time parsing constants (RFC6265 S5.1.1) + +var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; + +var MONTH_TO_NUM = { + jan:0, feb:1, mar:2, apr:3, may:4, jun:5, + jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 +}; +var NUM_TO_MONTH = [ + 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' +]; +var NUM_TO_DAY = [ + 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' +]; + +var MAX_TIME = 2147483647000; // 31-bit max +var MIN_TIME = 0; // 31-bit min + +/* + * Parses a Natural number (i.e., non-negative integer) with either the + * *DIGIT ( non-digit *OCTET ) + * or + * *DIGIT + * grammar (RFC6265 S5.1.1). + * + * The "trailingOK" boolean controls if the grammar accepts a + * "( non-digit *OCTET )" trailer. + */ +function parseDigits(token, minDigits, maxDigits, trailingOK) { + var count = 0; + while (count < token.length) { + var c = token.charCodeAt(count); + // "non-digit = %x00-2F / %x3A-FF" + if (c <= 0x2F || c >= 0x3A) { + break; + } + count++; + } + + // constrain to a minimum and maximum number of digits. + if (count < minDigits || count > maxDigits) { + return null; + } + + if (!trailingOK && count != token.length) { + return null; + } + + return parseInt(token.substr(0,count), 10); +} + +function parseTime(token) { + var parts = token.split(':'); + var result = [0,0,0]; + + /* RF6256 S5.1.1: + * time = hms-time ( non-digit *OCTET ) + * hms-time = time-field ":" time-field ":" time-field + * time-field = 1*2DIGIT + */ + + if (parts.length !== 3) { + return null; + } + + for (var i = 0; i < 3; i++) { + // "time-field" must be strictly "1*2DIGIT", HOWEVER, "hms-time" can be + // followed by "( non-digit *OCTET )" so therefore the last time-field can + // have a trailer + var trailingOK = (i == 2); + var num = parseDigits(parts[i], 1, 2, trailingOK); + if (num === null) { + return null; + } + result[i] = num; + } + + return result; +} + +function parseMonth(token) { + token = String(token).substr(0,3).toLowerCase(); + var num = MONTH_TO_NUM[token]; + return num >= 0 ? num : null; +} + +/* + * RFC6265 S5.1.1 date parser (see RFC for full grammar) + */ +function parseDate(str) { + if (!str) { + return; + } + + /* RFC6265 S5.1.1: + * 2. Process each date-token sequentially in the order the date-tokens + * appear in the cookie-date + */ + var tokens = str.split(DATE_DELIM); + if (!tokens) { + return; + } + + var hour = null; + var minute = null; + var second = null; + var dayOfMonth = null; + var month = null; + var year = null; + + for (var i=0; i= 70 && year <= 99) { + year += 1900; + } else if (year >= 0 && year <= 69) { + year += 2000; + } + } + } + } + + /* RFC 6265 S5.1.1 + * "5. Abort these steps and fail to parse the cookie-date if: + * * at least one of the found-day-of-month, found-month, found- + * year, or found-time flags is not set, + * * the day-of-month-value is less than 1 or greater than 31, + * * the year-value is less than 1601, + * * the hour-value is greater than 23, + * * the minute-value is greater than 59, or + * * the second-value is greater than 59. + * (Note that leap seconds cannot be represented in this syntax.)" + * + * So, in order as above: + */ + if ( + dayOfMonth === null || month === null || year === null || second === null || + dayOfMonth < 1 || dayOfMonth > 31 || + year < 1601 || + hour > 23 || + minute > 59 || + second > 59 + ) { + return; + } + + return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); +} + +function formatDate(date) { + var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; + var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; + var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; + var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; + return NUM_TO_DAY[date.getUTCDay()] + ', ' + + d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ + h+':'+m+':'+s+' GMT'; +} + +// S5.1.2 Canonicalized Host Names +function canonicalDomain(str) { + if (str == null) { + return null; + } + str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . + + // convert to IDN if any non-ASCII characters + if (punycode && /[^\u0001-\u007f]/.test(str)) { + str = punycode.toASCII(str); + } + + return str.toLowerCase(); +} + +// S5.1.3 Domain Matching +function domainMatch(str, domStr, canonicalize) { + if (str == null || domStr == null) { + return null; + } + if (canonicalize !== false) { + str = canonicalDomain(str); + domStr = canonicalDomain(domStr); + } + + /* + * "The domain string and the string are identical. (Note that both the + * domain string and the string will have been canonicalized to lower case at + * this point)" + */ + if (str == domStr) { + return true; + } + + /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ + + /* "* The string is a host name (i.e., not an IP address)." */ + if (net.isIP(str)) { + return false; + } + + /* "* The domain string is a suffix of the string" */ + var idx = str.indexOf(domStr); + if (idx <= 0) { + return false; // it's a non-match (-1) or prefix (0) + } + + // e.g "a.b.c".indexOf("b.c") === 2 + // 5 === 3+2 + if (str.length !== domStr.length + idx) { // it's not a suffix + return false; + } + + /* "* The last character of the string that is not included in the domain + * string is a %x2E (".") character." */ + if (str.substr(idx-1,1) !== '.') { + return false; + } + + return true; +} + + +// RFC6265 S5.1.4 Paths and Path-Match + +/* + * "The user agent MUST use an algorithm equivalent to the following algorithm + * to compute the default-path of a cookie:" + * + * Assumption: the path (and not query part or absolute uri) is passed in. + */ +function defaultPath(path) { + // "2. If the uri-path is empty or if the first character of the uri-path is not + // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. + if (!path || path.substr(0,1) !== "/") { + return "/"; + } + + // "3. If the uri-path contains no more than one %x2F ("/") character, output + // %x2F ("/") and skip the remaining step." + if (path === "/") { + return path; + } + + var rightSlash = path.lastIndexOf("/"); + if (rightSlash === 0) { + return "/"; + } + + // "4. Output the characters of the uri-path from the first character up to, + // but not including, the right-most %x2F ("/")." + return path.slice(0, rightSlash); +} + +function trimTerminator(str) { + for (var t = 0; t < TERMINATORS.length; t++) { + var terminatorIdx = str.indexOf(TERMINATORS[t]); + if (terminatorIdx !== -1) { + str = str.substr(0,terminatorIdx); + } + } + + return str; +} + +function parseCookiePair(cookiePair, looseMode) { + cookiePair = trimTerminator(cookiePair); + + var firstEq = cookiePair.indexOf('='); + if (looseMode) { + if (firstEq === 0) { // '=' is immediately at start + cookiePair = cookiePair.substr(1); + firstEq = cookiePair.indexOf('='); // might still need to split on '=' + } + } else { // non-loose mode + if (firstEq <= 0) { // no '=' or is at start + return; // needs to have non-empty "cookie-name" + } + } + + var cookieName, cookieValue; + if (firstEq <= 0) { + cookieName = ""; + cookieValue = cookiePair.trim(); + } else { + cookieName = cookiePair.substr(0, firstEq).trim(); + cookieValue = cookiePair.substr(firstEq+1).trim(); + } + + if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { + return; + } + + var c = new Cookie(); + c.key = cookieName; + c.value = cookieValue; + return c; +} + +function parse(str, options) { + if (!options || typeof options !== 'object') { + options = {}; + } + str = str.trim(); + + // We use a regex to parse the "name-value-pair" part of S5.2 + var firstSemi = str.indexOf(';'); // S5.2 step 1 + var cookiePair = (firstSemi === -1) ? str : str.substr(0, firstSemi); + var c = parseCookiePair(cookiePair, !!options.loose); + if (!c) { + return; + } + + if (firstSemi === -1) { + return c; + } + + // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question)." plus later on in the same section + // "discard the first ";" and trim". + var unparsed = str.slice(firstSemi + 1).trim(); + + // "If the unparsed-attributes string is empty, skip the rest of these + // steps." + if (unparsed.length === 0) { + return c; + } + + /* + * S5.2 says that when looping over the items "[p]rocess the attribute-name + * and attribute-value according to the requirements in the following + * subsections" for every item. Plus, for many of the individual attributes + * in S5.3 it says to use the "attribute-value of the last attribute in the + * cookie-attribute-list". Therefore, in this implementation, we overwrite + * the previous value. + */ + var cookie_avs = unparsed.split(';'); + while (cookie_avs.length) { + var av = cookie_avs.shift().trim(); + if (av.length === 0) { // happens if ";;" appears + continue; + } + var av_sep = av.indexOf('='); + var av_key, av_value; + + if (av_sep === -1) { + av_key = av; + av_value = null; + } else { + av_key = av.substr(0,av_sep); + av_value = av.substr(av_sep+1); + } + + av_key = av_key.trim().toLowerCase(); + + if (av_value) { + av_value = av_value.trim(); + } + + switch(av_key) { + case 'expires': // S5.2.1 + if (av_value) { + var exp = parseDate(av_value); + // "If the attribute-value failed to parse as a cookie date, ignore the + // cookie-av." + if (exp) { + // over and underflow not realistically a concern: V8's getTime() seems to + // store something larger than a 32-bit time_t (even with 32-bit node) + c.expires = exp; + } + } + break; + + case 'max-age': // S5.2.2 + if (av_value) { + // "If the first character of the attribute-value is not a DIGIT or a "-" + // character ...[or]... If the remainder of attribute-value contains a + // non-DIGIT character, ignore the cookie-av." + if (/^-?[0-9]+$/.test(av_value)) { + var delta = parseInt(av_value, 10); + // "If delta-seconds is less than or equal to zero (0), let expiry-time + // be the earliest representable date and time." + c.setMaxAge(delta); + } + } + break; + + case 'domain': // S5.2.3 + // "If the attribute-value is empty, the behavior is undefined. However, + // the user agent SHOULD ignore the cookie-av entirely." + if (av_value) { + // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E + // (".") character." + var domain = av_value.trim().replace(/^\./, ''); + if (domain) { + // "Convert the cookie-domain to lower case." + c.domain = domain.toLowerCase(); + } + } + break; + + case 'path': // S5.2.4 + /* + * "If the attribute-value is empty or if the first character of the + * attribute-value is not %x2F ("/"): + * Let cookie-path be the default-path. + * Otherwise: + * Let cookie-path be the attribute-value." + * + * We'll represent the default-path as null since it depends on the + * context of the parsing. + */ + c.path = av_value && av_value[0] === "/" ? av_value : null; + break; + + case 'secure': // S5.2.5 + /* + * "If the attribute-name case-insensitively matches the string "Secure", + * the user agent MUST append an attribute to the cookie-attribute-list + * with an attribute-name of Secure and an empty attribute-value." + */ + c.secure = true; + break; + + case 'httponly': // S5.2.6 -- effectively the same as 'secure' + c.httpOnly = true; + break; + + default: + c.extensions = c.extensions || []; + c.extensions.push(av); + break; + } + } + + return c; +} + +// avoid the V8 deoptimization monster! +function jsonParse(str) { + var obj; + try { + obj = JSON.parse(str); + } catch (e) { + return e; + } + return obj; +} + +function fromJSON(str) { + if (!str) { + return null; + } + + var obj; + if (typeof str === 'string') { + obj = jsonParse(str); + if (obj instanceof Error) { + return null; + } + } else { + // assume it's an Object + obj = str; + } + + var c = new Cookie(); + for (var i=0; i 1) { + var lindex = path.lastIndexOf('/'); + if (lindex === 0) { + break; + } + path = path.substr(0,lindex); + permutations.push(path); + } + permutations.push('/'); + return permutations; +} + +function getCookieContext(url) { + if (url instanceof Object) { + return url; + } + // NOTE: decodeURI will throw on malformed URIs (see GH-32). + // Therefore, we will just skip decoding for such URIs. + try { + url = decodeURI(url); + } + catch(err) { + // Silently swallow error + } + + return urlParse(url); +} + +function Cookie(options) { + options = options || {}; + + Object.keys(options).forEach(function(prop) { + if (Cookie.prototype.hasOwnProperty(prop) && + Cookie.prototype[prop] !== options[prop] && + prop.substr(0,1) !== '_') + { + this[prop] = options[prop]; + } + }, this); + + this.creation = this.creation || new Date(); + + // used to break creation ties in cookieCompare(): + Object.defineProperty(this, 'creationIndex', { + configurable: false, + enumerable: false, // important for assert.deepEqual checks + writable: true, + value: ++Cookie.cookiesCreated + }); +} + +Cookie.cookiesCreated = 0; // incremented each time a cookie is created + +Cookie.parse = parse; +Cookie.fromJSON = fromJSON; + +Cookie.prototype.key = ""; +Cookie.prototype.value = ""; + +// the order in which the RFC has them: +Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity +Cookie.prototype.maxAge = null; // takes precedence over expires for TTL +Cookie.prototype.domain = null; +Cookie.prototype.path = null; +Cookie.prototype.secure = false; +Cookie.prototype.httpOnly = false; +Cookie.prototype.extensions = null; + +// set by the CookieJar: +Cookie.prototype.hostOnly = null; // boolean when set +Cookie.prototype.pathIsDefault = null; // boolean when set +Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse +Cookie.prototype.lastAccessed = null; // Date when set +Object.defineProperty(Cookie.prototype, 'creationIndex', { + configurable: true, + enumerable: false, + writable: true, + value: 0 +}); + +Cookie.serializableProperties = Object.keys(Cookie.prototype) + .filter(function(prop) { + return !( + Cookie.prototype[prop] instanceof Function || + prop === 'creationIndex' || + prop.substr(0,1) === '_' + ); + }); + +Cookie.prototype.inspect = function inspect() { + var now = Date.now(); + return 'Cookie="'+this.toString() + + '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + + '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + + '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + + '"'; +}; + +// Use the new custom inspection symbol to add the custom inspect function if +// available. +if (util.inspect.custom) { + Cookie.prototype[util.inspect.custom] = Cookie.prototype.inspect; +} + +Cookie.prototype.toJSON = function() { + var obj = {}; + + var props = Cookie.serializableProperties; + for (var i=0; i { + +"use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +var Store = (__nccwpck_require__(72609)/* .Store */ .y); +var permuteDomain = (__nccwpck_require__(19427).permuteDomain); +var pathMatch = (__nccwpck_require__(93995)/* .pathMatch */ .U); +var util = __nccwpck_require__(73837); + +function MemoryCookieStore() { + Store.call(this); + this.idx = {}; +} +util.inherits(MemoryCookieStore, Store); +exports.m = MemoryCookieStore; +MemoryCookieStore.prototype.idx = null; + +// Since it's just a struct in RAM, this Store is synchronous +MemoryCookieStore.prototype.synchronous = true; + +// force a default depth: +MemoryCookieStore.prototype.inspect = function() { + return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; +}; + +// Use the new custom inspection symbol to add the custom inspect function if +// available. +if (util.inspect.custom) { + MemoryCookieStore.prototype[util.inspect.custom] = MemoryCookieStore.prototype.inspect; +} + +MemoryCookieStore.prototype.findCookie = function(domain, path, key, cb) { + if (!this.idx[domain]) { + return cb(null,undefined); + } + if (!this.idx[domain][path]) { + return cb(null,undefined); + } + return cb(null,this.idx[domain][path][key]||null); +}; + +MemoryCookieStore.prototype.findCookies = function(domain, path, cb) { + var results = []; + if (!domain) { + return cb(null,[]); + } + + var pathMatcher; + if (!path) { + // null means "all paths" + pathMatcher = function matchAll(domainIndex) { + for (var curPath in domainIndex) { + var pathIndex = domainIndex[curPath]; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + } + }; + + } else { + pathMatcher = function matchRFC(domainIndex) { + //NOTE: we should use path-match algorithm from S5.1.4 here + //(see : https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/canonical_cookie.cc#L299) + Object.keys(domainIndex).forEach(function (cookiePath) { + if (pathMatch(path, cookiePath)) { + var pathIndex = domainIndex[cookiePath]; + + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + } + }); + }; + } + + var domains = permuteDomain(domain) || [domain]; + var idx = this.idx; + domains.forEach(function(curDomain) { + var domainIndex = idx[curDomain]; + if (!domainIndex) { + return; + } + pathMatcher(domainIndex); + }); + + cb(null,results); +}; + +MemoryCookieStore.prototype.putCookie = function(cookie, cb) { + if (!this.idx[cookie.domain]) { + this.idx[cookie.domain] = {}; + } + if (!this.idx[cookie.domain][cookie.path]) { + this.idx[cookie.domain][cookie.path] = {}; + } + this.idx[cookie.domain][cookie.path][cookie.key] = cookie; + cb(null); +}; + +MemoryCookieStore.prototype.updateCookie = function(oldCookie, newCookie, cb) { + // updateCookie() may avoid updating cookies that are identical. For example, + // lastAccessed may not be important to some stores and an equality + // comparison could exclude that field. + this.putCookie(newCookie,cb); +}; + +MemoryCookieStore.prototype.removeCookie = function(domain, path, key, cb) { + if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { + delete this.idx[domain][path][key]; + } + cb(null); +}; + +MemoryCookieStore.prototype.removeCookies = function(domain, path, cb) { + if (this.idx[domain]) { + if (path) { + delete this.idx[domain][path]; + } else { + delete this.idx[domain]; + } + } + return cb(null); +}; + +MemoryCookieStore.prototype.removeAllCookies = function(cb) { + this.idx = {}; + return cb(null); +} + +MemoryCookieStore.prototype.getAllCookies = function(cb) { + var cookies = []; + var idx = this.idx; + + var domains = Object.keys(idx); + domains.forEach(function(domain) { + var paths = Object.keys(idx[domain]); + paths.forEach(function(path) { + var keys = Object.keys(idx[domain][path]); + keys.forEach(function(key) { + if (key !== null) { + cookies.push(idx[domain][path][key]); + } + }); + }); + }); + + // Sort by creationIndex so deserializing retains the creation order. + // When implementing your own store, this SHOULD retain the order too + cookies.sort(function(a,b) { + return (a.creationIndex||0) - (b.creationIndex||0); + }); + + cb(null, cookies); +}; + + +/***/ }), + +/***/ 93995: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * "A request-path path-matches a given cookie-path if at least one of the + * following conditions holds:" + */ +function pathMatch (reqPath, cookiePath) { + // "o The cookie-path and the request-path are identical." + if (cookiePath === reqPath) { + return true; + } + + var idx = reqPath.indexOf(cookiePath); + if (idx === 0) { + // "o The cookie-path is a prefix of the request-path, and the last + // character of the cookie-path is %x2F ("/")." + if (cookiePath.substr(-1) === "/") { + return true; + } + + // " o The cookie-path is a prefix of the request-path, and the first + // character of the request-path that is not included in the cookie- path + // is a %x2F ("/") character." + if (reqPath.substr(cookiePath.length, 1) === "/") { + return true; + } + } + + return false; +} + +exports.U = pathMatch; + + +/***/ }), + +/***/ 19427: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +var pubsuffix = __nccwpck_require__(73126); + +// Gives the permutation of all possible domainMatch()es of a given domain. The +// array is in shortest-to-longest order. Handy for indexing. +function permuteDomain (domain) { + var pubSuf = pubsuffix.getPublicSuffix(domain); + if (!pubSuf) { + return null; + } + if (pubSuf == domain) { + return [domain]; + } + + var prefix = domain.slice(0, -(pubSuf.length + 1)); // ".example.com" + var parts = prefix.split('.').reverse(); + var cur = pubSuf; + var permutations = [cur]; + while (parts.length) { + cur = parts.shift() + '.' + cur; + permutations.push(cur); + } + return permutations; +} + +exports.permuteDomain = permuteDomain; + + +/***/ }), + +/***/ 73126: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/*! + * Copyright (c) 2018, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +var psl = __nccwpck_require__(5982); + +function getPublicSuffix(domain) { + return psl.get(domain); +} + +exports.getPublicSuffix = getPublicSuffix; + + +/***/ }), + +/***/ 72609: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/*jshint unused:false */ + +function Store() { +} +exports.y = Store; + +// Stores may be synchronous, but are still required to use a +// Continuation-Passing Style API. The CookieJar itself will expose a "*Sync" +// API that converts from synchronous-callbacks to imperative style. +Store.prototype.synchronous = false; + +Store.prototype.findCookie = function(domain, path, key, cb) { + throw new Error('findCookie is not implemented'); +}; + +Store.prototype.findCookies = function(domain, path, cb) { + throw new Error('findCookies is not implemented'); +}; + +Store.prototype.putCookie = function(cookie, cb) { + throw new Error('putCookie is not implemented'); +}; + +Store.prototype.updateCookie = function(oldCookie, newCookie, cb) { + // recommended default implementation: + // return this.putCookie(newCookie, cb); + throw new Error('updateCookie is not implemented'); +}; + +Store.prototype.removeCookie = function(domain, path, key, cb) { + throw new Error('removeCookie is not implemented'); +}; + +Store.prototype.removeCookies = function(domain, path, cb) { + throw new Error('removeCookies is not implemented'); +}; + +Store.prototype.removeAllCookies = function(cb) { + throw new Error('removeAllCookies is not implemented'); +} + +Store.prototype.getAllCookies = function(cb) { + throw new Error('getAllCookies is not implemented (therefore jar cannot be serialized)'); +}; + + +/***/ }), + +/***/ 21270: +/***/ ((module) => { + +// generated by genversion +module.exports = '2.5.0' + + +/***/ }), + +/***/ 51550: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var http = __nccwpck_require__(13685) +var https = __nccwpck_require__(95687) +var url = __nccwpck_require__(57310) +var util = __nccwpck_require__(73837) +var stream = __nccwpck_require__(12781) +var zlib = __nccwpck_require__(59796) +var aws2 = __nccwpck_require__(47557) +var aws4 = __nccwpck_require__(85132) +var httpSignature = __nccwpck_require__(25396) +var mime = __nccwpck_require__(38098) +var caseless = __nccwpck_require__(12146) +var ForeverAgent = __nccwpck_require__(65016) +var FormData = __nccwpck_require__(54550) +var extend = __nccwpck_require__(7011) +var isstream = __nccwpck_require__(98201) +var isTypedArray = (__nccwpck_require__(21720).strict) +var helpers = __nccwpck_require__(30793) +var cookies = __nccwpck_require__(41629) +var getProxyFromURI = __nccwpck_require__(2928) +var Querystring = (__nccwpck_require__(27198)/* .Querystring */ .h) +var Har = (__nccwpck_require__(75746)/* .Har */ .t) +var Auth = (__nccwpck_require__(91539)/* .Auth */ .g) +var OAuth = (__nccwpck_require__(76456)/* .OAuth */ .f) +var hawk = __nccwpck_require__(24956) +var Multipart = (__nccwpck_require__(93612)/* .Multipart */ .$) +var Redirect = (__nccwpck_require__(76067)/* .Redirect */ .l) +var Tunnel = (__nccwpck_require__(99208)/* .Tunnel */ .n) +var now = __nccwpck_require__(40806) +var Buffer = (__nccwpck_require__(63215).Buffer) + +var safeStringify = helpers.safeStringify +var isReadStream = helpers.isReadStream +var toBase64 = helpers.toBase64 +var defer = helpers.defer +var copy = helpers.copy +var version = helpers.version +var globalCookieJar = cookies.jar() + +var globalPool = {} + +function filterForNonReserved (reserved, options) { + // Filter out properties that are not reserved. + // Reserved values are passed in at call site. + + var object = {} + for (var i in options) { + var notReserved = (reserved.indexOf(i) === -1) + if (notReserved) { + object[i] = options[i] + } + } + return object +} + +function filterOutReservedFunctions (reserved, options) { + // Filter out properties that are functions and are reserved. + // Reserved values are passed in at call site. + + var object = {} + for (var i in options) { + var isReserved = !(reserved.indexOf(i) === -1) + var isFunction = (typeof options[i] === 'function') + if (!(isReserved && isFunction)) { + object[i] = options[i] + } + } + return object +} + +// Return a simpler request object to allow serialization +function requestToJSON () { + var self = this + return { + uri: self.uri, + method: self.method, + headers: self.headers + } +} + +// Return a simpler response object to allow serialization +function responseToJSON () { + var self = this + return { + statusCode: self.statusCode, + body: self.body, + headers: self.headers, + request: requestToJSON.call(self.request) + } +} + +function Request (options) { + // if given the method property in options, set property explicitMethod to true + + // extend the Request instance with any non-reserved properties + // remove any reserved functions from the options object + // set Request instance to be readable and writable + // call init + + var self = this + + // start with HAR, then override with additional options + if (options.har) { + self._har = new Har(self) + options = self._har.options(options) + } + + stream.Stream.call(self) + var reserved = Object.keys(Request.prototype) + var nonReserved = filterForNonReserved(reserved, options) + + extend(self, nonReserved) + options = filterOutReservedFunctions(reserved, options) + + self.readable = true + self.writable = true + if (options.method) { + self.explicitMethod = true + } + self._qs = new Querystring(self) + self._auth = new Auth(self) + self._oauth = new OAuth(self) + self._multipart = new Multipart(self) + self._redirect = new Redirect(self) + self._tunnel = new Tunnel(self) + self.init(options) +} + +util.inherits(Request, stream.Stream) + +// Debugging +Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG) +function debug () { + if (Request.debug) { + console.error('REQUEST %s', util.format.apply(util, arguments)) + } +} +Request.prototype.debug = debug + +Request.prototype.init = function (options) { + // init() contains all the code to setup the request object. + // the actual outgoing request is not started until start() is called + // this function is called from both the constructor and on redirect. + var self = this + if (!options) { + options = {} + } + self.headers = self.headers ? copy(self.headers) : {} + + // Delete headers with value undefined since they break + // ClientRequest.OutgoingMessage.setHeader in node 0.12 + for (var headerName in self.headers) { + if (typeof self.headers[headerName] === 'undefined') { + delete self.headers[headerName] + } + } + + caseless.httpify(self, self.headers) + + if (!self.method) { + self.method = options.method || 'GET' + } + if (!self.localAddress) { + self.localAddress = options.localAddress + } + + self._qs.init(options) + + debug(options) + if (!self.pool && self.pool !== false) { + self.pool = globalPool + } + self.dests = self.dests || [] + self.__isRequestRequest = true + + // Protect against double callback + if (!self._callback && self.callback) { + self._callback = self.callback + self.callback = function () { + if (self._callbackCalled) { + return // Print a warning maybe? + } + self._callbackCalled = true + self._callback.apply(self, arguments) + } + self.on('error', self.callback.bind()) + self.on('complete', self.callback.bind(self, null)) + } + + // People use this property instead all the time, so support it + if (!self.uri && self.url) { + self.uri = self.url + delete self.url + } + + // If there's a baseUrl, then use it as the base URL (i.e. uri must be + // specified as a relative path and is appended to baseUrl). + if (self.baseUrl) { + if (typeof self.baseUrl !== 'string') { + return self.emit('error', new Error('options.baseUrl must be a string')) + } + + if (typeof self.uri !== 'string') { + return self.emit('error', new Error('options.uri must be a string when using options.baseUrl')) + } + + if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) { + return self.emit('error', new Error('options.uri must be a path when using options.baseUrl')) + } + + // Handle all cases to make sure that there's only one slash between + // baseUrl and uri. + var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1 + var uriStartsWithSlash = self.uri.indexOf('/') === 0 + + if (baseUrlEndsWithSlash && uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri.slice(1) + } else if (baseUrlEndsWithSlash || uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri + } else if (self.uri === '') { + self.uri = self.baseUrl + } else { + self.uri = self.baseUrl + '/' + self.uri + } + delete self.baseUrl + } + + // A URI is needed by this point, emit error if we haven't been able to get one + if (!self.uri) { + return self.emit('error', new Error('options.uri is a required argument')) + } + + // If a string URI/URL was given, parse it into a URL object + if (typeof self.uri === 'string') { + self.uri = url.parse(self.uri) + } + + // Some URL objects are not from a URL parsed string and need href added + if (!self.uri.href) { + self.uri.href = url.format(self.uri) + } + + // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme + if (self.uri.protocol === 'unix:') { + return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`')) + } + + // Support Unix Sockets + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + + if (self.strictSSL === false) { + self.rejectUnauthorized = false + } + + if (!self.uri.pathname) { self.uri.pathname = '/' } + + if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) { + // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar + // Detect and reject it as soon as possible + var faultyUri = url.format(self.uri) + var message = 'Invalid URI "' + faultyUri + '"' + if (Object.keys(options).length === 0) { + // No option ? This can be the sign of a redirect + // As this is a case where the user cannot do anything (they didn't call request directly with this URL) + // they should be warned that it can be caused by a redirection (can save some hair) + message += '. This can be caused by a crappy redirection.' + } + // This error was fatal + self.abort() + return self.emit('error', new Error(message)) + } + + if (!self.hasOwnProperty('proxy')) { + self.proxy = getProxyFromURI(self.uri) + } + + self.tunnel = self._tunnel.isEnabled() + if (self.proxy) { + self._tunnel.setup(options) + } + + self._redirect.onRequest(options) + + self.setHost = false + if (!self.hasHeader('host')) { + var hostHeaderName = self.originalHostHeaderName || 'host' + self.setHeader(hostHeaderName, self.uri.host) + // Drop :port suffix from Host header if known protocol. + if (self.uri.port) { + if ((self.uri.port === '80' && self.uri.protocol === 'http:') || + (self.uri.port === '443' && self.uri.protocol === 'https:')) { + self.setHeader(hostHeaderName, self.uri.hostname) + } + } + self.setHost = true + } + + self.jar(self._jar || options.jar) + + if (!self.uri.port) { + if (self.uri.protocol === 'http:') { self.uri.port = 80 } else if (self.uri.protocol === 'https:') { self.uri.port = 443 } + } + + if (self.proxy && !self.tunnel) { + self.port = self.proxy.port + self.host = self.proxy.hostname + } else { + self.port = self.uri.port + self.host = self.uri.hostname + } + + if (options.form) { + self.form(options.form) + } + + if (options.formData) { + var formData = options.formData + var requestForm = self.form() + var appendFormValue = function (key, value) { + if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) { + requestForm.append(key, value.value, value.options) + } else { + requestForm.append(key, value) + } + } + for (var formKey in formData) { + if (formData.hasOwnProperty(formKey)) { + var formValue = formData[formKey] + if (formValue instanceof Array) { + for (var j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]) + } + } else { + appendFormValue(formKey, formValue) + } + } + } + } + + if (options.qs) { + self.qs(options.qs) + } + + if (self.uri.path) { + self.path = self.uri.path + } else { + self.path = self.uri.pathname + (self.uri.search || '') + } + + if (self.path.length === 0) { + self.path = '/' + } + + // Auth must happen last in case signing is dependent on other headers + if (options.aws) { + self.aws(options.aws) + } + + if (options.hawk) { + self.hawk(options.hawk) + } + + if (options.httpSignature) { + self.httpSignature(options.httpSignature) + } + + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) { + options.auth.user = options.auth.username + } + if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) { + options.auth.pass = options.auth.password + } + + self.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately, + options.auth.bearer + ) + } + + if (self.gzip && !self.hasHeader('accept-encoding')) { + self.setHeader('accept-encoding', 'gzip, deflate') + } + + if (self.uri.auth && !self.hasHeader('authorization')) { + var uriAuthPieces = self.uri.auth.split(':').map(function (item) { return self._qs.unescape(item) }) + self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true) + } + + if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) { + var proxyAuthPieces = self.proxy.auth.split(':').map(function (item) { return self._qs.unescape(item) }) + var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':')) + self.setHeader('proxy-authorization', authHeader) + } + + if (self.proxy && !self.tunnel) { + self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + } + + if (options.json) { + self.json(options.json) + } + if (options.multipart) { + self.multipart(options.multipart) + } + + if (options.time) { + self.timing = true + + // NOTE: elapsedTime is deprecated in favor of .timings + self.elapsedTime = self.elapsedTime || 0 + } + + function setContentLength () { + if (isTypedArray(self.body)) { + self.body = Buffer.from(self.body) + } + + if (!self.hasHeader('content-length')) { + var length + if (typeof self.body === 'string') { + length = Buffer.byteLength(self.body) + } else if (Array.isArray(self.body)) { + length = self.body.reduce(function (a, b) { return a + b.length }, 0) + } else { + length = self.body.length + } + + if (length) { + self.setHeader('content-length', length) + } else { + self.emit('error', new Error('Argument error, options.body.')) + } + } + } + if (self.body && !isstream(self.body)) { + setContentLength() + } + + if (options.oauth) { + self.oauth(options.oauth) + } else if (self._oauth.params && self.hasHeader('authorization')) { + self.oauth(self._oauth.params) + } + + var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol + var defaultModules = {'http:': http, 'https:': https} + var httpModules = self.httpModules || {} + + self.httpModule = httpModules[protocol] || defaultModules[protocol] + + if (!self.httpModule) { + return self.emit('error', new Error('Invalid protocol: ' + protocol)) + } + + if (options.ca) { + self.ca = options.ca + } + + if (!self.agent) { + if (options.agentOptions) { + self.agentOptions = options.agentOptions + } + + if (options.agentClass) { + self.agentClass = options.agentClass + } else if (options.forever) { + var v = version() + // use ForeverAgent in node 0.10- only + if (v.major === 0 && v.minor <= 10) { + self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL + } else { + self.agentClass = self.httpModule.Agent + self.agentOptions = self.agentOptions || {} + self.agentOptions.keepAlive = true + } + } else { + self.agentClass = self.httpModule.Agent + } + } + + if (self.pool === false) { + self.agent = false + } else { + self.agent = self.agent || self.getNewAgent() + } + + self.on('pipe', function (src) { + if (self.ntick && self._started) { + self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.')) + } + self.src = src + if (isReadStream(src)) { + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', mime.lookup(src.path)) + } + } else { + if (src.headers) { + for (var i in src.headers) { + if (!self.hasHeader(i)) { + self.setHeader(i, src.headers[i]) + } + } + } + if (self._json && !self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + if (src.method && !self.explicitMethod) { + self.method = src.method + } + } + + // self.on('pipe', function () { + // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.') + // }) + }) + + defer(function () { + if (self._aborted) { + return + } + + var end = function () { + if (self._form) { + if (!self._auth.hasAuth) { + self._form.pipe(self) + } else if (self._auth.hasAuth && self._auth.sentAuth) { + self._form.pipe(self) + } + } + if (self._multipart && self._multipart.chunked) { + self._multipart.body.pipe(self) + } + if (self.body) { + if (isstream(self.body)) { + self.body.pipe(self) + } else { + setContentLength() + if (Array.isArray(self.body)) { + self.body.forEach(function (part) { + self.write(part) + }) + } else { + self.write(self.body) + } + self.end() + } + } else if (self.requestBodyStream) { + console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.') + self.requestBodyStream.pipe(self) + } else if (!self.src) { + if (self._auth.hasAuth && !self._auth.sentAuth) { + self.end() + return + } + if (self.method !== 'GET' && typeof self.method !== 'undefined') { + self.setHeader('content-length', 0) + } + self.end() + } + } + + if (self._form && !self.hasHeader('content-length')) { + // Before ending the request, we had to compute the length of the whole form, asyncly + self.setHeader(self._form.getHeaders(), true) + self._form.getLength(function (err, length) { + if (!err && !isNaN(length)) { + self.setHeader('content-length', length) + } + end() + }) + } else { + end() + } + + self.ntick = true + }) +} + +Request.prototype.getNewAgent = function () { + var self = this + var Agent = self.agentClass + var options = {} + if (self.agentOptions) { + for (var i in self.agentOptions) { + options[i] = self.agentOptions[i] + } + } + if (self.ca) { + options.ca = self.ca + } + if (self.ciphers) { + options.ciphers = self.ciphers + } + if (self.secureProtocol) { + options.secureProtocol = self.secureProtocol + } + if (self.secureOptions) { + options.secureOptions = self.secureOptions + } + if (typeof self.rejectUnauthorized !== 'undefined') { + options.rejectUnauthorized = self.rejectUnauthorized + } + + if (self.cert && self.key) { + options.key = self.key + options.cert = self.cert + } + + if (self.pfx) { + options.pfx = self.pfx + } + + if (self.passphrase) { + options.passphrase = self.passphrase + } + + var poolKey = '' + + // different types of agents are in different pools + if (Agent !== self.httpModule.Agent) { + poolKey += Agent.name + } + + // ca option is only relevant if proxy or destination are https + var proxy = self.proxy + if (typeof proxy === 'string') { + proxy = url.parse(proxy) + } + var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' + + if (isHttps) { + if (options.ca) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ca + } + + if (typeof options.rejectUnauthorized !== 'undefined') { + if (poolKey) { + poolKey += ':' + } + poolKey += options.rejectUnauthorized + } + + if (options.cert) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.cert.toString('ascii') + options.key.toString('ascii') + } + + if (options.pfx) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.pfx.toString('ascii') + } + + if (options.ciphers) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ciphers + } + + if (options.secureProtocol) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureProtocol + } + + if (options.secureOptions) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureOptions + } + } + + if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) { + // not doing anything special. Use the globalAgent + return self.httpModule.globalAgent + } + + // we're using a stored agent. Make sure it's protocol-specific + poolKey = self.uri.protocol + poolKey + + // generate a new agent for this setting if none yet exists + if (!self.pool[poolKey]) { + self.pool[poolKey] = new Agent(options) + // properly set maxSockets on new agents + if (self.pool.maxSockets) { + self.pool[poolKey].maxSockets = self.pool.maxSockets + } + } + + return self.pool[poolKey] +} + +Request.prototype.start = function () { + // start() is called once we are ready to send the outgoing HTTP request. + // this is usually called on the first write(), end() or on nextTick() + var self = this + + if (self.timing) { + // All timings will be relative to this request's startTime. In order to do this, + // we need to capture the wall-clock start time (via Date), immediately followed + // by the high-resolution timer (via now()). While these two won't be set + // at the _exact_ same time, they should be close enough to be able to calculate + // high-resolution, monotonically non-decreasing timestamps relative to startTime. + var startTime = new Date().getTime() + var startTimeNow = now() + } + + if (self._aborted) { + return + } + + self._started = true + self.method = self.method || 'GET' + self.href = self.uri.href + + if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { + self.setHeader('content-length', self.src.stat.size) + } + if (self._aws) { + self.aws(self._aws, true) + } + + // We have a method named auth, which is completely different from the http.request + // auth option. If we don't remove it, we're gonna have a bad time. + var reqOptions = copy(self) + delete reqOptions.auth + + debug('make request', self.uri.href) + + // node v6.8.0 now supports a `timeout` value in `http.request()`, but we + // should delete it for now since we handle timeouts manually for better + // consistency with node versions before v6.8.0 + delete reqOptions.timeout + + try { + self.req = self.httpModule.request(reqOptions) + } catch (err) { + self.emit('error', err) + return + } + + if (self.timing) { + self.startTime = startTime + self.startTimeNow = startTimeNow + + // Timing values will all be relative to startTime (by comparing to startTimeNow + // so we have an accurate clock) + self.timings = {} + } + + var timeout + if (self.timeout && !self.timeoutTimer) { + if (self.timeout < 0) { + timeout = 0 + } else if (typeof self.timeout === 'number' && isFinite(self.timeout)) { + timeout = self.timeout + } + } + + self.req.on('response', self.onRequestResponse.bind(self)) + self.req.on('error', self.onRequestError.bind(self)) + self.req.on('drain', function () { + self.emit('drain') + }) + + self.req.on('socket', function (socket) { + // `._connecting` was the old property which was made public in node v6.1.0 + var isConnecting = socket._connecting || socket.connecting + if (self.timing) { + self.timings.socket = now() - self.startTimeNow + + if (isConnecting) { + var onLookupTiming = function () { + self.timings.lookup = now() - self.startTimeNow + } + + var onConnectTiming = function () { + self.timings.connect = now() - self.startTimeNow + } + + socket.once('lookup', onLookupTiming) + socket.once('connect', onConnectTiming) + + // clean up timing event listeners if needed on error + self.req.once('error', function () { + socket.removeListener('lookup', onLookupTiming) + socket.removeListener('connect', onConnectTiming) + }) + } + } + + var setReqTimeout = function () { + // This timeout sets the amount of time to wait *between* bytes sent + // from the server once connected. + // + // In particular, it's useful for erroring if the server fails to send + // data halfway through streaming a response. + self.req.setTimeout(timeout, function () { + if (self.req) { + self.abort() + var e = new Error('ESOCKETTIMEDOUT') + e.code = 'ESOCKETTIMEDOUT' + e.connect = false + self.emit('error', e) + } + }) + } + if (timeout !== undefined) { + // Only start the connection timer if we're actually connecting a new + // socket, otherwise if we're already connected (because this is a + // keep-alive connection) do not bother. This is important since we won't + // get a 'connect' event for an already connected socket. + if (isConnecting) { + var onReqSockConnect = function () { + socket.removeListener('connect', onReqSockConnect) + self.clearTimeout() + setReqTimeout() + } + + socket.on('connect', onReqSockConnect) + + self.req.on('error', function (err) { // eslint-disable-line handle-callback-err + socket.removeListener('connect', onReqSockConnect) + }) + + // Set a timeout in memory - this block will throw if the server takes more + // than `timeout` to write the HTTP status and headers (corresponding to + // the on('response') event on the client). NB: this measures wall-clock + // time, not the time between bytes sent by the server. + self.timeoutTimer = setTimeout(function () { + socket.removeListener('connect', onReqSockConnect) + self.abort() + var e = new Error('ETIMEDOUT') + e.code = 'ETIMEDOUT' + e.connect = true + self.emit('error', e) + }, timeout) + } else { + // We're already connected + setReqTimeout() + } + } + self.emit('socket', socket) + }) + + self.emit('request', self.req) +} + +Request.prototype.onRequestError = function (error) { + var self = this + if (self._aborted) { + return + } + if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' && + self.agent.addRequestNoreuse) { + self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } + self.start() + self.req.end() + return + } + self.clearTimeout() + self.emit('error', error) +} + +Request.prototype.onRequestResponse = function (response) { + var self = this + + if (self.timing) { + self.timings.response = now() - self.startTimeNow + } + + debug('onRequestResponse', self.uri.href, response.statusCode, response.headers) + response.on('end', function () { + if (self.timing) { + self.timings.end = now() - self.startTimeNow + response.timingStart = self.startTime + + // fill in the blanks for any periods that didn't trigger, such as + // no lookup or connect due to keep alive + if (!self.timings.socket) { + self.timings.socket = 0 + } + if (!self.timings.lookup) { + self.timings.lookup = self.timings.socket + } + if (!self.timings.connect) { + self.timings.connect = self.timings.lookup + } + if (!self.timings.response) { + self.timings.response = self.timings.connect + } + + debug('elapsed time', self.timings.end) + + // elapsedTime includes all redirects + self.elapsedTime += Math.round(self.timings.end) + + // NOTE: elapsedTime is deprecated in favor of .timings + response.elapsedTime = self.elapsedTime + + // timings is just for the final fetch + response.timings = self.timings + + // pre-calculate phase timings as well + response.timingPhases = { + wait: self.timings.socket, + dns: self.timings.lookup - self.timings.socket, + tcp: self.timings.connect - self.timings.lookup, + firstByte: self.timings.response - self.timings.connect, + download: self.timings.end - self.timings.response, + total: self.timings.end + } + } + debug('response end', self.uri.href, response.statusCode, response.headers) + }) + + if (self._aborted) { + debug('aborted', self.uri.href) + response.resume() + return + } + + self.response = response + response.request = self + response.toJSON = responseToJSON + + // XXX This is different on 0.10, because SSL is strict by default + if (self.httpModule === https && + self.strictSSL && (!response.hasOwnProperty('socket') || + !response.socket.authorized)) { + debug('strict ssl error', self.uri.href) + var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL' + self.emit('error', new Error('SSL Error: ' + sslErr)) + return + } + + // Save the original host before any redirect (if it changes, we need to + // remove any authorization headers). Also remember the case of the header + // name because lots of broken servers expect Host instead of host and we + // want the caller to be able to specify this. + self.originalHost = self.getHeader('host') + if (!self.originalHostHeaderName) { + self.originalHostHeaderName = self.hasHeader('host') + } + if (self.setHost) { + self.removeHeader('host') + } + self.clearTimeout() + + var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar + var addCookie = function (cookie) { + // set the cookie if it's domain in the href's domain. + try { + targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}) + } catch (e) { + self.emit('error', e) + } + } + + response.caseless = caseless(response.headers) + + if (response.caseless.has('set-cookie') && (!self._disableCookies)) { + var headerName = response.caseless.has('set-cookie') + if (Array.isArray(response.headers[headerName])) { + response.headers[headerName].forEach(addCookie) + } else { + addCookie(response.headers[headerName]) + } + } + + if (self._redirect.onResponse(response)) { + return // Ignore the rest of the response + } else { + // Be a good stream and emit end when the response is finished. + // Hack to emit end on close because of a core bug that never fires end + response.on('close', function () { + if (!self._ended) { + self.response.emit('end') + } + }) + + response.once('end', function () { + self._ended = true + }) + + var noBody = function (code) { + return ( + self.method === 'HEAD' || + // Informational + (code >= 100 && code < 200) || + // No Content + code === 204 || + // Not Modified + code === 304 + ) + } + + var responseContent + if (self.gzip && !noBody(response.statusCode)) { + var contentEncoding = response.headers['content-encoding'] || 'identity' + contentEncoding = contentEncoding.trim().toLowerCase() + + // Be more lenient with decoding compressed responses, since (very rarely) + // servers send slightly invalid gzip responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + var zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + } + + if (contentEncoding === 'gzip') { + responseContent = zlib.createGunzip(zlibOptions) + response.pipe(responseContent) + } else if (contentEncoding === 'deflate') { + responseContent = zlib.createInflate(zlibOptions) + response.pipe(responseContent) + } else { + // Since previous versions didn't check for Content-Encoding header, + // ignore any invalid values to preserve backwards-compatibility + if (contentEncoding !== 'identity') { + debug('ignoring unrecognized Content-Encoding ' + contentEncoding) + } + responseContent = response + } + } else { + responseContent = response + } + + if (self.encoding) { + if (self.dests.length !== 0) { + console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.') + } else { + responseContent.setEncoding(self.encoding) + } + } + + if (self._paused) { + responseContent.pause() + } + + self.responseContent = responseContent + + self.emit('response', response) + + self.dests.forEach(function (dest) { + self.pipeDest(dest) + }) + + responseContent.on('data', function (chunk) { + if (self.timing && !self.responseStarted) { + self.responseStartTime = (new Date()).getTime() + + // NOTE: responseStartTime is deprecated in favor of .timings + response.responseStartTime = self.responseStartTime + } + self._destdata = true + self.emit('data', chunk) + }) + responseContent.once('end', function (chunk) { + self.emit('end', chunk) + }) + responseContent.on('error', function (error) { + self.emit('error', error) + }) + responseContent.on('close', function () { self.emit('close') }) + + if (self.callback) { + self.readResponseBody(response) + } else { // if no callback + self.on('end', function () { + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + self.emit('complete', response) + }) + } + } + debug('finish init function', self.uri.href) +} + +Request.prototype.readResponseBody = function (response) { + var self = this + debug("reading response's body") + var buffers = [] + var bufferLength = 0 + var strings = [] + + self.on('data', function (chunk) { + if (!Buffer.isBuffer(chunk)) { + strings.push(chunk) + } else if (chunk.length) { + bufferLength += chunk.length + buffers.push(chunk) + } + }) + self.on('end', function () { + debug('end event', self.uri.href) + if (self._aborted) { + debug('aborted', self.uri.href) + // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request. + // This can lead to leaky behavior if the user retains a reference to the request object. + buffers = [] + bufferLength = 0 + return + } + + if (bufferLength) { + debug('has body', self.uri.href, bufferLength) + response.body = Buffer.concat(buffers, bufferLength) + if (self.encoding !== null) { + response.body = response.body.toString(self.encoding) + } + // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request. + // This can lead to leaky behavior if the user retains a reference to the request object. + buffers = [] + bufferLength = 0 + } else if (strings.length) { + // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. + // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). + if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') { + strings[0] = strings[0].substring(1) + } + response.body = strings.join('') + } + + if (self._json) { + try { + response.body = JSON.parse(response.body, self._jsonReviver) + } catch (e) { + debug('invalid JSON received', self.uri.href) + } + } + debug('emitting complete', self.uri.href) + if (typeof response.body === 'undefined' && !self._json) { + response.body = self.encoding === null ? Buffer.alloc(0) : '' + } + self.emit('complete', response, response.body) + }) +} + +Request.prototype.abort = function () { + var self = this + self._aborted = true + + if (self.req) { + self.req.abort() + } else if (self.response) { + self.response.destroy() + } + + self.clearTimeout() + self.emit('abort') +} + +Request.prototype.pipeDest = function (dest) { + var self = this + var response = self.response + // Called after the response is received + if (dest.headers && !dest.headersSent) { + if (response.caseless.has('content-type')) { + var ctname = response.caseless.has('content-type') + if (dest.setHeader) { + dest.setHeader(ctname, response.headers[ctname]) + } else { + dest.headers[ctname] = response.headers[ctname] + } + } + + if (response.caseless.has('content-length')) { + var clname = response.caseless.has('content-length') + if (dest.setHeader) { + dest.setHeader(clname, response.headers[clname]) + } else { + dest.headers[clname] = response.headers[clname] + } + } + } + if (dest.setHeader && !dest.headersSent) { + for (var i in response.headers) { + // If the response content is being decoded, the Content-Encoding header + // of the response doesn't represent the piped content, so don't pass it. + if (!self.gzip || i !== 'content-encoding') { + dest.setHeader(i, response.headers[i]) + } + } + dest.statusCode = response.statusCode + } + if (self.pipefilter) { + self.pipefilter(response, dest) + } +} + +Request.prototype.qs = function (q, clobber) { + var self = this + var base + if (!clobber && self.uri.query) { + base = self._qs.parse(self.uri.query) + } else { + base = {} + } + + for (var i in q) { + base[i] = q[i] + } + + var qs = self._qs.stringify(base) + + if (qs === '') { + return self + } + + self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs) + self.url = self.uri + self.path = self.uri.path + + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + + return self +} +Request.prototype.form = function (form) { + var self = this + if (form) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.setHeader('content-type', 'application/x-www-form-urlencoded') + } + self.body = (typeof form === 'string') + ? self._qs.rfc3986(form.toString('utf8')) + : self._qs.stringify(form).toString('utf8') + return self + } + // create form-data object + self._form = new FormData() + self._form.on('error', function (err) { + err.message = 'form-data: ' + err.message + self.emit('error', err) + self.abort() + }) + return self._form +} +Request.prototype.multipart = function (multipart) { + var self = this + + self._multipart.onRequest(multipart) + + if (!self._multipart.chunked) { + self.body = self._multipart.body + } + + return self +} +Request.prototype.json = function (val) { + var self = this + + if (!self.hasHeader('accept')) { + self.setHeader('accept', 'application/json') + } + + if (typeof self.jsonReplacer === 'function') { + self._jsonReplacer = self.jsonReplacer + } + + self._json = true + if (typeof val === 'boolean') { + if (self.body !== undefined) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.body = safeStringify(self.body, self._jsonReplacer) + } else { + self.body = self._qs.rfc3986(self.body) + } + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } + } else { + self.body = safeStringify(val, self._jsonReplacer) + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } + + if (typeof self.jsonReviver === 'function') { + self._jsonReviver = self.jsonReviver + } + + return self +} +Request.prototype.getHeader = function (name, headers) { + var self = this + var result, re, match + if (!headers) { + headers = self.headers + } + Object.keys(headers).forEach(function (key) { + if (key.length !== name.length) { + return + } + re = new RegExp(name, 'i') + match = key.match(re) + if (match) { + result = headers[key] + } + }) + return result +} +Request.prototype.enableUnixSocket = function () { + // Get the socket & request paths from the URL + var unixParts = this.uri.path.split(':') + var host = unixParts[0] + var path = unixParts[1] + // Apply unix properties to request + this.socketPath = host + this.uri.pathname = path + this.uri.path = path + this.uri.host = host + this.uri.hostname = host + this.uri.isUnix = true +} + +Request.prototype.auth = function (user, pass, sendImmediately, bearer) { + var self = this + + self._auth.onRequest(user, pass, sendImmediately, bearer) + + return self +} +Request.prototype.aws = function (opts, now) { + var self = this + + if (!now) { + self._aws = opts + return self + } + + if (opts.sign_version === 4 || opts.sign_version === '4') { + // use aws4 + var options = { + host: self.uri.host, + path: self.uri.path, + method: self.method, + headers: self.headers, + body: self.body + } + if (opts.service) { + options.service = opts.service + } + var signRes = aws4.sign(options, { + accessKeyId: opts.key, + secretAccessKey: opts.secret, + sessionToken: opts.session + }) + self.setHeader('authorization', signRes.headers.Authorization) + self.setHeader('x-amz-date', signRes.headers['X-Amz-Date']) + if (signRes.headers['X-Amz-Security-Token']) { + self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token']) + } + } else { + // default: use aws-sign2 + var date = new Date() + self.setHeader('date', date.toUTCString()) + var auth = { + key: opts.key, + secret: opts.secret, + verb: self.method.toUpperCase(), + date: date, + contentType: self.getHeader('content-type') || '', + md5: self.getHeader('content-md5') || '', + amazonHeaders: aws2.canonicalizeHeaders(self.headers) + } + var path = self.uri.path + if (opts.bucket && path) { + auth.resource = '/' + opts.bucket + path + } else if (opts.bucket && !path) { + auth.resource = '/' + opts.bucket + } else if (!opts.bucket && path) { + auth.resource = path + } else if (!opts.bucket && !path) { + auth.resource = '/' + } + auth.resource = aws2.canonicalizeResource(auth.resource) + self.setHeader('authorization', aws2.authorization(auth)) + } + + return self +} +Request.prototype.httpSignature = function (opts) { + var self = this + httpSignature.signRequest({ + getHeader: function (header) { + return self.getHeader(header, self.headers) + }, + setHeader: function (header, value) { + self.setHeader(header, value) + }, + method: self.method, + path: self.path + }, opts) + debug('httpSignature authorization', self.getHeader('authorization')) + + return self +} +Request.prototype.hawk = function (opts) { + var self = this + self.setHeader('Authorization', hawk.header(self.uri, self.method, opts)) +} +Request.prototype.oauth = function (_oauth) { + var self = this + + self._oauth.onRequest(_oauth) + + return self +} + +Request.prototype.jar = function (jar) { + var self = this + var cookies + + if (self._redirect.redirectsFollowed === 0) { + self.originalCookieHeader = self.getHeader('cookie') + } + + if (!jar) { + // disable cookies + cookies = false + self._disableCookies = true + } else { + var targetCookieJar = jar.getCookieString ? jar : globalCookieJar + var urihref = self.uri.href + // fetch cookie in the Specified host + if (targetCookieJar) { + cookies = targetCookieJar.getCookieString(urihref) + } + } + + // if need cookie and cookie is not empty + if (cookies && cookies.length) { + if (self.originalCookieHeader) { + // Don't overwrite existing Cookie header + self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies) + } else { + self.setHeader('cookie', cookies) + } + } + self._jar = jar + return self +} + +// Stream API +Request.prototype.pipe = function (dest, opts) { + var self = this + + if (self.response) { + if (self._destdata) { + self.emit('error', new Error('You cannot pipe after data has been emitted from the response.')) + } else if (self._ended) { + self.emit('error', new Error('You cannot pipe after the response has been ended.')) + } else { + stream.Stream.prototype.pipe.call(self, dest, opts) + self.pipeDest(dest) + return dest + } + } else { + self.dests.push(dest) + stream.Stream.prototype.pipe.call(self, dest, opts) + return dest + } +} +Request.prototype.write = function () { + var self = this + if (self._aborted) { return } + + if (!self._started) { + self.start() + } + if (self.req) { + return self.req.write.apply(self.req, arguments) + } +} +Request.prototype.end = function (chunk) { + var self = this + if (self._aborted) { return } + + if (chunk) { + self.write(chunk) + } + if (!self._started) { + self.start() + } + if (self.req) { + self.req.end() + } +} +Request.prototype.pause = function () { + var self = this + if (!self.responseContent) { + self._paused = true + } else { + self.responseContent.pause.apply(self.responseContent, arguments) + } +} +Request.prototype.resume = function () { + var self = this + if (!self.responseContent) { + self._paused = false + } else { + self.responseContent.resume.apply(self.responseContent, arguments) + } +} +Request.prototype.destroy = function () { + var self = this + this.clearTimeout() + if (!self._ended) { + self.end() + } else if (self.response) { + self.response.destroy() + } +} + +Request.prototype.clearTimeout = function () { + if (this.timeoutTimer) { + clearTimeout(this.timeoutTimer) + this.timeoutTimer = null + } +} + +Request.defaultProxyHeaderWhiteList = + Tunnel.defaultProxyHeaderWhiteList.slice() + +Request.defaultProxyHeaderExclusiveList = + Tunnel.defaultProxyHeaderExclusiveList.slice() + +// Exports + +Request.prototype.toJSON = requestToJSON +module.exports = Request + + +/***/ }), + +/***/ 3557: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const tls = __nccwpck_require__(24404); + +module.exports = (options = {}, connect = tls.connect) => new Promise((resolve, reject) => { + let timeout = false; + + let socket; + + const callback = async () => { + await socketPromise; + + socket.off('timeout', onTimeout); + socket.off('error', reject); + + if (options.resolveSocket) { + resolve({alpnProtocol: socket.alpnProtocol, socket, timeout}); + + if (timeout) { + await Promise.resolve(); + socket.emit('timeout'); + } + } else { + socket.destroy(); + resolve({alpnProtocol: socket.alpnProtocol, timeout}); + } + }; + + const onTimeout = async () => { + timeout = true; + callback(); + }; + + const socketPromise = (async () => { + try { + socket = await connect(options, callback); + + socket.on('error', reject); + socket.once('timeout', onTimeout); + } catch (error) { + reject(error); + } + })(); +}); + + +/***/ }), + +/***/ 45973: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const Readable = (__nccwpck_require__(12781).Readable); +const lowercaseKeys = __nccwpck_require__(29955); + +class Response extends Readable { + constructor(statusCode, headers, body, url) { + if (typeof statusCode !== 'number') { + throw new TypeError('Argument `statusCode` should be a number'); + } + if (typeof headers !== 'object') { + throw new TypeError('Argument `headers` should be an object'); + } + if (!(body instanceof Buffer)) { + throw new TypeError('Argument `body` should be a buffer'); + } + if (typeof url !== 'string') { + throw new TypeError('Argument `url` should be a string'); + } + + super(); + this.statusCode = statusCode; + this.headers = lowercaseKeys(headers); + this.body = body; + this.url = url; + } + + _read() { + this.push(this.body); + this.push(null); + } +} + +module.exports = Response; + + +/***/ }), + +/***/ 43674: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +/* eslint-disable @typescript-eslint/strict-boolean-expressions */ +function parse(string, encoding, opts) { + var _opts$out; + + if (opts === void 0) { + opts = {}; + } + + // Build the character lookup table: + if (!encoding.codes) { + encoding.codes = {}; + + for (var i = 0; i < encoding.chars.length; ++i) { + encoding.codes[encoding.chars[i]] = i; + } + } // The string must have a whole number of bytes: + + + if (!opts.loose && string.length * encoding.bits & 7) { + throw new SyntaxError('Invalid padding'); + } // Count the padding bytes: + + + var end = string.length; + + while (string[end - 1] === '=') { + --end; // If we get a whole number of bytes, there is too much padding: + + if (!opts.loose && !((string.length - end) * encoding.bits & 7)) { + throw new SyntaxError('Invalid padding'); + } + } // Allocate the output: + + + var out = new ((_opts$out = opts.out) != null ? _opts$out : Uint8Array)(end * encoding.bits / 8 | 0); // Parse the data: + + var bits = 0; // Number of bits currently in the buffer + + var buffer = 0; // Bits waiting to be written out, MSB first + + var written = 0; // Next byte to write + + for (var _i = 0; _i < end; ++_i) { + // Read one character from the string: + var value = encoding.codes[string[_i]]; + + if (value === undefined) { + throw new SyntaxError('Invalid character ' + string[_i]); + } // Append the bits to the buffer: + + + buffer = buffer << encoding.bits | value; + bits += encoding.bits; // Write out some bits if the buffer has a byte's worth: + + if (bits >= 8) { + bits -= 8; + out[written++] = 0xff & buffer >> bits; + } + } // Verify that we have received just enough bits: + + + if (bits >= encoding.bits || 0xff & buffer << 8 - bits) { + throw new SyntaxError('Unexpected end of data'); + } + + return out; +} +function stringify(data, encoding, opts) { + if (opts === void 0) { + opts = {}; + } + + var _opts = opts, + _opts$pad = _opts.pad, + pad = _opts$pad === void 0 ? true : _opts$pad; + var mask = (1 << encoding.bits) - 1; + var out = ''; + var bits = 0; // Number of bits currently in the buffer + + var buffer = 0; // Bits waiting to be written out, MSB first + + for (var i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = buffer << 8 | 0xff & data[i]; + bits += 8; // Write out as much as we can: + + while (bits > encoding.bits) { + bits -= encoding.bits; + out += encoding.chars[mask & buffer >> bits]; + } + } // Partial character: + + + if (bits) { + out += encoding.chars[mask & buffer << encoding.bits - bits]; + } // Add padding characters until we hit a byte boundary: + + + if (pad) { + while (out.length * encoding.bits & 7) { + out += '='; + } + } + + return out; +} + +/* eslint-disable @typescript-eslint/strict-boolean-expressions */ +var base16Encoding = { + chars: '0123456789ABCDEF', + bits: 4 +}; +var base32Encoding = { + chars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bits: 5 +}; +var base32HexEncoding = { + chars: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bits: 5 +}; +var base64Encoding = { + chars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bits: 6 +}; +var base64UrlEncoding = { + chars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bits: 6 +}; +var base16 = { + parse: function parse$1(string, opts) { + return parse(string.toUpperCase(), base16Encoding, opts); + }, + stringify: function stringify$1(data, opts) { + return stringify(data, base16Encoding, opts); + } +}; +var base32 = { + parse: function parse$1(string, opts) { + if (opts === void 0) { + opts = {}; + } + + return parse(opts.loose ? string.toUpperCase().replace(/0/g, 'O').replace(/1/g, 'L').replace(/8/g, 'B') : string, base32Encoding, opts); + }, + stringify: function stringify$1(data, opts) { + return stringify(data, base32Encoding, opts); + } +}; +var base32hex = { + parse: function parse$1(string, opts) { + return parse(string, base32HexEncoding, opts); + }, + stringify: function stringify$1(data, opts) { + return stringify(data, base32HexEncoding, opts); + } +}; +var base64 = { + parse: function parse$1(string, opts) { + return parse(string, base64Encoding, opts); + }, + stringify: function stringify$1(data, opts) { + return stringify(data, base64Encoding, opts); + } +}; +var base64url = { + parse: function parse$1(string, opts) { + return parse(string, base64UrlEncoding, opts); + }, + stringify: function stringify$1(data, opts) { + return stringify(data, base64UrlEncoding, opts); + } +}; +var codec = { + parse: parse, + stringify: stringify +}; + +exports.base16 = base16; +exports.base32 = base32; +exports.base32hex = base32hex; +exports.base64 = base64; +exports.base64url = base64url; +exports.codec = codec; + + +/***/ }), + +/***/ 14672: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const assert = __nccwpck_require__(39491) +const path = __nccwpck_require__(71017) +const fs = __nccwpck_require__(57147) +let glob = undefined +try { + glob = __nccwpck_require__(65811) +} catch (_err) { + // treat glob as optional. +} + +const defaultGlobOpts = { + nosort: true, + silent: true +} + +// for EMFILE handling +let timeout = 0 + +const isWindows = (process.platform === "win32") + +const defaults = options => { + const methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(m => { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 + options.emfileWait = options.emfileWait || 1000 + if (options.glob === false) { + options.disableGlob = true + } + if (options.disableGlob !== true && glob === undefined) { + throw Error('glob dependency not found, set `options.disableGlob = true` if intentional') + } + options.disableGlob = options.disableGlob || false + options.glob = options.glob || defaultGlobOpts +} + +const rimraf = (p, options, cb) => { + if (typeof options === 'function') { + cb = options + options = {} + } + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert.equal(typeof cb, 'function', 'rimraf: callback function required') + assert(options, 'rimraf: invalid options argument provided') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + defaults(options) + + let busyTries = 0 + let errState = null + let n = 0 + + const next = (er) => { + errState = errState || er + if (--n === 0) + cb(errState) + } + + const afterGlob = (er, results) => { + if (er) + return cb(er) + + n = results.length + if (n === 0) + return cb() + + results.forEach(p => { + const CB = (er) => { + if (er) { + if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && + busyTries < options.maxBusyTries) { + busyTries ++ + // try again, with the same exact callback as this one. + return setTimeout(() => rimraf_(p, options, CB), busyTries * 100) + } + + // this one won't happen if graceful-fs is used. + if (er.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(() => rimraf_(p, options, CB), timeout ++) + } + + // already gone + if (er.code === "ENOENT") er = null + } + + timeout = 0 + next(er) + } + rimraf_(p, options, CB) + }) + } + + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]) + + options.lstat(p, (er, stat) => { + if (!er) + return afterGlob(null, [p]) + + glob(p, options.glob, afterGlob) + }) + +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +const rimraf_ = (p, options, cb) => { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // sunos lets the root user unlink directories, which is... weird. + // so we have to lstat here and make sure it's not a dir. + options.lstat(p, (er, st) => { + if (er && er.code === "ENOENT") + return cb(null) + + // Windows can EPERM on stat. Life is suffering. + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb) + + if (st && st.isDirectory()) + return rmdir(p, options, er, cb) + + options.unlink(p, er => { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + if (er.code === "EISDIR") + return rmdir(p, options, er, cb) + } + return cb(er) + }) + }) +} + +const fixWinEPERM = (p, options, er, cb) => { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.chmod(p, 0o666, er2 => { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + options.stat(p, (er3, stats) => { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, options, er, cb) + else + options.unlink(p, cb) + }) + }) +} + +const fixWinEPERMSync = (p, options, er) => { + assert(p) + assert(options) + + try { + options.chmodSync(p, 0o666) + } catch (er2) { + if (er2.code === "ENOENT") + return + else + throw er + } + + let stats + try { + stats = options.statSync(p) + } catch (er3) { + if (er3.code === "ENOENT") + return + else + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, options, er) + else + options.unlinkSync(p) +} + +const rmdir = (p, options, originalEr, cb) => { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, er => { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +const rmkids = (p, options, cb) => { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, (er, files) => { + if (er) + return cb(er) + let n = files.length + if (n === 0) + return options.rmdir(p, cb) + let errState + files.forEach(f => { + rimraf(path.join(p, f), options, er => { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + options.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +const rimrafSync = (p, options) => { + options = options || {} + defaults(options) + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + let results + + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p] + } else { + try { + options.lstatSync(p) + results = [p] + } catch (er) { + results = glob.sync(p, options.glob) + } + } + + if (!results.length) + return + + for (let i = 0; i < results.length; i++) { + const p = results[i] + + let st + try { + st = options.lstatSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + + // Windows can EPERM on stat. Life is suffering. + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p, options, er) + } + + try { + // sunos lets the root user unlink directories, which is... weird. + if (st && st.isDirectory()) + rmdirSync(p, options, null) + else + options.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + if (er.code !== "EISDIR") + throw er + + rmdirSync(p, options, er) + } + } +} + +const rmdirSync = (p, options, originalEr) => { + assert(p) + assert(options) + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options) + } +} + +const rmkidsSync = (p, options) => { + assert(p) + assert(options) + options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) + + // We only end up here once we got ENOTEMPTY at least once, and + // at this point, we are guaranteed to have removed all the kids. + // So, we know that it won't be ENOENT or ENOTDIR or anything else. + // try really hard to delete stuff on windows, because it has a + // PROFOUNDLY annoying habit of not closing handles promptly when + // files are deleted, resulting in spurious ENOTEMPTY errors. + const retries = isWindows ? 100 : 1 + let i = 0 + do { + let threw = true + try { + const ret = options.rmdirSync(p, options) + threw = false + return ret + } finally { + if (++i < retries && threw) + continue + } + } while (true) +} + +module.exports = rimraf +rimraf.sync = rimrafSync + + +/***/ }), + +/***/ 63215: +/***/ ((module, exports, __nccwpck_require__) => { + +/* eslint-disable node/no-deprecated-api */ +var buffer = __nccwpck_require__(14300) +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} + + +/***/ }), + +/***/ 77556: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +/* eslint-disable node/no-deprecated-api */ + + + +var buffer = __nccwpck_require__(14300) +var Buffer = buffer.Buffer + +var safer = {} + +var key + +for (key in buffer) { + if (!buffer.hasOwnProperty(key)) continue + if (key === 'SlowBuffer' || key === 'Buffer') continue + safer[key] = buffer[key] +} + +var Safer = safer.Buffer = {} +for (key in Buffer) { + if (!Buffer.hasOwnProperty(key)) continue + if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue + Safer[key] = Buffer[key] +} + +safer.Buffer.prototype = Buffer.prototype + +if (!Safer.from || Safer.from === Uint8Array.from) { + Safer.from = function (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) + } + if (value && typeof value.length === 'undefined') { + throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) + } + return Buffer(value, encodingOrOffset, length) + } +} + +if (!Safer.alloc) { + Safer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } + var buf = Buffer(size) + if (!fill || fill.length === 0) { + buf.fill(0) + } else if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + return buf + } +} + +if (!safer.kStringMaxLength) { + try { + safer.kStringMaxLength = process.binding('buffer').kStringMaxLength + } catch (e) { + // we can't determine kStringMaxLength in environments where process.binding + // is unsupported, so let's not set it + } +} + +if (!safer.constants) { + safer.constants = { + MAX_LENGTH: safer.kMaxLength + } + if (safer.kStringMaxLength) { + safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength + } +} + +module.exports = safer + + +/***/ }), + +/***/ 66033: +/***/ ((module) => { + +module.exports = [ + 'cat', + 'cd', + 'chmod', + 'cp', + 'dirs', + 'echo', + 'exec', + 'find', + 'grep', + 'head', + 'ln', + 'ls', + 'mkdir', + 'mv', + 'pwd', + 'rm', + 'sed', + 'set', + 'sort', + 'tail', + 'tempdir', + 'test', + 'to', + 'toEnd', + 'touch', + 'uniq', + 'which', +]; + + +/***/ }), + +/***/ 18675: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +// +// ShellJS +// Unix shell commands on top of Node's API +// +// Copyright (c) 2012 Artur Adib +// http://github.com/shelljs/shelljs +// + +function __ncc_wildcard$0 (arg) { + if (arg === "cat.js" || arg === "cat") return __nccwpck_require__(89675); + else if (arg === "cd.js" || arg === "cd") return __nccwpck_require__(50994); + else if (arg === "chmod.js" || arg === "chmod") return __nccwpck_require__(45983); + else if (arg === "common.js" || arg === "common") return __nccwpck_require__(5328); + else if (arg === "cp.js" || arg === "cp") return __nccwpck_require__(26371); + else if (arg === "dirs.js" || arg === "dirs") return __nccwpck_require__(5183); + else if (arg === "echo.js" || arg === "echo") return __nccwpck_require__(95085); + else if (arg === "error.js" || arg === "error") return __nccwpck_require__(54893); + else if (arg === "exec-child.js" || arg === "exec-child") return __nccwpck_require__(96054); + else if (arg === "exec.js" || arg === "exec") return __nccwpck_require__(78094); + else if (arg === "find.js" || arg === "find") return __nccwpck_require__(52485); + else if (arg === "grep.js" || arg === "grep") return __nccwpck_require__(2354); + else if (arg === "head.js" || arg === "head") return __nccwpck_require__(67770); + else if (arg === "ln.js" || arg === "ln") return __nccwpck_require__(22759); + else if (arg === "ls.js" || arg === "ls") return __nccwpck_require__(86808); + else if (arg === "mkdir.js" || arg === "mkdir") return __nccwpck_require__(7697); + else if (arg === "mv.js" || arg === "mv") return __nccwpck_require__(71061); + else if (arg === "popd.js" || arg === "popd") return __nccwpck_require__(1065); + else if (arg === "pushd.js" || arg === "pushd") return __nccwpck_require__(15846); + else if (arg === "pwd.js" || arg === "pwd") return __nccwpck_require__(77639); + else if (arg === "rm.js" || arg === "rm") return __nccwpck_require__(76138); + else if (arg === "sed.js" || arg === "sed") return __nccwpck_require__(59090); + else if (arg === "set.js" || arg === "set") return __nccwpck_require__(31468); + else if (arg === "sort.js" || arg === "sort") return __nccwpck_require__(3786); + else if (arg === "tail.js" || arg === "tail") return __nccwpck_require__(59071); + else if (arg === "tempdir.js" || arg === "tempdir") return __nccwpck_require__(16154); + else if (arg === "test.js" || arg === "test") return __nccwpck_require__(43349); + else if (arg === "to.js" || arg === "to") return __nccwpck_require__(65722); + else if (arg === "toEnd.js" || arg === "toEnd") return __nccwpck_require__(97366); + else if (arg === "touch.js" || arg === "touch") return __nccwpck_require__(23205); + else if (arg === "uniq.js" || arg === "uniq") return __nccwpck_require__(76997); + else if (arg === "which.js" || arg === "which") return __nccwpck_require__(61767); +} +var common = __nccwpck_require__(5328); + +//@ +//@ All commands run synchronously, unless otherwise stated. +//@ All commands accept standard bash globbing characters (`*`, `?`, etc.), +//@ compatible with the [node `glob` module](https://github.com/isaacs/node-glob). +//@ +//@ For less-commonly used commands and features, please check out our [wiki +//@ page](https://github.com/shelljs/shelljs/wiki). +//@ + +// Include the docs for all the default commands +//@commands + +// Load all default commands +(__nccwpck_require__(66033).forEach)(function (command) { + __ncc_wildcard$0(command); +}); + +//@ +//@ ### exit(code) +//@ +//@ Exits the current process with the given exit `code`. +exports.exit = process.exit; + +//@include ./src/error +exports.error = __nccwpck_require__(54893); + +//@include ./src/common +exports.ShellString = common.ShellString; + +//@ +//@ ### env['VAR_NAME'] +//@ +//@ Object containing environment variables (both getter and setter). Shortcut +//@ to `process.env`. +exports.env = process.env; + +//@ +//@ ### Pipes +//@ +//@ Examples: +//@ +//@ ```javascript +//@ grep('foo', 'file1.txt', 'file2.txt').sed(/o/g, 'a').to('output.txt'); +//@ echo('files with o\'s in the name:\n' + ls().grep('o')); +//@ cat('test.js').exec('node'); // pipe to exec() call +//@ ``` +//@ +//@ Commands can send their output to another command in a pipe-like fashion. +//@ `sed`, `grep`, `cat`, `exec`, `to`, and `toEnd` can appear on the right-hand +//@ side of a pipe. Pipes can be chained. + +//@ +//@ ## Configuration +//@ + +exports.config = common.config; + +//@ +//@ ### config.silent +//@ +//@ Example: +//@ +//@ ```javascript +//@ var sh = require('shelljs'); +//@ var silentState = sh.config.silent; // save old silent state +//@ sh.config.silent = true; +//@ /* ... */ +//@ sh.config.silent = silentState; // restore old silent state +//@ ``` +//@ +//@ Suppresses all command output if `true`, except for `echo()` calls. +//@ Default is `false`. + +//@ +//@ ### config.fatal +//@ +//@ Example: +//@ +//@ ```javascript +//@ require('shelljs/global'); +//@ config.fatal = true; // or set('-e'); +//@ cp('this_file_does_not_exist', '/dev/null'); // throws Error here +//@ /* more commands... */ +//@ ``` +//@ +//@ If `true`, the script will throw a Javascript error when any shell.js +//@ command encounters an error. Default is `false`. This is analogous to +//@ Bash's `set -e`. + +//@ +//@ ### config.verbose +//@ +//@ Example: +//@ +//@ ```javascript +//@ config.verbose = true; // or set('-v'); +//@ cd('dir/'); +//@ rm('-rf', 'foo.txt', 'bar.txt'); +//@ exec('echo hello'); +//@ ``` +//@ +//@ Will print each command as follows: +//@ +//@ ``` +//@ cd dir/ +//@ rm -rf foo.txt bar.txt +//@ exec echo hello +//@ ``` + +//@ +//@ ### config.globOptions +//@ +//@ Example: +//@ +//@ ```javascript +//@ config.globOptions = {nodir: true}; +//@ ``` +//@ +//@ Use this value for calls to `glob.sync()` instead of the default options. + +//@ +//@ ### config.reset() +//@ +//@ Example: +//@ +//@ ```javascript +//@ var shell = require('shelljs'); +//@ // Make changes to shell.config, and do stuff... +//@ /* ... */ +//@ shell.config.reset(); // reset to original state +//@ // Do more stuff, but with original settings +//@ /* ... */ +//@ ``` +//@ +//@ Reset `shell.config` to the defaults: +//@ +//@ ```javascript +//@ { +//@ fatal: false, +//@ globOptions: {}, +//@ maxdepth: 255, +//@ noglob: false, +//@ silent: false, +//@ verbose: false, +//@ } +//@ ``` + + +/***/ }), + +/***/ 89675: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +common.register('cat', _cat, { + canReceivePipe: true, + cmdOptions: { + 'n': 'number', + }, +}); + +//@ +//@ ### cat([options,] file [, file ...]) +//@ ### cat([options,] file_array) +//@ +//@ Available options: +//@ +//@ + `-n`: number all output lines +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = cat('file*.txt'); +//@ var str = cat('file1', 'file2'); +//@ var str = cat(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Returns a string containing the given file, or a concatenated string +//@ containing the files if more than one file is given (a new line character is +//@ introduced between each file). +function _cat(options, files) { + var cat = common.readFromPipe(); + + if (!files && !cat) common.error('no paths given'); + + files = [].slice.call(arguments, 1); + + files.forEach(function (file) { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file); + } else if (common.statFollowLinks(file).isDirectory()) { + common.error(file + ': Is a directory'); + } + + cat += fs.readFileSync(file, 'utf8'); + }); + + if (options.number) { + cat = addNumbers(cat); + } + + return cat; +} +module.exports = _cat; + +function addNumbers(cat) { + var lines = cat.split('\n'); + var lastLine = lines.pop(); + + lines = lines.map(function (line, i) { + return numberedLine(i + 1, line); + }); + + if (lastLine.length) { + lastLine = numberedLine(lines.length + 1, lastLine); + } + lines.push(lastLine); + + return lines.join('\n'); +} + +function numberedLine(n, line) { + // GNU cat use six pad start number + tab. See http://lingrok.org/xref/coreutils/src/cat.c#57 + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart + var number = (' ' + n).slice(-6) + '\t'; + return number + line; +} + + +/***/ }), + +/***/ 50994: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var os = __nccwpck_require__(22037); +var common = __nccwpck_require__(5328); + +common.register('cd', _cd, {}); + +//@ +//@ ### cd([dir]) +//@ +//@ Changes to directory `dir` for the duration of the script. Changes to home +//@ directory if no argument is supplied. +function _cd(options, dir) { + if (!dir) dir = os.homedir(); + + if (dir === '-') { + if (!process.env.OLDPWD) { + common.error('could not find previous directory'); + } else { + dir = process.env.OLDPWD; + } + } + + try { + var curDir = process.cwd(); + process.chdir(dir); + process.env.OLDPWD = curDir; + } catch (e) { + // something went wrong, let's figure out the error + var err; + try { + common.statFollowLinks(dir); // if this succeeds, it must be some sort of file + err = 'not a directory: ' + dir; + } catch (e2) { + err = 'no such file or directory: ' + dir; + } + if (err) common.error(err); + } + return ''; +} +module.exports = _cd; + + +/***/ }), + +/***/ 45983: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); + +var PERMS = (function (base) { + return { + OTHER_EXEC: base.EXEC, + OTHER_WRITE: base.WRITE, + OTHER_READ: base.READ, + + GROUP_EXEC: base.EXEC << 3, + GROUP_WRITE: base.WRITE << 3, + GROUP_READ: base.READ << 3, + + OWNER_EXEC: base.EXEC << 6, + OWNER_WRITE: base.WRITE << 6, + OWNER_READ: base.READ << 6, + + // Literal octal numbers are apparently not allowed in "strict" javascript. + STICKY: parseInt('01000', 8), + SETGID: parseInt('02000', 8), + SETUID: parseInt('04000', 8), + + TYPE_MASK: parseInt('0770000', 8), + }; +}({ + EXEC: 1, + WRITE: 2, + READ: 4, +})); + +common.register('chmod', _chmod, { +}); + +//@ +//@ ### chmod([options,] octal_mode || octal_string, file) +//@ ### chmod([options,] symbolic_mode, file) +//@ +//@ Available options: +//@ +//@ + `-v`: output a diagnostic for every file processed//@ +//@ + `-c`: like verbose, but report only when a change is made//@ +//@ + `-R`: change files and directories recursively//@ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ chmod(755, '/Users/brandon'); +//@ chmod('755', '/Users/brandon'); // same as above +//@ chmod('u+x', '/Users/brandon'); +//@ chmod('-R', 'a-w', '/Users/brandon'); +//@ ``` +//@ +//@ Alters the permissions of a file or directory by either specifying the +//@ absolute permissions in octal form or expressing the changes in symbols. +//@ This command tries to mimic the POSIX behavior as much as possible. +//@ Notable exceptions: +//@ +//@ + In symbolic modes, `a-r` and `-r` are identical. No consideration is +//@ given to the `umask`. +//@ + There is no "quiet" option, since default behavior is to run silent. +function _chmod(options, mode, filePattern) { + if (!filePattern) { + if (options.length > 0 && options.charAt(0) === '-') { + // Special case where the specified file permissions started with - to subtract perms, which + // get picked up by the option parser as command flags. + // If we are down by one argument and options starts with -, shift everything over. + [].unshift.call(arguments, ''); + } else { + common.error('You must specify a file.'); + } + } + + options = common.parseOptions(options, { + 'R': 'recursive', + 'c': 'changes', + 'v': 'verbose', + }); + + filePattern = [].slice.call(arguments, 2); + + var files; + + // TODO: replace this with a call to common.expand() + if (options.recursive) { + files = []; + filePattern.forEach(function addFile(expandedFile) { + var stat = common.statNoFollowLinks(expandedFile); + + if (!stat.isSymbolicLink()) { + files.push(expandedFile); + + if (stat.isDirectory()) { // intentionally does not follow symlinks. + fs.readdirSync(expandedFile).forEach(function (child) { + addFile(expandedFile + '/' + child); + }); + } + } + }); + } else { + files = filePattern; + } + + files.forEach(function innerChmod(file) { + file = path.resolve(file); + if (!fs.existsSync(file)) { + common.error('File not found: ' + file); + } + + // When recursing, don't follow symlinks. + if (options.recursive && common.statNoFollowLinks(file).isSymbolicLink()) { + return; + } + + var stat = common.statFollowLinks(file); + var isDir = stat.isDirectory(); + var perms = stat.mode; + var type = perms & PERMS.TYPE_MASK; + + var newPerms = perms; + + if (isNaN(parseInt(mode, 8))) { + // parse options + mode.split(',').forEach(function (symbolicMode) { + var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; + var matches = pattern.exec(symbolicMode); + + if (matches) { + var applyTo = matches[1]; + var operator = matches[2]; + var change = matches[3]; + + var changeOwner = applyTo.indexOf('u') !== -1 || applyTo === 'a' || applyTo === ''; + var changeGroup = applyTo.indexOf('g') !== -1 || applyTo === 'a' || applyTo === ''; + var changeOther = applyTo.indexOf('o') !== -1 || applyTo === 'a' || applyTo === ''; + + var changeRead = change.indexOf('r') !== -1; + var changeWrite = change.indexOf('w') !== -1; + var changeExec = change.indexOf('x') !== -1; + var changeExecDir = change.indexOf('X') !== -1; + var changeSticky = change.indexOf('t') !== -1; + var changeSetuid = change.indexOf('s') !== -1; + + if (changeExecDir && isDir) { + changeExec = true; + } + + var mask = 0; + if (changeOwner) { + mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); + } + if (changeGroup) { + mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); + } + if (changeOther) { + mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); + } + + // Sticky bit is special - it's not tied to user, group or other. + if (changeSticky) { + mask |= PERMS.STICKY; + } + + switch (operator) { + case '+': + newPerms |= mask; + break; + + case '-': + newPerms &= ~mask; + break; + + case '=': + newPerms = type + mask; + + // According to POSIX, when using = to explicitly set the + // permissions, setuid and setgid can never be cleared. + if (common.statFollowLinks(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + break; + default: + common.error('Could not recognize operator: `' + operator + '`'); + } + + if (options.verbose) { + console.log(file + ' -> ' + newPerms.toString(8)); + } + + if (perms !== newPerms) { + if (!options.verbose && options.changes) { + console.log(file + ' -> ' + newPerms.toString(8)); + } + fs.chmodSync(file, newPerms); + perms = newPerms; // for the next round of changes! + } + } else { + common.error('Invalid symbolic mode change: ' + symbolicMode); + } + }); + } else { + // they gave us a full number + newPerms = type + parseInt(mode, 8); + + // POSIX rules are that setuid and setgid can only be added using numeric + // form, but not cleared. + if (common.statFollowLinks(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + + fs.chmodSync(file, newPerms); + } + }); + return ''; +} +module.exports = _chmod; + + +/***/ }), + +/***/ 5328: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +// Ignore warning about 'new String()' +/* eslint no-new-wrappers: 0 */ + + +var os = __nccwpck_require__(22037); +var fs = __nccwpck_require__(57147); +var glob = __nccwpck_require__(65811); +var shell = __nccwpck_require__(18675); + +var shellMethods = Object.create(shell); + +exports.extend = Object.assign; + +// Check if we're running under electron +var isElectron = Boolean(process.versions.electron); + +// Module globals (assume no execPath by default) +var DEFAULT_CONFIG = { + fatal: false, + globOptions: {}, + maxdepth: 255, + noglob: false, + silent: false, + verbose: false, + execPath: null, + bufLength: 64 * 1024, // 64KB +}; + +var config = { + reset: function () { + Object.assign(this, DEFAULT_CONFIG); + if (!isElectron) { + this.execPath = process.execPath; + } + }, + resetForTesting: function () { + this.reset(); + this.silent = true; + }, +}; + +config.reset(); +exports.config = config; + +// Note: commands should generally consider these as read-only values. +var state = { + error: null, + errorCode: 0, + currentCmd: 'shell.js', +}; +exports.state = state; + +delete process.env.OLDPWD; // initially, there's no previous directory + +// Reliably test if something is any sort of javascript object +function isObject(a) { + return typeof a === 'object' && a !== null; +} +exports.isObject = isObject; + +function log() { + /* istanbul ignore next */ + if (!config.silent) { + console.error.apply(console, arguments); + } +} +exports.log = log; + +// Converts strings to be equivalent across all platforms. Primarily responsible +// for making sure we use '/' instead of '\' as path separators, but this may be +// expanded in the future if necessary +function convertErrorOutput(msg) { + if (typeof msg !== 'string') { + throw new TypeError('input must be a string'); + } + return msg.replace(/\\/g, '/'); +} +exports.convertErrorOutput = convertErrorOutput; + +// Shows error message. Throws if config.fatal is true +function error(msg, _code, options) { + // Validate input + if (typeof msg !== 'string') throw new Error('msg must be a string'); + + var DEFAULT_OPTIONS = { + continue: false, + code: 1, + prefix: state.currentCmd + ': ', + silent: false, + }; + + if (typeof _code === 'number' && isObject(options)) { + options.code = _code; + } else if (isObject(_code)) { // no 'code' + options = _code; + } else if (typeof _code === 'number') { // no 'options' + options = { code: _code }; + } else if (typeof _code !== 'number') { // only 'msg' + options = {}; + } + options = Object.assign({}, DEFAULT_OPTIONS, options); + + if (!state.errorCode) state.errorCode = options.code; + + var logEntry = convertErrorOutput(options.prefix + msg); + state.error = state.error ? state.error + '\n' : ''; + state.error += logEntry; + + // Throw an error, or log the entry + if (config.fatal) throw new Error(logEntry); + if (msg.length > 0 && !options.silent) log(logEntry); + + if (!options.continue) { + throw { + msg: 'earlyExit', + retValue: (new ShellString('', state.error, state.errorCode)), + }; + } +} +exports.error = error; + +//@ +//@ ### ShellString(str) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var foo = ShellString('hello world'); +//@ ``` +//@ +//@ Turns a regular string into a string-like object similar to what each +//@ command returns. This has special methods, like `.to()` and `.toEnd()`. +function ShellString(stdout, stderr, code) { + var that; + if (stdout instanceof Array) { + that = stdout; + that.stdout = stdout.join('\n'); + if (stdout.length > 0) that.stdout += '\n'; + } else { + that = new String(stdout); + that.stdout = stdout; + } + that.stderr = stderr; + that.code = code; + // A list of all commands that can appear on the right-hand side of a pipe + // (populated by calls to common.wrap()) + pipeMethods.forEach(function (cmd) { + that[cmd] = shellMethods[cmd].bind(that); + }); + return that; +} + +exports.ShellString = ShellString; + +// Returns {'alice': true, 'bob': false} when passed a string and dictionary as follows: +// parseOptions('-a', {'a':'alice', 'b':'bob'}); +// Returns {'reference': 'string-value', 'bob': false} when passed two dictionaries of the form: +// parseOptions({'-r': 'string-value'}, {'r':'reference', 'b':'bob'}); +// Throws an error when passed a string that does not start with '-': +// parseOptions('a', {'a':'alice'}); // throws +function parseOptions(opt, map, errorOptions) { + // Validate input + if (typeof opt !== 'string' && !isObject(opt)) { + throw new Error('options must be strings or key-value pairs'); + } else if (!isObject(map)) { + throw new Error('parseOptions() internal error: map must be an object'); + } else if (errorOptions && !isObject(errorOptions)) { + throw new Error('parseOptions() internal error: errorOptions must be object'); + } + + if (opt === '--') { + // This means there are no options. + return {}; + } + + // All options are false by default + var options = {}; + Object.keys(map).forEach(function (letter) { + var optName = map[letter]; + if (optName[0] !== '!') { + options[optName] = false; + } + }); + + if (opt === '') return options; // defaults + + if (typeof opt === 'string') { + if (opt[0] !== '-') { + throw new Error("Options string must start with a '-'"); + } + + // e.g. chars = ['R', 'f'] + var chars = opt.slice(1).split(''); + + chars.forEach(function (c) { + if (c in map) { + var optionName = map[c]; + if (optionName[0] === '!') { + options[optionName.slice(1)] = false; + } else { + options[optionName] = true; + } + } else { + error('option not recognized: ' + c, errorOptions || {}); + } + }); + } else { // opt is an Object + Object.keys(opt).forEach(function (key) { + // key is a string of the form '-r', '-d', etc. + var c = key[1]; + if (c in map) { + var optionName = map[c]; + options[optionName] = opt[key]; // assign the given value + } else { + error('option not recognized: ' + c, errorOptions || {}); + } + }); + } + return options; +} +exports.parseOptions = parseOptions; + +// Expands wildcards with matching (ie. existing) file names. +// For example: +// expand(['file*.js']) = ['file1.js', 'file2.js', ...] +// (if the files 'file1.js', 'file2.js', etc, exist in the current dir) +function expand(list) { + if (!Array.isArray(list)) { + throw new TypeError('must be an array'); + } + var expanded = []; + list.forEach(function (listEl) { + // Don't expand non-strings + if (typeof listEl !== 'string') { + expanded.push(listEl); + } else { + var ret; + try { + ret = glob.sync(listEl, config.globOptions); + // if nothing matched, interpret the string literally + ret = ret.length > 0 ? ret : [listEl]; + } catch (e) { + // if glob fails, interpret the string literally + ret = [listEl]; + } + expanded = expanded.concat(ret); + } + }); + return expanded; +} +exports.expand = expand; + +// Normalizes Buffer creation, using Buffer.alloc if possible. +// Also provides a good default buffer length for most use cases. +var buffer = typeof Buffer.alloc === 'function' ? + function (len) { + return Buffer.alloc(len || config.bufLength); + } : + function (len) { + return new Buffer(len || config.bufLength); + }; +exports.buffer = buffer; + +// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. +// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 +function unlinkSync(file) { + try { + fs.unlinkSync(file); + } catch (e) { + // Try to override file permission + /* istanbul ignore next */ + if (e.code === 'EPERM') { + fs.chmodSync(file, '0666'); + fs.unlinkSync(file); + } else { + throw e; + } + } +} +exports.unlinkSync = unlinkSync; + +// wrappers around common.statFollowLinks and common.statNoFollowLinks that clarify intent +// and improve readability +function statFollowLinks() { + return fs.statSync.apply(fs, arguments); +} +exports.statFollowLinks = statFollowLinks; + +function statNoFollowLinks() { + return fs.lstatSync.apply(fs, arguments); +} +exports.statNoFollowLinks = statNoFollowLinks; + +// e.g. 'shelljs_a5f185d0443ca...' +function randomFileName() { + function randomHash(count) { + if (count === 1) { + return parseInt(16 * Math.random(), 10).toString(16); + } + var hash = ''; + for (var i = 0; i < count; i++) { + hash += randomHash(1); + } + return hash; + } + + return 'shelljs_' + randomHash(20); +} +exports.randomFileName = randomFileName; + +// Common wrapper for all Unix-like commands that performs glob expansion, +// command-logging, and other nice things +function wrap(cmd, fn, options) { + options = options || {}; + return function () { + var retValue = null; + + state.currentCmd = cmd; + state.error = null; + state.errorCode = 0; + + try { + var args = [].slice.call(arguments, 0); + + // Log the command to stderr, if appropriate + if (config.verbose) { + console.error.apply(console, [cmd].concat(args)); + } + + // If this is coming from a pipe, let's set the pipedValue (otherwise, set + // it to the empty string) + state.pipedValue = (this && typeof this.stdout === 'string') ? this.stdout : ''; + + if (options.unix === false) { // this branch is for exec() + retValue = fn.apply(this, args); + } else { // and this branch is for everything else + if (isObject(args[0]) && args[0].constructor.name === 'Object') { + // a no-op, allowing the syntax `touch({'-r': file}, ...)` + } else if (args.length === 0 || typeof args[0] !== 'string' || args[0].length <= 1 || args[0][0] !== '-') { + args.unshift(''); // only add dummy option if '-option' not already present + } + + // flatten out arrays that are arguments, to make the syntax: + // `cp([file1, file2, file3], dest);` + // equivalent to: + // `cp(file1, file2, file3, dest);` + args = args.reduce(function (accum, cur) { + if (Array.isArray(cur)) { + return accum.concat(cur); + } + accum.push(cur); + return accum; + }, []); + + // Convert ShellStrings (basically just String objects) to regular strings + args = args.map(function (arg) { + if (isObject(arg) && arg.constructor.name === 'String') { + return arg.toString(); + } + return arg; + }); + + // Expand the '~' if appropriate + var homeDir = os.homedir(); + args = args.map(function (arg) { + if (typeof arg === 'string' && arg.slice(0, 2) === '~/' || arg === '~') { + return arg.replace(/^~/, homeDir); + } + return arg; + }); + + // Perform glob-expansion on all arguments after globStart, but preserve + // the arguments before it (like regexes for sed and grep) + if (!config.noglob && options.allowGlobbing === true) { + args = args.slice(0, options.globStart).concat(expand(args.slice(options.globStart))); + } + + try { + // parse options if options are provided + if (isObject(options.cmdOptions)) { + args[0] = parseOptions(args[0], options.cmdOptions); + } + + retValue = fn.apply(this, args); + } catch (e) { + /* istanbul ignore else */ + if (e.msg === 'earlyExit') { + retValue = e.retValue; + } else { + throw e; // this is probably a bug that should be thrown up the call stack + } + } + } + } catch (e) { + /* istanbul ignore next */ + if (!state.error) { + // If state.error hasn't been set it's an error thrown by Node, not us - probably a bug... + e.name = 'ShellJSInternalError'; + throw e; + } + if (config.fatal) throw e; + } + + if (options.wrapOutput && + (typeof retValue === 'string' || Array.isArray(retValue))) { + retValue = new ShellString(retValue, state.error, state.errorCode); + } + + state.currentCmd = 'shell.js'; + return retValue; + }; +} // wrap +exports.wrap = wrap; + +// This returns all the input that is piped into the current command (or the +// empty string, if this isn't on the right-hand side of a pipe +function _readFromPipe() { + return state.pipedValue; +} +exports.readFromPipe = _readFromPipe; + +var DEFAULT_WRAP_OPTIONS = { + allowGlobbing: true, + canReceivePipe: false, + cmdOptions: null, + globStart: 1, + pipeOnly: false, + wrapOutput: true, + unix: true, +}; + +// This is populated during plugin registration +var pipeMethods = []; + +// Register a new ShellJS command +function _register(name, implementation, wrapOptions) { + wrapOptions = wrapOptions || {}; + + // Validate options + Object.keys(wrapOptions).forEach(function (option) { + if (!DEFAULT_WRAP_OPTIONS.hasOwnProperty(option)) { + throw new Error("Unknown option '" + option + "'"); + } + if (typeof wrapOptions[option] !== typeof DEFAULT_WRAP_OPTIONS[option]) { + throw new TypeError("Unsupported type '" + typeof wrapOptions[option] + + "' for option '" + option + "'"); + } + }); + + // If an option isn't specified, use the default + wrapOptions = Object.assign({}, DEFAULT_WRAP_OPTIONS, wrapOptions); + + if (shell.hasOwnProperty(name)) { + throw new Error('Command `' + name + '` already exists'); + } + + if (wrapOptions.pipeOnly) { + wrapOptions.canReceivePipe = true; + shellMethods[name] = wrap(name, implementation, wrapOptions); + } else { + shell[name] = wrap(name, implementation, wrapOptions); + } + + if (wrapOptions.canReceivePipe) { + pipeMethods.push(name); + } +} +exports.register = _register; + + +/***/ }), + +/***/ 26371: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); +var common = __nccwpck_require__(5328); + +common.register('cp', _cp, { + cmdOptions: { + 'f': '!no_force', + 'n': 'no_force', + 'u': 'update', + 'R': 'recursive', + 'r': 'recursive', + 'L': 'followsymlink', + 'P': 'noFollowsymlink', + }, + wrapOutput: false, +}); + +// Buffered file copy, synchronous +// (Using readFileSync() + writeFileSync() could easily cause a memory overflow +// with large files) +function copyFileSync(srcFile, destFile, options) { + if (!fs.existsSync(srcFile)) { + common.error('copyFileSync: no such file or directory: ' + srcFile); + } + + var isWindows = process.platform === 'win32'; + + // Check the mtimes of the files if the '-u' flag is provided + try { + if (options.update && common.statFollowLinks(srcFile).mtime < fs.statSync(destFile).mtime) { + return; + } + } catch (e) { + // If we're here, destFile probably doesn't exist, so just do a normal copy + } + + if (common.statNoFollowLinks(srcFile).isSymbolicLink() && !options.followsymlink) { + try { + common.statNoFollowLinks(destFile); + common.unlinkSync(destFile); // re-link it + } catch (e) { + // it doesn't exist, so no work needs to be done + } + + var symlinkFull = fs.readlinkSync(srcFile); + fs.symlinkSync(symlinkFull, destFile, isWindows ? 'junction' : null); + } else { + var buf = common.buffer(); + var bufLength = buf.length; + var bytesRead = bufLength; + var pos = 0; + var fdr = null; + var fdw = null; + + try { + fdr = fs.openSync(srcFile, 'r'); + } catch (e) { + /* istanbul ignore next */ + common.error('copyFileSync: could not read src file (' + srcFile + ')'); + } + + try { + fdw = fs.openSync(destFile, 'w'); + } catch (e) { + /* istanbul ignore next */ + common.error('copyFileSync: could not write to dest file (code=' + e.code + '):' + destFile); + } + + while (bytesRead === bufLength) { + bytesRead = fs.readSync(fdr, buf, 0, bufLength, pos); + fs.writeSync(fdw, buf, 0, bytesRead); + pos += bytesRead; + } + + fs.closeSync(fdr); + fs.closeSync(fdw); + + fs.chmodSync(destFile, common.statFollowLinks(srcFile).mode); + } +} + +// Recursively copies 'sourceDir' into 'destDir' +// Adapted from https://github.com/ryanmcgrath/wrench-js +// +// Copyright (c) 2010 Ryan McGrath +// Copyright (c) 2012 Artur Adib +// +// Licensed under the MIT License +// http://www.opensource.org/licenses/mit-license.php +function cpdirSyncRecursive(sourceDir, destDir, currentDepth, opts) { + if (!opts) opts = {}; + + // Ensure there is not a run away recursive copy + if (currentDepth >= common.config.maxdepth) return; + currentDepth++; + + var isWindows = process.platform === 'win32'; + + // Create the directory where all our junk is moving to; read the mode of the + // source directory and mirror it + try { + fs.mkdirSync(destDir); + } catch (e) { + // if the directory already exists, that's okay + if (e.code !== 'EEXIST') throw e; + } + + var files = fs.readdirSync(sourceDir); + + for (var i = 0; i < files.length; i++) { + var srcFile = sourceDir + '/' + files[i]; + var destFile = destDir + '/' + files[i]; + var srcFileStat = common.statNoFollowLinks(srcFile); + + var symlinkFull; + if (opts.followsymlink) { + if (cpcheckcycle(sourceDir, srcFile)) { + // Cycle link found. + console.error('Cycle link found.'); + symlinkFull = fs.readlinkSync(srcFile); + fs.symlinkSync(symlinkFull, destFile, isWindows ? 'junction' : null); + continue; + } + } + if (srcFileStat.isDirectory()) { + /* recursion this thing right on back. */ + cpdirSyncRecursive(srcFile, destFile, currentDepth, opts); + } else if (srcFileStat.isSymbolicLink() && !opts.followsymlink) { + symlinkFull = fs.readlinkSync(srcFile); + try { + common.statNoFollowLinks(destFile); + common.unlinkSync(destFile); // re-link it + } catch (e) { + // it doesn't exist, so no work needs to be done + } + fs.symlinkSync(symlinkFull, destFile, isWindows ? 'junction' : null); + } else if (srcFileStat.isSymbolicLink() && opts.followsymlink) { + srcFileStat = common.statFollowLinks(srcFile); + if (srcFileStat.isDirectory()) { + cpdirSyncRecursive(srcFile, destFile, currentDepth, opts); + } else { + copyFileSync(srcFile, destFile, opts); + } + } else { + /* At this point, we've hit a file actually worth copying... so copy it on over. */ + if (fs.existsSync(destFile) && opts.no_force) { + common.log('skipping existing file: ' + files[i]); + } else { + copyFileSync(srcFile, destFile, opts); + } + } + } // for files + + // finally change the mode for the newly created directory (otherwise, we + // couldn't add files to a read-only directory). + var checkDir = common.statFollowLinks(sourceDir); + fs.chmodSync(destDir, checkDir.mode); +} // cpdirSyncRecursive + +// Checks if cureent file was created recently +function checkRecentCreated(sources, index) { + var lookedSource = sources[index]; + return sources.slice(0, index).some(function (src) { + return path.basename(src) === path.basename(lookedSource); + }); +} + +function cpcheckcycle(sourceDir, srcFile) { + var srcFileStat = common.statNoFollowLinks(srcFile); + if (srcFileStat.isSymbolicLink()) { + // Do cycle check. For example: + // $ mkdir -p 1/2/3/4 + // $ cd 1/2/3/4 + // $ ln -s ../../3 link + // $ cd ../../../.. + // $ cp -RL 1 copy + var cyclecheck = common.statFollowLinks(srcFile); + if (cyclecheck.isDirectory()) { + var sourcerealpath = fs.realpathSync(sourceDir); + var symlinkrealpath = fs.realpathSync(srcFile); + var re = new RegExp(symlinkrealpath); + if (re.test(sourcerealpath)) { + return true; + } + } + } + return false; +} + +//@ +//@ ### cp([options,] source [, source ...], dest) +//@ ### cp([options,] source_array, dest) +//@ +//@ Available options: +//@ +//@ + `-f`: force (default behavior) +//@ + `-n`: no-clobber +//@ + `-u`: only copy if `source` is newer than `dest` +//@ + `-r`, `-R`: recursive +//@ + `-L`: follow symlinks +//@ + `-P`: don't follow symlinks +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cp('file1', 'dir1'); +//@ cp('-R', 'path/to/dir/', '~/newCopy/'); +//@ cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); +//@ cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above +//@ ``` +//@ +//@ Copies files. +function _cp(options, sources, dest) { + // If we're missing -R, it actually implies -L (unless -P is explicit) + if (options.followsymlink) { + options.noFollowsymlink = false; + } + if (!options.recursive && !options.noFollowsymlink) { + options.followsymlink = true; + } + + // Get sources, dest + if (arguments.length < 3) { + common.error('missing and/or '); + } else { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } + + var destExists = fs.existsSync(dest); + var destStat = destExists && common.statFollowLinks(dest); + + // Dest is not existing dir, but multiple sources given + if ((!destExists || !destStat.isDirectory()) && sources.length > 1) { + common.error('dest is not a directory (too many sources)'); + } + + // Dest is an existing file, but -n is given + if (destExists && destStat.isFile() && options.no_force) { + return new common.ShellString('', '', 0); + } + + sources.forEach(function (src, srcIndex) { + if (!fs.existsSync(src)) { + if (src === '') src = "''"; // if src was empty string, display empty string + common.error('no such file or directory: ' + src, { continue: true }); + return; // skip file + } + var srcStat = common.statFollowLinks(src); + if (!options.noFollowsymlink && srcStat.isDirectory()) { + if (!options.recursive) { + // Non-Recursive + common.error("omitting directory '" + src + "'", { continue: true }); + } else { + // Recursive + // 'cp /a/source dest' should create 'source' in 'dest' + var newDest = (destStat && destStat.isDirectory()) ? + path.join(dest, path.basename(src)) : + dest; + + try { + common.statFollowLinks(path.dirname(dest)); + cpdirSyncRecursive(src, newDest, 0, { no_force: options.no_force, followsymlink: options.followsymlink }); + } catch (e) { + /* istanbul ignore next */ + common.error("cannot create directory '" + dest + "': No such file or directory"); + } + } + } else { + // If here, src is a file + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (destStat && destStat.isDirectory()) { + thisDest = path.normalize(dest + '/' + path.basename(src)); + } + + var thisDestExists = fs.existsSync(thisDest); + if (thisDestExists && checkRecentCreated(sources, srcIndex)) { + // cannot overwrite file created recently in current execution, but we want to continue copying other files + if (!options.no_force) { + common.error("will not overwrite just-created '" + thisDest + "' with '" + src + "'", { continue: true }); + } + return; + } + + if (thisDestExists && options.no_force) { + return; // skip file + } + + if (path.relative(src, thisDest) === '') { + // a file cannot be copied to itself, but we want to continue copying other files + common.error("'" + thisDest + "' and '" + src + "' are the same file", { continue: true }); + return; + } + + copyFileSync(src, thisDest, options); + } + }); // forEach(src) + + return new common.ShellString('', common.state.error, common.state.errorCode); +} +module.exports = _cp; + + +/***/ }), + +/***/ 5183: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var _cd = __nccwpck_require__(50994); +var path = __nccwpck_require__(71017); + +common.register('dirs', _dirs, { + wrapOutput: false, +}); +common.register('pushd', _pushd, { + wrapOutput: false, +}); +common.register('popd', _popd, { + wrapOutput: false, +}); + +// Pushd/popd/dirs internals +var _dirStack = []; + +function _isStackIndex(index) { + return (/^[\-+]\d+$/).test(index); +} + +function _parseStackIndex(index) { + if (_isStackIndex(index)) { + if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd + return (/^-/).test(index) ? Number(index) - 1 : Number(index); + } + common.error(index + ': directory stack index out of range'); + } else { + common.error(index + ': invalid number'); + } +} + +function _actualDirStack() { + return [process.cwd()].concat(_dirStack); +} + +//@ +//@ ### pushd([options,] [dir | '-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. +//@ + `-q`: Supresses output to the console. +//@ +//@ Arguments: +//@ +//@ + `dir`: Sets the current working directory to the top of the stack, then executes the equivalent of `cd dir`. +//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ // process.cwd() === '/usr' +//@ pushd('/etc'); // Returns /etc /usr +//@ pushd('+1'); // Returns /usr /etc +//@ ``` +//@ +//@ Save the current directory on the top of the directory stack and then `cd` to `dir`. With no arguments, `pushd` exchanges the top two directories. Returns an array of paths in the stack. +function _pushd(options, dir) { + if (_isStackIndex(options)) { + dir = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n': 'no-cd', + 'q': 'quiet', + }); + + var dirs = _actualDirStack(); + + if (dir === '+0') { + return dirs; // +0 is a noop + } else if (!dir) { + if (dirs.length > 1) { + dirs = dirs.splice(1, 1).concat(dirs); + } else { + return common.error('no other directory'); + } + } else if (_isStackIndex(dir)) { + var n = _parseStackIndex(dir); + dirs = dirs.slice(n).concat(dirs.slice(0, n)); + } else { + if (options['no-cd']) { + dirs.splice(1, 0, dir); + } else { + dirs.unshift(dir); + } + } + + if (options['no-cd']) { + dirs = dirs.slice(1); + } else { + dir = path.resolve(dirs.shift()); + _cd('', dir); + } + + _dirStack = dirs; + return _dirs(options.quiet ? '-q' : ''); +} +exports.pushd = _pushd; + +//@ +//@ +//@ ### popd([options,] ['-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppress the normal directory change when removing directories from the stack, so that only the stack is manipulated. +//@ + `-q`: Supresses output to the console. +//@ +//@ Arguments: +//@ +//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. +//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo(process.cwd()); // '/usr' +//@ pushd('/etc'); // '/etc /usr' +//@ echo(process.cwd()); // '/etc' +//@ popd(); // '/usr' +//@ echo(process.cwd()); // '/usr' +//@ ``` +//@ +//@ When no arguments are given, `popd` removes the top directory from the stack and performs a `cd` to the new top directory. The elements are numbered from 0, starting at the first directory listed with dirs (i.e., `popd` is equivalent to `popd +0`). Returns an array of paths in the stack. +function _popd(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n': 'no-cd', + 'q': 'quiet', + }); + + if (!_dirStack.length) { + return common.error('directory stack empty'); + } + + index = _parseStackIndex(index || '+0'); + + if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { + index = index > 0 ? index - 1 : index; + _dirStack.splice(index, 1); + } else { + var dir = path.resolve(_dirStack.shift()); + _cd('', dir); + } + + return _dirs(options.quiet ? '-q' : ''); +} +exports.popd = _popd; + +//@ +//@ +//@ ### dirs([options | '+N' | '-N']) +//@ +//@ Available options: +//@ +//@ + `-c`: Clears the directory stack by deleting all of the elements. +//@ + `-q`: Supresses output to the console. +//@ +//@ Arguments: +//@ +//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. +//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. +//@ +//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if `+N` or `-N` was specified. +//@ +//@ See also: `pushd`, `popd` +function _dirs(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'c': 'clear', + 'q': 'quiet', + }); + + if (options.clear) { + _dirStack = []; + return _dirStack; + } + + var stack = _actualDirStack(); + + if (index) { + index = _parseStackIndex(index); + + if (index < 0) { + index = stack.length + index; + } + + if (!options.quiet) { + common.log(stack[index]); + } + return stack[index]; + } + + if (!options.quiet) { + common.log(stack.join(' ')); + } + + return stack; +} +exports.dirs = _dirs; + + +/***/ }), + +/***/ 95085: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var format = (__nccwpck_require__(73837).format); + +var common = __nccwpck_require__(5328); + +common.register('echo', _echo, { + allowGlobbing: false, +}); + +//@ +//@ ### echo([options,] string [, string ...]) +//@ +//@ Available options: +//@ +//@ + `-e`: interpret backslash escapes (default) +//@ + `-n`: remove trailing newline from output +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo('hello world'); +//@ var str = echo('hello world'); +//@ echo('-n', 'no newline at end'); +//@ ``` +//@ +//@ Prints `string` to stdout, and returns string with additional utility methods +//@ like `.to()`. +function _echo(opts) { + // allow strings starting with '-', see issue #20 + var messages = [].slice.call(arguments, opts ? 0 : 1); + var options = {}; + + // If the first argument starts with '-', parse it as options string. + // If parseOptions throws, it wasn't an options string. + try { + options = common.parseOptions(messages[0], { + 'e': 'escapes', + 'n': 'no_newline', + }, { + silent: true, + }); + + // Allow null to be echoed + if (messages[0]) { + messages.shift(); + } + } catch (_) { + // Clear out error if an error occurred + common.state.error = null; + } + + var output = format.apply(null, messages); + + // Add newline if -n is not passed. + if (!options.no_newline) { + output += '\n'; + } + + process.stdout.write(output); + + return output; +} + +module.exports = _echo; + + +/***/ }), + +/***/ 54893: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); + +//@ +//@ ### error() +//@ +//@ Tests if error occurred in the last command. Returns a truthy value if an +//@ error returned, or a falsy value otherwise. +//@ +//@ **Note**: do not rely on the +//@ return value to be an error message. If you need the last error message, use +//@ the `.stderr` attribute from the last command's return value instead. +function error() { + return common.state.error; +} +module.exports = error; + + +/***/ }), + +/***/ 96054: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* module decorator */ module = __nccwpck_require__.nmd(module); +if (require.main !== module) { + throw new Error('This file should not be required'); +} + +var childProcess = __nccwpck_require__(32081); +var fs = __nccwpck_require__(57147); + +var paramFilePath = process.argv[2]; + +var serializedParams = fs.readFileSync(paramFilePath, 'utf8'); +var params = JSON.parse(serializedParams); + +var cmd = params.command; +var execOptions = params.execOptions; +var pipe = params.pipe; +var stdoutFile = params.stdoutFile; +var stderrFile = params.stderrFile; + +var c = childProcess.exec(cmd, execOptions, function (err) { + if (!err) { + process.exitCode = 0; + } else if (err.code === undefined) { + process.exitCode = 1; + } else { + process.exitCode = err.code; + } +}); + +var stdoutStream = fs.createWriteStream(stdoutFile); +var stderrStream = fs.createWriteStream(stderrFile); + +c.stdout.pipe(stdoutStream); +c.stderr.pipe(stderrStream); +c.stdout.pipe(process.stdout); +c.stderr.pipe(process.stderr); + +if (pipe) { + c.stdin.end(pipe); +} + + +/***/ }), + +/***/ 78094: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var _tempDir = (__nccwpck_require__(16154).tempDir); +var _pwd = __nccwpck_require__(77639); +var path = __nccwpck_require__(71017); +var fs = __nccwpck_require__(57147); +var child = __nccwpck_require__(32081); + +var DEFAULT_MAXBUFFER_SIZE = 20 * 1024 * 1024; +var DEFAULT_ERROR_CODE = 1; + +common.register('exec', _exec, { + unix: false, + canReceivePipe: true, + wrapOutput: false, +}); + +// We use this function to run `exec` synchronously while also providing realtime +// output. +function execSync(cmd, opts, pipe) { + if (!common.config.execPath) { + common.error('Unable to find a path to the node binary. Please manually set config.execPath'); + } + + var tempDir = _tempDir(); + var paramsFile = path.resolve(tempDir + '/' + common.randomFileName()); + var stderrFile = path.resolve(tempDir + '/' + common.randomFileName()); + var stdoutFile = path.resolve(tempDir + '/' + common.randomFileName()); + + opts = common.extend({ + silent: common.config.silent, + cwd: _pwd().toString(), + env: process.env, + maxBuffer: DEFAULT_MAXBUFFER_SIZE, + encoding: 'utf8', + }, opts); + + if (fs.existsSync(paramsFile)) common.unlinkSync(paramsFile); + if (fs.existsSync(stderrFile)) common.unlinkSync(stderrFile); + if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); + + opts.cwd = path.resolve(opts.cwd); + + var paramsToSerialize = { + command: cmd, + execOptions: opts, + pipe: pipe, + stdoutFile: stdoutFile, + stderrFile: stderrFile, + }; + + fs.writeFileSync(paramsFile, JSON.stringify(paramsToSerialize), 'utf8'); + + var execArgs = [ + __nccwpck_require__.ab + "exec-child.js", + paramsFile, + ]; + + /* istanbul ignore else */ + if (opts.silent) { + opts.stdio = 'ignore'; + } else { + opts.stdio = [0, 1, 2]; + } + + var code = 0; + + // Welcome to the future + try { + // Bad things if we pass in a `shell` option to child_process.execFileSync, + // so we need to explicitly remove it here. + delete opts.shell; + + child.execFileSync(common.config.execPath, execArgs, opts); + } catch (e) { + // Commands with non-zero exit code raise an exception. + code = e.status || DEFAULT_ERROR_CODE; + } + + // fs.readFileSync uses buffer encoding by default, so call + // it without the encoding option if the encoding is 'buffer'. + // Also, if the exec timeout is too short for node to start up, + // the files will not be created, so these calls will throw. + var stdout = ''; + var stderr = ''; + if (opts.encoding === 'buffer') { + stdout = fs.readFileSync(stdoutFile); + stderr = fs.readFileSync(stderrFile); + } else { + stdout = fs.readFileSync(stdoutFile, opts.encoding); + stderr = fs.readFileSync(stderrFile, opts.encoding); + } + + // No biggie if we can't erase the files now -- they're in a temp dir anyway + try { common.unlinkSync(paramsFile); } catch (e) {} + try { common.unlinkSync(stderrFile); } catch (e) {} + try { common.unlinkSync(stdoutFile); } catch (e) {} + + if (code !== 0) { + // Note: `silent` should be unconditionally true to avoid double-printing + // the command's stderr, and to avoid printing any stderr when the user has + // set `shell.config.silent`. + common.error(stderr, code, { continue: true, silent: true }); + } + var obj = common.ShellString(stdout, stderr, code); + return obj; +} // execSync() + +// Wrapper around exec() to enable echoing output to console in real time +function execAsync(cmd, opts, pipe, callback) { + opts = common.extend({ + silent: common.config.silent, + cwd: _pwd().toString(), + env: process.env, + maxBuffer: DEFAULT_MAXBUFFER_SIZE, + encoding: 'utf8', + }, opts); + + var c = child.exec(cmd, opts, function (err, stdout, stderr) { + if (callback) { + if (!err) { + callback(0, stdout, stderr); + } else if (err.code === undefined) { + // See issue #536 + /* istanbul ignore next */ + callback(1, stdout, stderr); + } else { + callback(err.code, stdout, stderr); + } + } + }); + + if (pipe) c.stdin.end(pipe); + + if (!opts.silent) { + c.stdout.pipe(process.stdout); + c.stderr.pipe(process.stderr); + } + + return c; +} + +//@ +//@ ### exec(command [, options] [, callback]) +//@ +//@ Available options: +//@ +//@ + `async`: Asynchronous execution. If a callback is provided, it will be set to +//@ `true`, regardless of the passed value (default: `false`). +//@ + `silent`: Do not echo program output to console (default: `false`). +//@ + `encoding`: Character encoding to use. Affects the values returned to stdout and stderr, and +//@ what is written to stdout and stderr when not in silent mode (default: `'utf8'`). +//@ + and any option available to Node.js's +//@ [`child_process.exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var version = exec('node --version', {silent:true}).stdout; +//@ +//@ var child = exec('some_long_running_process', {async:true}); +//@ child.stdout.on('data', function(data) { +//@ /* ... do something with data ... */ +//@ }); +//@ +//@ exec('some_long_running_process', function(code, stdout, stderr) { +//@ console.log('Exit code:', code); +//@ console.log('Program output:', stdout); +//@ console.log('Program stderr:', stderr); +//@ }); +//@ ``` +//@ +//@ Executes the given `command` _synchronously_, unless otherwise specified. When in synchronous +//@ mode, this returns a `ShellString` (compatible with ShellJS v0.6.x, which returns an object +//@ of the form `{ code:..., stdout:... , stderr:... }`). Otherwise, this returns the child process +//@ object, and the `callback` receives the arguments `(code, stdout, stderr)`. +//@ +//@ Not seeing the behavior you want? `exec()` runs everything through `sh` +//@ by default (or `cmd.exe` on Windows), which differs from `bash`. If you +//@ need bash-specific behavior, try out the `{shell: 'path/to/bash'}` option. +function _exec(command, options, callback) { + options = options || {}; + if (!command) common.error('must specify command'); + + var pipe = common.readFromPipe(); + + // Callback is defined instead of options. + if (typeof options === 'function') { + callback = options; + options = { async: true }; + } + + // Callback is defined with options. + if (typeof options === 'object' && typeof callback === 'function') { + options.async = true; + } + + options = common.extend({ + silent: common.config.silent, + async: false, + }, options); + + if (options.async) { + return execAsync(command, options, pipe, callback); + } else { + return execSync(command, options, pipe); + } +} +module.exports = _exec; + + +/***/ }), + +/***/ 52485: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var path = __nccwpck_require__(71017); +var common = __nccwpck_require__(5328); +var _ls = __nccwpck_require__(86808); + +common.register('find', _find, {}); + +//@ +//@ ### find(path [, path ...]) +//@ ### find(path_array) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ find('src', 'lib'); +//@ find(['src', 'lib']); // same as above +//@ find('.').filter(function(file) { return file.match(/\.js$/); }); +//@ ``` +//@ +//@ Returns array of all files (however deep) in the given paths. +//@ +//@ The main difference from `ls('-R', path)` is that the resulting file names +//@ include the base directories (e.g., `lib/resources/file1` instead of just `file1`). +function _find(options, paths) { + if (!paths) { + common.error('no path specified'); + } else if (typeof paths === 'string') { + paths = [].slice.call(arguments, 1); + } + + var list = []; + + function pushFile(file) { + if (process.platform === 'win32') { + file = file.replace(/\\/g, '/'); + } + list.push(file); + } + + // why not simply do `ls('-R', paths)`? because the output wouldn't give the base dirs + // to get the base dir in the output, we need instead `ls('-R', 'dir/*')` for every directory + + paths.forEach(function (file) { + var stat; + try { + stat = common.statFollowLinks(file); + } catch (e) { + common.error('no such file or directory: ' + file); + } + + pushFile(file); + + if (stat.isDirectory()) { + _ls({ recursive: true, all: true }, file).forEach(function (subfile) { + pushFile(path.join(file, subfile)); + }); + } + }); + + return list; +} +module.exports = _find; + + +/***/ }), + +/***/ 2354: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +common.register('grep', _grep, { + globStart: 2, // don't glob-expand the regex + canReceivePipe: true, + cmdOptions: { + 'v': 'inverse', + 'l': 'nameOnly', + 'i': 'ignoreCase', + }, +}); + +//@ +//@ ### grep([options,] regex_filter, file [, file ...]) +//@ ### grep([options,] regex_filter, file_array) +//@ +//@ Available options: +//@ +//@ + `-v`: Invert `regex_filter` (only print non-matching lines). +//@ + `-l`: Print only filenames of matching files. +//@ + `-i`: Ignore case. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); +//@ grep('GLOBAL_VARIABLE', '*.js'); +//@ ``` +//@ +//@ Reads input string from given files and returns a string containing all lines of the +//@ file that match the given `regex_filter`. +function _grep(options, regex, files) { + // Check if this is coming from a pipe + var pipe = common.readFromPipe(); + + if (!files && !pipe) common.error('no paths given', 2); + + files = [].slice.call(arguments, 2); + + if (pipe) { + files.unshift('-'); + } + + var grep = []; + if (options.ignoreCase) { + regex = new RegExp(regex, 'i'); + } + files.forEach(function (file) { + if (!fs.existsSync(file) && file !== '-') { + common.error('no such file or directory: ' + file, 2, { continue: true }); + return; + } + + var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); + if (options.nameOnly) { + if (contents.match(regex)) { + grep.push(file); + } + } else { + var lines = contents.split('\n'); + lines.forEach(function (line) { + var matched = line.match(regex); + if ((options.inverse && !matched) || (!options.inverse && matched)) { + grep.push(line); + } + }); + } + }); + + return grep.join('\n') + '\n'; +} +module.exports = _grep; + + +/***/ }), + +/***/ 67770: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +common.register('head', _head, { + canReceivePipe: true, + cmdOptions: { + 'n': 'numLines', + }, +}); + +// Reads |numLines| lines or the entire file, whichever is less. +function readSomeLines(file, numLines) { + var buf = common.buffer(); + var bufLength = buf.length; + var bytesRead = bufLength; + var pos = 0; + + var fdr = fs.openSync(file, 'r'); + var numLinesRead = 0; + var ret = ''; + while (bytesRead === bufLength && numLinesRead < numLines) { + bytesRead = fs.readSync(fdr, buf, 0, bufLength, pos); + var bufStr = buf.toString('utf8', 0, bytesRead); + numLinesRead += bufStr.split('\n').length - 1; + ret += bufStr; + pos += bytesRead; + } + + fs.closeSync(fdr); + return ret; +} + +//@ +//@ ### head([{'-n': \},] file [, file ...]) +//@ ### head([{'-n': \},] file_array) +//@ +//@ Available options: +//@ +//@ + `-n `: Show the first `` lines of the files +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = head({'-n': 1}, 'file*.txt'); +//@ var str = head('file1', 'file2'); +//@ var str = head(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Read the start of a file. +function _head(options, files) { + var head = []; + var pipe = common.readFromPipe(); + + if (!files && !pipe) common.error('no paths given'); + + var idx = 1; + if (options.numLines === true) { + idx = 2; + options.numLines = Number(arguments[1]); + } else if (options.numLines === false) { + options.numLines = 10; + } + files = [].slice.call(arguments, idx); + + if (pipe) { + files.unshift('-'); + } + + var shouldAppendNewline = false; + files.forEach(function (file) { + if (file !== '-') { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, { continue: true }); + return; + } else if (common.statFollowLinks(file).isDirectory()) { + common.error("error reading '" + file + "': Is a directory", { + continue: true, + }); + return; + } + } + + var contents; + if (file === '-') { + contents = pipe; + } else if (options.numLines < 0) { + contents = fs.readFileSync(file, 'utf8'); + } else { + contents = readSomeLines(file, options.numLines); + } + + var lines = contents.split('\n'); + var hasTrailingNewline = (lines[lines.length - 1] === ''); + if (hasTrailingNewline) { + lines.pop(); + } + shouldAppendNewline = (hasTrailingNewline || options.numLines < lines.length); + + head = head.concat(lines.slice(0, options.numLines)); + }); + + if (shouldAppendNewline) { + head.push(''); // to add a trailing newline once we join + } + return head.join('\n'); +} +module.exports = _head; + + +/***/ }), + +/***/ 22759: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); +var common = __nccwpck_require__(5328); + +common.register('ln', _ln, { + cmdOptions: { + 's': 'symlink', + 'f': 'force', + }, +}); + +//@ +//@ ### ln([options,] source, dest) +//@ +//@ Available options: +//@ +//@ + `-s`: symlink +//@ + `-f`: force +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ln('file', 'newlink'); +//@ ln('-sf', 'file', 'existing'); +//@ ``` +//@ +//@ Links `source` to `dest`. Use `-f` to force the link, should `dest` already exist. +function _ln(options, source, dest) { + if (!source || !dest) { + common.error('Missing and/or '); + } + + source = String(source); + var sourcePath = path.normalize(source).replace(RegExp(path.sep + '$'), ''); + var isAbsolute = (path.resolve(source) === sourcePath); + dest = path.resolve(process.cwd(), String(dest)); + + if (fs.existsSync(dest)) { + if (!options.force) { + common.error('Destination file exists', { continue: true }); + } + + fs.unlinkSync(dest); + } + + if (options.symlink) { + var isWindows = process.platform === 'win32'; + var linkType = isWindows ? 'file' : null; + var resolvedSourcePath = isAbsolute ? sourcePath : path.resolve(process.cwd(), path.dirname(dest), source); + if (!fs.existsSync(resolvedSourcePath)) { + common.error('Source file does not exist', { continue: true }); + } else if (isWindows && common.statFollowLinks(resolvedSourcePath).isDirectory()) { + linkType = 'junction'; + } + + try { + fs.symlinkSync(linkType === 'junction' ? resolvedSourcePath : source, dest, linkType); + } catch (err) { + common.error(err.message); + } + } else { + if (!fs.existsSync(source)) { + common.error('Source file does not exist', { continue: true }); + } + try { + fs.linkSync(source, dest); + } catch (err) { + common.error(err.message); + } + } + return ''; +} +module.exports = _ln; + + +/***/ }), + +/***/ 86808: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var path = __nccwpck_require__(71017); +var fs = __nccwpck_require__(57147); +var common = __nccwpck_require__(5328); +var glob = __nccwpck_require__(65811); + +var globPatternRecursive = path.sep + '**'; + +common.register('ls', _ls, { + cmdOptions: { + 'R': 'recursive', + 'A': 'all', + 'L': 'link', + 'a': 'all_deprecated', + 'd': 'directory', + 'l': 'long', + }, +}); + +//@ +//@ ### ls([options,] [path, ...]) +//@ ### ls([options,] path_array) +//@ +//@ Available options: +//@ +//@ + `-R`: recursive +//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) +//@ + `-L`: follow symlinks +//@ + `-d`: list directories themselves, not their contents +//@ + `-l`: list objects representing each file, each with fields containing `ls +//@ -l` output fields. See +//@ [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) +//@ for more info +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ls('projs/*.js'); +//@ ls('-R', '/users/me', '/tmp'); +//@ ls('-R', ['/users/me', '/tmp']); // same as above +//@ ls('-l', 'file.txt'); // { name: 'file.txt', mode: 33188, nlink: 1, ...} +//@ ``` +//@ +//@ Returns array of files in the given `path`, or files in +//@ the current directory if no `path` is provided. +function _ls(options, paths) { + if (options.all_deprecated) { + // We won't support the -a option as it's hard to image why it's useful + // (it includes '.' and '..' in addition to '.*' files) + // For backwards compatibility we'll dump a deprecated message and proceed as before + common.log('ls: Option -a is deprecated. Use -A instead'); + options.all = true; + } + + if (!paths) { + paths = ['.']; + } else { + paths = [].slice.call(arguments, 1); + } + + var list = []; + + function pushFile(abs, relName, stat) { + if (process.platform === 'win32') { + relName = relName.replace(/\\/g, '/'); + } + if (options.long) { + stat = stat || (options.link ? common.statFollowLinks(abs) : common.statNoFollowLinks(abs)); + list.push(addLsAttributes(relName, stat)); + } else { + // list.push(path.relative(rel || '.', file)); + list.push(relName); + } + } + + paths.forEach(function (p) { + var stat; + + try { + stat = options.link ? common.statFollowLinks(p) : common.statNoFollowLinks(p); + // follow links to directories by default + if (stat.isSymbolicLink()) { + /* istanbul ignore next */ + // workaround for https://github.com/shelljs/shelljs/issues/795 + // codecov seems to have a bug that miscalculate this block as uncovered. + // but according to nyc report this block does get covered. + try { + var _stat = common.statFollowLinks(p); + if (_stat.isDirectory()) { + stat = _stat; + } + } catch (_) {} // bad symlink, treat it like a file + } + } catch (e) { + common.error('no such file or directory: ' + p, 2, { continue: true }); + return; + } + + // If the stat succeeded + if (stat.isDirectory() && !options.directory) { + if (options.recursive) { + // use glob, because it's simple + glob.sync(p + globPatternRecursive, { dot: options.all, follow: options.link }) + .forEach(function (item) { + // Glob pattern returns the directory itself and needs to be filtered out. + if (path.relative(p, item)) { + pushFile(item, path.relative(p, item)); + } + }); + } else if (options.all) { + // use fs.readdirSync, because it's fast + fs.readdirSync(p).forEach(function (item) { + pushFile(path.join(p, item), item); + }); + } else { + // use fs.readdirSync and then filter out secret files + fs.readdirSync(p).forEach(function (item) { + if (item[0] !== '.') { + pushFile(path.join(p, item), item); + } + }); + } + } else { + pushFile(p, p, stat); + } + }); + + // Add methods, to make this more compatible with ShellStrings + return list; +} + +function addLsAttributes(pathName, stats) { + // Note: this object will contain more information than .toString() returns + stats.name = pathName; + stats.toString = function () { + // Return a string resembling unix's `ls -l` format + return [this.mode, this.nlink, this.uid, this.gid, this.size, this.mtime, this.name].join(' '); + }; + return stats; +} + +module.exports = _ls; + + +/***/ }), + +/***/ 7697: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); + +common.register('mkdir', _mkdir, { + cmdOptions: { + 'p': 'fullpath', + }, +}); + +// Recursively creates `dir` +function mkdirSyncRecursive(dir) { + var baseDir = path.dirname(dir); + + // Prevents some potential problems arising from malformed UNCs or + // insufficient permissions. + /* istanbul ignore next */ + if (baseDir === dir) { + common.error('dirname() failed: [' + dir + ']'); + } + + // Base dir exists, no recursion necessary + if (fs.existsSync(baseDir)) { + fs.mkdirSync(dir, parseInt('0777', 8)); + return; + } + + // Base dir does not exist, go recursive + mkdirSyncRecursive(baseDir); + + // Base dir created, can create dir + fs.mkdirSync(dir, parseInt('0777', 8)); +} + +//@ +//@ ### mkdir([options,] dir [, dir ...]) +//@ ### mkdir([options,] dir_array) +//@ +//@ Available options: +//@ +//@ + `-p`: full path (and create intermediate directories, if necessary) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +//@ ``` +//@ +//@ Creates directories. +function _mkdir(options, dirs) { + if (!dirs) common.error('no paths given'); + + if (typeof dirs === 'string') { + dirs = [].slice.call(arguments, 1); + } + // if it's array leave it as it is + + dirs.forEach(function (dir) { + try { + var stat = common.statNoFollowLinks(dir); + if (!options.fullpath) { + common.error('path already exists: ' + dir, { continue: true }); + } else if (stat.isFile()) { + common.error('cannot create directory ' + dir + ': File exists', { continue: true }); + } + return; // skip dir + } catch (e) { + // do nothing + } + + // Base dir does not exist, and no -p option given + var baseDir = path.dirname(dir); + if (!fs.existsSync(baseDir) && !options.fullpath) { + common.error('no such file or directory: ' + baseDir, { continue: true }); + return; // skip dir + } + + try { + if (options.fullpath) { + mkdirSyncRecursive(path.resolve(dir)); + } else { + fs.mkdirSync(dir, parseInt('0777', 8)); + } + } catch (e) { + var reason; + if (e.code === 'EACCES') { + reason = 'Permission denied'; + } else if (e.code === 'ENOTDIR' || e.code === 'ENOENT') { + reason = 'Not a directory'; + } else { + /* istanbul ignore next */ + throw e; + } + common.error('cannot create directory ' + dir + ': ' + reason, { continue: true }); + } + }); + return ''; +} // mkdir +module.exports = _mkdir; + + +/***/ }), + +/***/ 71061: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); +var common = __nccwpck_require__(5328); +var cp = __nccwpck_require__(26371); +var rm = __nccwpck_require__(76138); + +common.register('mv', _mv, { + cmdOptions: { + 'f': '!no_force', + 'n': 'no_force', + }, +}); + +// Checks if cureent file was created recently +function checkRecentCreated(sources, index) { + var lookedSource = sources[index]; + return sources.slice(0, index).some(function (src) { + return path.basename(src) === path.basename(lookedSource); + }); +} + +//@ +//@ ### mv([options ,] source [, source ...], dest') +//@ ### mv([options ,] source_array, dest') +//@ +//@ Available options: +//@ +//@ + `-f`: force (default behavior) +//@ + `-n`: no-clobber +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mv('-n', 'file', 'dir/'); +//@ mv('file1', 'file2', 'dir/'); +//@ mv(['file1', 'file2'], 'dir/'); // same as above +//@ ``` +//@ +//@ Moves `source` file(s) to `dest`. +function _mv(options, sources, dest) { + // Get sources, dest + if (arguments.length < 3) { + common.error('missing and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else { + // TODO(nate): figure out if we actually need this line + common.error('invalid arguments'); + } + + var exists = fs.existsSync(dest); + var stats = exists && common.statFollowLinks(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) { + common.error('dest is not a directory (too many sources)'); + } + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && options.no_force) { + common.error('dest file already exists: ' + dest); + } + + sources.forEach(function (src, srcIndex) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: ' + src, { continue: true }); + return; // skip file + } + + // If here, src exists + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && common.statFollowLinks(dest).isDirectory()) { + thisDest = path.normalize(dest + '/' + path.basename(src)); + } + + var thisDestExists = fs.existsSync(thisDest); + + if (thisDestExists && checkRecentCreated(sources, srcIndex)) { + // cannot overwrite file created recently in current execution, but we want to continue copying other files + if (!options.no_force) { + common.error("will not overwrite just-created '" + thisDest + "' with '" + src + "'", { continue: true }); + } + return; + } + + if (fs.existsSync(thisDest) && options.no_force) { + common.error('dest file already exists: ' + thisDest, { continue: true }); + return; // skip file + } + + if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { + common.error('cannot move to self: ' + src, { continue: true }); + return; // skip file + } + + try { + fs.renameSync(src, thisDest); + } catch (e) { + /* istanbul ignore next */ + if (e.code === 'EXDEV') { + // If we're trying to `mv` to an external partition, we'll actually need + // to perform a copy and then clean up the original file. If either the + // copy or the rm fails with an exception, we should allow this + // exception to pass up to the top level. + cp('-r', src, thisDest); + rm('-rf', src); + } + } + }); // forEach(src) + return ''; +} // mv +module.exports = _mv; + + +/***/ }), + +/***/ 1065: +/***/ (() => { + +// see dirs.js + + +/***/ }), + +/***/ 15846: +/***/ (() => { + +// see dirs.js + + +/***/ }), + +/***/ 77639: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var path = __nccwpck_require__(71017); +var common = __nccwpck_require__(5328); + +common.register('pwd', _pwd, { + allowGlobbing: false, +}); + +//@ +//@ ### pwd() +//@ +//@ Returns the current directory. +function _pwd() { + var pwd = path.resolve(process.cwd()); + return pwd; +} +module.exports = _pwd; + + +/***/ }), + +/***/ 76138: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +common.register('rm', _rm, { + cmdOptions: { + 'f': 'force', + 'r': 'recursive', + 'R': 'recursive', + }, +}); + +// Recursively removes 'dir' +// Adapted from https://github.com/ryanmcgrath/wrench-js +// +// Copyright (c) 2010 Ryan McGrath +// Copyright (c) 2012 Artur Adib +// +// Licensed under the MIT License +// http://www.opensource.org/licenses/mit-license.php +function rmdirSyncRecursive(dir, force, fromSymlink) { + var files; + + files = fs.readdirSync(dir); + + // Loop through and delete everything in the sub-tree after checking it + for (var i = 0; i < files.length; i++) { + var file = dir + '/' + files[i]; + var currFile = common.statNoFollowLinks(file); + + if (currFile.isDirectory()) { // Recursive function back to the beginning + rmdirSyncRecursive(file, force); + } else { // Assume it's a file - perhaps a try/catch belongs here? + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + /* istanbul ignore next */ + common.error('could not remove file (code ' + e.code + '): ' + file, { + continue: true, + }); + } + } + } + } + + // if was directory was referenced through a symbolic link, + // the contents should be removed, but not the directory itself + if (fromSymlink) return; + + // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. + // Huzzah for the shopkeep. + + var result; + try { + // Retry on windows, sometimes it takes a little time before all the files in the directory are gone + var start = Date.now(); + + // TODO: replace this with a finite loop + for (;;) { + try { + result = fs.rmdirSync(dir); + if (fs.existsSync(dir)) throw { code: 'EAGAIN' }; + break; + } catch (er) { + /* istanbul ignore next */ + // In addition to error codes, also check if the directory still exists and loop again if true + if (process.platform === 'win32' && (er.code === 'ENOTEMPTY' || er.code === 'EBUSY' || er.code === 'EPERM' || er.code === 'EAGAIN')) { + if (Date.now() - start > 1000) throw er; + } else if (er.code === 'ENOENT') { + // Directory did not exist, deletion was successful + break; + } else { + throw er; + } + } + } + } catch (e) { + common.error('could not remove directory (code ' + e.code + '): ' + dir, { continue: true }); + } + + return result; +} // rmdirSyncRecursive + +// Hack to determine if file has write permissions for current user +// Avoids having to check user, group, etc, but it's probably slow +function isWriteable(file) { + var writePermission = true; + try { + var __fd = fs.openSync(file, 'a'); + fs.closeSync(__fd); + } catch (e) { + writePermission = false; + } + + return writePermission; +} + +function handleFile(file, options) { + if (options.force || isWriteable(file)) { + // -f was passed, or file is writable, so it can be removed + common.unlinkSync(file); + } else { + common.error('permission denied: ' + file, { continue: true }); + } +} + +function handleDirectory(file, options) { + if (options.recursive) { + // -r was passed, so directory can be removed + rmdirSyncRecursive(file, options.force); + } else { + common.error('path is a directory', { continue: true }); + } +} + +function handleSymbolicLink(file, options) { + var stats; + try { + stats = common.statFollowLinks(file); + } catch (e) { + // symlink is broken, so remove the symlink itself + common.unlinkSync(file); + return; + } + + if (stats.isFile()) { + common.unlinkSync(file); + } else if (stats.isDirectory()) { + if (file[file.length - 1] === '/') { + // trailing separator, so remove the contents, not the link + if (options.recursive) { + // -r was passed, so directory can be removed + var fromSymlink = true; + rmdirSyncRecursive(file, options.force, fromSymlink); + } else { + common.error('path is a directory', { continue: true }); + } + } else { + // no trailing separator, so remove the link + common.unlinkSync(file); + } + } +} + +function handleFIFO(file) { + common.unlinkSync(file); +} + +//@ +//@ ### rm([options,] file [, file ...]) +//@ ### rm([options,] file_array) +//@ +//@ Available options: +//@ +//@ + `-f`: force +//@ + `-r, -R`: recursive +//@ +//@ Examples: +//@ +//@ ```javascript +//@ rm('-rf', '/tmp/*'); +//@ rm('some_file.txt', 'another_file.txt'); +//@ rm(['some_file.txt', 'another_file.txt']); // same as above +//@ ``` +//@ +//@ Removes files. +function _rm(options, files) { + if (!files) common.error('no paths given'); + + // Convert to array + files = [].slice.call(arguments, 1); + + files.forEach(function (file) { + var lstats; + try { + var filepath = (file[file.length - 1] === '/') + ? file.slice(0, -1) // remove the '/' so lstatSync can detect symlinks + : file; + lstats = common.statNoFollowLinks(filepath); // test for existence + } catch (e) { + // Path does not exist, no force flag given + if (!options.force) { + common.error('no such file or directory: ' + file, { continue: true }); + } + return; // skip file + } + + // If here, path exists + if (lstats.isFile()) { + handleFile(file, options); + } else if (lstats.isDirectory()) { + handleDirectory(file, options); + } else if (lstats.isSymbolicLink()) { + handleSymbolicLink(file, options); + } else if (lstats.isFIFO()) { + handleFIFO(file); + } + }); // forEach(file) + return ''; +} // rm +module.exports = _rm; + + +/***/ }), + +/***/ 59090: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +common.register('sed', _sed, { + globStart: 3, // don't glob-expand regexes + canReceivePipe: true, + cmdOptions: { + 'i': 'inplace', + }, +}); + +//@ +//@ ### sed([options,] search_regex, replacement, file [, file ...]) +//@ ### sed([options,] search_regex, replacement, file_array) +//@ +//@ Available options: +//@ +//@ + `-i`: Replace contents of `file` in-place. _Note that no backups will be created!_ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +//@ ``` +//@ +//@ Reads an input string from `file`s, and performs a JavaScript `replace()` on the input +//@ using the given `search_regex` and `replacement` string or function. Returns the new string after replacement. +//@ +//@ Note: +//@ +//@ Like unix `sed`, ShellJS `sed` supports capture groups. Capture groups are specified +//@ using the `$n` syntax: +//@ +//@ ```javascript +//@ sed(/(\w+)\s(\w+)/, '$2, $1', 'file.txt'); +//@ ``` +function _sed(options, regex, replacement, files) { + // Check if this is coming from a pipe + var pipe = common.readFromPipe(); + + if (typeof replacement !== 'string' && typeof replacement !== 'function') { + if (typeof replacement === 'number') { + replacement = replacement.toString(); // fallback + } else { + common.error('invalid replacement string'); + } + } + + // Convert all search strings to RegExp + if (typeof regex === 'string') { + regex = RegExp(regex); + } + + if (!files && !pipe) { + common.error('no files given'); + } + + files = [].slice.call(arguments, 3); + + if (pipe) { + files.unshift('-'); + } + + var sed = []; + files.forEach(function (file) { + if (!fs.existsSync(file) && file !== '-') { + common.error('no such file or directory: ' + file, 2, { continue: true }); + return; + } + + var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); + var lines = contents.split('\n'); + var result = lines.map(function (line) { + return line.replace(regex, replacement); + }).join('\n'); + + sed.push(result); + + if (options.inplace) { + fs.writeFileSync(file, result, 'utf8'); + } + }); + + return sed.join('\n'); +} +module.exports = _sed; + + +/***/ }), + +/***/ 31468: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); + +common.register('set', _set, { + allowGlobbing: false, + wrapOutput: false, +}); + +//@ +//@ ### set(options) +//@ +//@ Available options: +//@ +//@ + `+/-e`: exit upon error (`config.fatal`) +//@ + `+/-v`: verbose: show all commands (`config.verbose`) +//@ + `+/-f`: disable filename expansion (globbing) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ set('-e'); // exit upon first error +//@ set('+e'); // this undoes a "set('-e')" +//@ ``` +//@ +//@ Sets global configuration variables. +function _set(options) { + if (!options) { + var args = [].slice.call(arguments, 0); + if (args.length < 2) common.error('must provide an argument'); + options = args[1]; + } + var negate = (options[0] === '+'); + if (negate) { + options = '-' + options.slice(1); // parseOptions needs a '-' prefix + } + options = common.parseOptions(options, { + 'e': 'fatal', + 'v': 'verbose', + 'f': 'noglob', + }); + + if (negate) { + Object.keys(options).forEach(function (key) { + options[key] = !options[key]; + }); + } + + Object.keys(options).forEach(function (key) { + // Only change the global config if `negate` is false and the option is true + // or if `negate` is true and the option is false (aka negate !== option) + if (negate !== options[key]) { + common.config[key] = options[key]; + } + }); + return; +} +module.exports = _set; + + +/***/ }), + +/***/ 3786: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +common.register('sort', _sort, { + canReceivePipe: true, + cmdOptions: { + 'r': 'reverse', + 'n': 'numerical', + }, +}); + +// parse out the number prefix of a line +function parseNumber(str) { + var match = str.match(/^\s*(\d*)\s*(.*)$/); + return { num: Number(match[1]), value: match[2] }; +} + +// compare two strings case-insensitively, but examine case for strings that are +// case-insensitive equivalent +function unixCmp(a, b) { + var aLower = a.toLowerCase(); + var bLower = b.toLowerCase(); + return (aLower === bLower ? + -1 * a.localeCompare(b) : // unix sort treats case opposite how javascript does + aLower.localeCompare(bLower)); +} + +// compare two strings in the fashion that unix sort's -n option works +function numericalCmp(a, b) { + var objA = parseNumber(a); + var objB = parseNumber(b); + if (objA.hasOwnProperty('num') && objB.hasOwnProperty('num')) { + return ((objA.num !== objB.num) ? + (objA.num - objB.num) : + unixCmp(objA.value, objB.value)); + } else { + return unixCmp(objA.value, objB.value); + } +} + +//@ +//@ ### sort([options,] file [, file ...]) +//@ ### sort([options,] file_array) +//@ +//@ Available options: +//@ +//@ + `-r`: Reverse the results +//@ + `-n`: Compare according to numerical value +//@ +//@ Examples: +//@ +//@ ```javascript +//@ sort('foo.txt', 'bar.txt'); +//@ sort('-r', 'foo.txt'); +//@ ``` +//@ +//@ Return the contents of the `file`s, sorted line-by-line. Sorting multiple +//@ files mixes their content (just as unix `sort` does). +function _sort(options, files) { + // Check if this is coming from a pipe + var pipe = common.readFromPipe(); + + if (!files && !pipe) common.error('no files given'); + + files = [].slice.call(arguments, 1); + + if (pipe) { + files.unshift('-'); + } + + var lines = files.reduce(function (accum, file) { + if (file !== '-') { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, { continue: true }); + return accum; + } else if (common.statFollowLinks(file).isDirectory()) { + common.error('read failed: ' + file + ': Is a directory', { + continue: true, + }); + return accum; + } + } + + var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); + return accum.concat(contents.trimRight().split('\n')); + }, []); + + var sorted = lines.sort(options.numerical ? numericalCmp : unixCmp); + + if (options.reverse) { + sorted = sorted.reverse(); + } + + return sorted.join('\n') + '\n'; +} + +module.exports = _sort; + + +/***/ }), + +/***/ 59071: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +common.register('tail', _tail, { + canReceivePipe: true, + cmdOptions: { + 'n': 'numLines', + }, +}); + +//@ +//@ ### tail([{'-n': \},] file [, file ...]) +//@ ### tail([{'-n': \},] file_array) +//@ +//@ Available options: +//@ +//@ + `-n `: Show the last `` lines of `file`s +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = tail({'-n': 1}, 'file*.txt'); +//@ var str = tail('file1', 'file2'); +//@ var str = tail(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Read the end of a `file`. +function _tail(options, files) { + var tail = []; + var pipe = common.readFromPipe(); + + if (!files && !pipe) common.error('no paths given'); + + var idx = 1; + if (options.numLines === true) { + idx = 2; + options.numLines = Number(arguments[1]); + } else if (options.numLines === false) { + options.numLines = 10; + } + options.numLines = -1 * Math.abs(options.numLines); + files = [].slice.call(arguments, idx); + + if (pipe) { + files.unshift('-'); + } + + var shouldAppendNewline = false; + files.forEach(function (file) { + if (file !== '-') { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, { continue: true }); + return; + } else if (common.statFollowLinks(file).isDirectory()) { + common.error("error reading '" + file + "': Is a directory", { + continue: true, + }); + return; + } + } + + var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); + + var lines = contents.split('\n'); + if (lines[lines.length - 1] === '') { + lines.pop(); + shouldAppendNewline = true; + } else { + shouldAppendNewline = false; + } + + tail = tail.concat(lines.slice(options.numLines)); + }); + + if (shouldAppendNewline) { + tail.push(''); // to add a trailing newline once we join + } + return tail.join('\n'); +} +module.exports = _tail; + + +/***/ }), + +/***/ 16154: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var os = __nccwpck_require__(22037); +var fs = __nccwpck_require__(57147); + +common.register('tempdir', _tempDir, { + allowGlobbing: false, + wrapOutput: false, +}); + +// Returns false if 'dir' is not a writeable directory, 'dir' otherwise +function writeableDir(dir) { + if (!dir || !fs.existsSync(dir)) return false; + + if (!common.statFollowLinks(dir).isDirectory()) return false; + + var testFile = dir + '/' + common.randomFileName(); + try { + fs.writeFileSync(testFile, ' '); + common.unlinkSync(testFile); + return dir; + } catch (e) { + /* istanbul ignore next */ + return false; + } +} + +// Variable to cache the tempdir value for successive lookups. +var cachedTempDir; + +//@ +//@ ### tempdir() +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var tmp = tempdir(); // "/tmp" for most *nix platforms +//@ ``` +//@ +//@ Searches and returns string containing a writeable, platform-dependent temporary directory. +//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). +function _tempDir() { + if (cachedTempDir) return cachedTempDir; + + cachedTempDir = writeableDir(os.tmpdir()) || + writeableDir(process.env.TMPDIR) || + writeableDir(process.env.TEMP) || + writeableDir(process.env.TMP) || + writeableDir(process.env.Wimp$ScrapDir) || // RiscOS + writeableDir('C:\\TEMP') || // Windows + writeableDir('C:\\TMP') || // Windows + writeableDir('\\TEMP') || // Windows + writeableDir('\\TMP') || // Windows + writeableDir('/tmp') || + writeableDir('/var/tmp') || + writeableDir('/usr/tmp') || + writeableDir('.'); // last resort + + return cachedTempDir; +} + +// Indicates if the tempdir value is currently cached. This is exposed for tests +// only. The return value should only be tested for truthiness. +function isCached() { + return cachedTempDir; +} + +// Clears the cached tempDir value, if one is cached. This is exposed for tests +// only. +function clearCache() { + cachedTempDir = undefined; +} + +module.exports.tempDir = _tempDir; +module.exports.isCached = isCached; +module.exports.clearCache = clearCache; + + +/***/ }), + +/***/ 43349: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +common.register('test', _test, { + cmdOptions: { + 'b': 'block', + 'c': 'character', + 'd': 'directory', + 'e': 'exists', + 'f': 'file', + 'L': 'link', + 'p': 'pipe', + 'S': 'socket', + }, + wrapOutput: false, + allowGlobbing: false, +}); + + +//@ +//@ ### test(expression) +//@ +//@ Available expression primaries: +//@ +//@ + `'-b', 'path'`: true if path is a block device +//@ + `'-c', 'path'`: true if path is a character device +//@ + `'-d', 'path'`: true if path is a directory +//@ + `'-e', 'path'`: true if path exists +//@ + `'-f', 'path'`: true if path is a regular file +//@ + `'-L', 'path'`: true if path is a symbolic link +//@ + `'-p', 'path'`: true if path is a pipe (FIFO) +//@ + `'-S', 'path'`: true if path is a socket +//@ +//@ Examples: +//@ +//@ ```javascript +//@ if (test('-d', path)) { /* do something with dir */ }; +//@ if (!test('-f', path)) continue; // skip if it's a regular file +//@ ``` +//@ +//@ Evaluates `expression` using the available primaries and returns corresponding value. +function _test(options, path) { + if (!path) common.error('no path given'); + + var canInterpret = false; + Object.keys(options).forEach(function (key) { + if (options[key] === true) { + canInterpret = true; + } + }); + + if (!canInterpret) common.error('could not interpret expression'); + + if (options.link) { + try { + return common.statNoFollowLinks(path).isSymbolicLink(); + } catch (e) { + return false; + } + } + + if (!fs.existsSync(path)) return false; + + if (options.exists) return true; + + var stats = common.statFollowLinks(path); + + if (options.block) return stats.isBlockDevice(); + + if (options.character) return stats.isCharacterDevice(); + + if (options.directory) return stats.isDirectory(); + + if (options.file) return stats.isFile(); + + /* istanbul ignore next */ + if (options.pipe) return stats.isFIFO(); + + /* istanbul ignore next */ + if (options.socket) return stats.isSocket(); + + /* istanbul ignore next */ + return false; // fallback +} // test +module.exports = _test; + + +/***/ }), + +/***/ 65722: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); + +common.register('to', _to, { + pipeOnly: true, + wrapOutput: false, +}); + +//@ +//@ ### ShellString.prototype.to(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').to('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirection operator `>` in Unix, but works with +//@ `ShellStrings` (such as those returned by `cat`, `grep`, etc.). _Like Unix +//@ redirections, `to()` will overwrite any existing file!_ +function _to(options, file) { + if (!file) common.error('wrong arguments'); + + if (!fs.existsSync(path.dirname(file))) { + common.error('no such file or directory: ' + path.dirname(file)); + } + + try { + fs.writeFileSync(file, this.stdout || this.toString(), 'utf8'); + return this; + } catch (e) { + /* istanbul ignore next */ + common.error('could not write to file (code ' + e.code + '): ' + file, { continue: true }); + } +} +module.exports = _to; + + +/***/ }), + +/***/ 97366: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); + +common.register('toEnd', _toEnd, { + pipeOnly: true, + wrapOutput: false, +}); + +//@ +//@ ### ShellString.prototype.toEnd(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').toEnd('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with +//@ `ShellStrings` (such as those returned by `cat`, `grep`, etc.). +function _toEnd(options, file) { + if (!file) common.error('wrong arguments'); + + if (!fs.existsSync(path.dirname(file))) { + common.error('no such file or directory: ' + path.dirname(file)); + } + + try { + fs.appendFileSync(file, this.stdout || this.toString(), 'utf8'); + return this; + } catch (e) { + /* istanbul ignore next */ + common.error('could not append to file (code ' + e.code + '): ' + file, { continue: true }); + } +} +module.exports = _toEnd; + + +/***/ }), + +/***/ 23205: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +common.register('touch', _touch, { + cmdOptions: { + 'a': 'atime_only', + 'c': 'no_create', + 'd': 'date', + 'm': 'mtime_only', + 'r': 'reference', + }, +}); + +//@ +//@ ### touch([options,] file [, file ...]) +//@ ### touch([options,] file_array) +//@ +//@ Available options: +//@ +//@ + `-a`: Change only the access time +//@ + `-c`: Do not create any files +//@ + `-m`: Change only the modification time +//@ + `-d DATE`: Parse `DATE` and use it instead of current time +//@ + `-r FILE`: Use `FILE`'s times instead of current time +//@ +//@ Examples: +//@ +//@ ```javascript +//@ touch('source.js'); +//@ touch('-c', '/path/to/some/dir/source.js'); +//@ touch({ '-r': FILE }, '/path/to/some/dir/source.js'); +//@ ``` +//@ +//@ Update the access and modification times of each `FILE` to the current time. +//@ A `FILE` argument that does not exist is created empty, unless `-c` is supplied. +//@ This is a partial implementation of [`touch(1)`](http://linux.die.net/man/1/touch). +function _touch(opts, files) { + if (!files) { + common.error('no files given'); + } else if (typeof files === 'string') { + files = [].slice.call(arguments, 1); + } else { + common.error('file arg should be a string file path or an Array of string file paths'); + } + + files.forEach(function (f) { + touchFile(opts, f); + }); + return ''; +} + +function touchFile(opts, file) { + var stat = tryStatFile(file); + + if (stat && stat.isDirectory()) { + // don't error just exit + return; + } + + // if the file doesn't already exist and the user has specified --no-create then + // this script is finished + if (!stat && opts.no_create) { + return; + } + + // open the file and then close it. this will create it if it doesn't exist but will + // not truncate the file + fs.closeSync(fs.openSync(file, 'a')); + + // + // Set timestamps + // + + // setup some defaults + var now = new Date(); + var mtime = opts.date || now; + var atime = opts.date || now; + + // use reference file + if (opts.reference) { + var refStat = tryStatFile(opts.reference); + if (!refStat) { + common.error('failed to get attributess of ' + opts.reference); + } + mtime = refStat.mtime; + atime = refStat.atime; + } else if (opts.date) { + mtime = opts.date; + atime = opts.date; + } + + if (opts.atime_only && opts.mtime_only) { + // keep the new values of mtime and atime like GNU + } else if (opts.atime_only) { + mtime = stat.mtime; + } else if (opts.mtime_only) { + atime = stat.atime; + } + + fs.utimesSync(file, atime, mtime); +} + +module.exports = _touch; + +function tryStatFile(filePath) { + try { + return common.statFollowLinks(filePath); + } catch (e) { + return null; + } +} + + +/***/ }), + +/***/ 76997: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); + +// add c spaces to the left of str +function lpad(c, str) { + var res = '' + str; + if (res.length < c) { + res = Array((c - res.length) + 1).join(' ') + res; + } + return res; +} + +common.register('uniq', _uniq, { + canReceivePipe: true, + cmdOptions: { + 'i': 'ignoreCase', + 'c': 'count', + 'd': 'duplicates', + }, +}); + +//@ +//@ ### uniq([options,] [input, [output]]) +//@ +//@ Available options: +//@ +//@ + `-i`: Ignore case while comparing +//@ + `-c`: Prefix lines by the number of occurrences +//@ + `-d`: Only print duplicate lines, one for each group of identical lines +//@ +//@ Examples: +//@ +//@ ```javascript +//@ uniq('foo.txt'); +//@ uniq('-i', 'foo.txt'); +//@ uniq('-cd', 'foo.txt', 'bar.txt'); +//@ ``` +//@ +//@ Filter adjacent matching lines from `input`. +function _uniq(options, input, output) { + // Check if this is coming from a pipe + var pipe = common.readFromPipe(); + + if (!pipe) { + if (!input) common.error('no input given'); + + if (!fs.existsSync(input)) { + common.error(input + ': No such file or directory'); + } else if (common.statFollowLinks(input).isDirectory()) { + common.error("error reading '" + input + "'"); + } + } + if (output && fs.existsSync(output) && common.statFollowLinks(output).isDirectory()) { + common.error(output + ': Is a directory'); + } + + var lines = (input ? fs.readFileSync(input, 'utf8') : pipe). + trimRight(). + split('\n'); + + var compare = function (a, b) { + return options.ignoreCase ? + a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase()) : + a.localeCompare(b); + }; + var uniqed = lines.reduceRight(function (res, e) { + // Perform uniq -c on the input + if (res.length === 0) { + return [{ count: 1, ln: e }]; + } else if (compare(res[0].ln, e) === 0) { + return [{ count: res[0].count + 1, ln: e }].concat(res.slice(1)); + } else { + return [{ count: 1, ln: e }].concat(res); + } + }, []).filter(function (obj) { + // Do we want only duplicated objects? + return options.duplicates ? obj.count > 1 : true; + }).map(function (obj) { + // Are we tracking the counts of each line? + return (options.count ? (lpad(7, obj.count) + ' ') : '') + obj.ln; + }).join('\n') + '\n'; + + if (output) { + (new common.ShellString(uniqed)).to(output); + // if uniq writes to output, nothing is passed to the next command in the pipeline (if any) + return ''; + } else { + return uniqed; + } +} + +module.exports = _uniq; + + +/***/ }), + +/***/ 61767: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(5328); +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); + +common.register('which', _which, { + allowGlobbing: false, + cmdOptions: { + 'a': 'all', + }, +}); + +// XP's system default value for `PATHEXT` system variable, just in case it's not +// set on Windows. +var XP_DEFAULT_PATHEXT = '.com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh'; + +// For earlier versions of NodeJS that doesn't have a list of constants (< v6) +var FILE_EXECUTABLE_MODE = 1; + +function isWindowsPlatform() { + return process.platform === 'win32'; +} + +// Cross-platform method for splitting environment `PATH` variables +function splitPath(p) { + return p ? p.split(path.delimiter) : []; +} + +// Tests are running all cases for this func but it stays uncovered by codecov due to unknown reason +/* istanbul ignore next */ +function isExecutable(pathName) { + try { + // TODO(node-support): replace with fs.constants.X_OK once remove support for node < v6 + fs.accessSync(pathName, FILE_EXECUTABLE_MODE); + } catch (err) { + return false; + } + return true; +} + +function checkPath(pathName) { + return fs.existsSync(pathName) && !common.statFollowLinks(pathName).isDirectory() + && (isWindowsPlatform() || isExecutable(pathName)); +} + +//@ +//@ ### which(command) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var nodeExec = which('node'); +//@ ``` +//@ +//@ Searches for `command` in the system's `PATH`. On Windows, this uses the +//@ `PATHEXT` variable to append the extension if it's not already executable. +//@ Returns string containing the absolute path to `command`. +function _which(options, cmd) { + if (!cmd) common.error('must specify command'); + + var isWindows = isWindowsPlatform(); + var pathArray = splitPath(process.env.PATH); + + var queryMatches = []; + + // No relative/absolute paths provided? + if (cmd.indexOf('/') === -1) { + // Assume that there are no extensions to append to queries (this is the + // case for unix) + var pathExtArray = ['']; + if (isWindows) { + // In case the PATHEXT variable is somehow not set (e.g. + // child_process.spawn with an empty environment), use the XP default. + var pathExtEnv = process.env.PATHEXT || XP_DEFAULT_PATHEXT; + pathExtArray = splitPath(pathExtEnv.toUpperCase()); + } + + // Search for command in PATH + for (var k = 0; k < pathArray.length; k++) { + // already found it + if (queryMatches.length > 0 && !options.all) break; + + var attempt = path.resolve(pathArray[k], cmd); + + if (isWindows) { + attempt = attempt.toUpperCase(); + } + + var match = attempt.match(/\.[^<>:"/\|?*.]+$/); + if (match && pathExtArray.indexOf(match[0]) >= 0) { // this is Windows-only + // The user typed a query with the file extension, like + // `which('node.exe')` + if (checkPath(attempt)) { + queryMatches.push(attempt); + break; + } + } else { // All-platforms + // Cycle through the PATHEXT array, and check each extension + // Note: the array is always [''] on Unix + for (var i = 0; i < pathExtArray.length; i++) { + var ext = pathExtArray[i]; + var newAttempt = attempt + ext; + if (checkPath(newAttempt)) { + queryMatches.push(newAttempt); + break; + } + } + } + } + } else if (checkPath(cmd)) { // a valid absolute or relative path + queryMatches.push(path.resolve(cmd)); + } + + if (queryMatches.length > 0) { + return options.all ? queryMatches : queryMatches[0]; + } + return options.all ? [] : null; +} +module.exports = _which; + + +/***/ }), + +/***/ 6644: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// 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 = __nccwpck_require__(39491) +var signals = __nccwpck_require__(42365) +var isWin = /^win/i.test(process.platform) + +var EE = __nccwpck_require__(82361) +/* 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 */ + if (isWin && sig === 'SIGHUP') { + // "SIGHUP" throws an `ENOSYS` error on Windows, + // so use a supported signal instead + sig = 'SIGINT' + } + 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) + } +} + + +/***/ }), + +/***/ 42365: +/***/ ((module) => { + +// 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' + ) +} + + +/***/ }), + +/***/ 67625: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +var Buffer = (__nccwpck_require__(77556).Buffer); + +var algInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y'], + sizePart: 'p' + }, + 'rsa': { + parts: ['e', 'n'], + sizePart: 'n' + }, + 'ecdsa': { + parts: ['curve', 'Q'], + sizePart: 'Q' + }, + 'ed25519': { + parts: ['A'], + sizePart: 'A' + } +}; +algInfo['curve25519'] = algInfo['ed25519']; + +var algPrivInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y', 'x'] + }, + 'rsa': { + parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] + }, + 'ecdsa': { + parts: ['curve', 'Q', 'd'] + }, + 'ed25519': { + parts: ['A', 'k'] + } +}; +algPrivInfo['curve25519'] = algPrivInfo['ed25519']; + +var hashAlgs = { + 'md5': true, + 'sha1': true, + 'sha256': true, + 'sha384': true, + 'sha512': true +}; + +/* + * Taken from + * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf + */ +var curves = { + 'nistp256': { + size: 256, + pkcs8oid: '1.2.840.10045.3.1.7', + p: Buffer.from(('00' + + 'ffffffff 00000001 00000000 00000000' + + '00000000 ffffffff ffffffff ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF 00000001 00000000 00000000' + + '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + + '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'c49d3608 86e70493 6a6678e1 139d26b7' + + '819f7e90'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff 00000000 ffffffff ffffffff' + + 'bce6faad a7179e84 f3b9cac2 fc632551'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + + '77037d81 2deb33a0 f4a13945 d898c296' + + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + + '2bce3357 6b315ece cbb64068 37bf51f5'). + replace(/ /g, ''), 'hex') + }, + 'nistp384': { + size: 384, + pkcs8oid: '1.3.132.0.34', + p: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffe' + + 'ffffffff 00000000 00000000 ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + + 'FFFFFFFF 00000000 00000000 FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + 'b3312fa7 e23ee7e4 988e056b e3f82d19' + + '181d9c6e fe814112 0314088f 5013875a' + + 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'a335926a a319a27a 1d00896a 6773a482' + + '7acdac73'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff c7634d81 f4372ddf' + + '581a0db2 48b0a77a ecec196a ccc52973'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + 'aa87ca22 be8b0537 8eb1c71e f320ad74' + + '6e1d3b62 8ba79b98 59f741e0 82542a38' + + '5502f25d bf55296c 3a545e38 72760ab7' + + '3617de4a 96262c6f 5d9e98bf 9292dc29' + + 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). + replace(/ /g, ''), 'hex') + }, + 'nistp521': { + size: 521, + pkcs8oid: '1.3.132.0.35', + p: Buffer.from(( + '01ffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffff').replace(/ /g, ''), 'hex'), + a: Buffer.from(('01FF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(('51' + + '953eb961 8e1c9a1f 929a21a0 b68540ee' + + 'a2da725b 99b315f3 b8b48991 8ef109e1' + + '56193951 ec7e937b 1652c0bd 3bb1bf07' + + '3573df88 3d2c34f1 ef451fd4 6b503f00'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'd09e8800 291cb853 96cc6717 393284aa' + + 'a0da64ba').replace(/ /g, ''), 'hex'), + n: Buffer.from(('01ff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffa' + + '51868783 bf2f966b 7fcc0148 f709a5d0' + + '3bb5c9b8 899c47ae bb6fb71e 91386409'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + + '9c648139 053fb521 f828af60 6b4d3dba' + + 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + + '3348b3c1 856a429b f97e7e31 c2e5bd66' + + '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + + '98f54449 579b4468 17afbd17 273e662c' + + '97ee7299 5ef42640 c550b901 3fad0761' + + '353c7086 a272c240 88be9476 9fd16650'). + replace(/ /g, ''), 'hex') + } +}; + +module.exports = { + info: algInfo, + privInfo: algPrivInfo, + hashAlgs: hashAlgs, + curves: curves +}; + + +/***/ }), + +/***/ 43671: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2016 Joyent, Inc. + +module.exports = Certificate; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var crypto = __nccwpck_require__(6113); +var Fingerprint = __nccwpck_require__(54442); +var Signature = __nccwpck_require__(5403); +var errs = __nccwpck_require__(67782); +var util = __nccwpck_require__(73837); +var utils = __nccwpck_require__(8085); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var Identity = __nccwpck_require__(37046); + +var formats = {}; +formats['openssh'] = __nccwpck_require__(72553); +formats['x509'] = __nccwpck_require__(3599); +formats['pem'] = __nccwpck_require__(19238); + +var CertificateParseError = errs.CertificateParseError; +var InvalidAlgorithmError = errs.InvalidAlgorithmError; + +function Certificate(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.subjects, 'options.subjects'); + utils.assertCompatible(opts.subjects[0], Identity, [1, 0], + 'options.subjects'); + utils.assertCompatible(opts.subjectKey, Key, [1, 0], + 'options.subjectKey'); + utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer'); + if (opts.issuerKey !== undefined) { + utils.assertCompatible(opts.issuerKey, Key, [1, 0], + 'options.issuerKey'); + } + assert.object(opts.signatures, 'options.signatures'); + assert.buffer(opts.serial, 'options.serial'); + assert.date(opts.validFrom, 'options.validFrom'); + assert.date(opts.validUntil, 'optons.validUntil'); + + assert.optionalArrayOfString(opts.purposes, 'options.purposes'); + + this._hashCache = {}; + + this.subjects = opts.subjects; + this.issuer = opts.issuer; + this.subjectKey = opts.subjectKey; + this.issuerKey = opts.issuerKey; + this.signatures = opts.signatures; + this.serial = opts.serial; + this.validFrom = opts.validFrom; + this.validUntil = opts.validUntil; + this.purposes = opts.purposes; +} + +Certificate.formats = formats; + +Certificate.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'x509'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + return (formats[format].write(this, options)); +}; + +Certificate.prototype.toString = function (format, options) { + if (format === undefined) + format = 'pem'; + return (this.toBuffer(format, options).toString()); +}; + +Certificate.prototype.fingerprint = function (algo) { + if (algo === undefined) + algo = 'sha256'; + assert.string(algo, 'algorithm'); + var opts = { + type: 'certificate', + hash: this.hash(algo), + algorithm: algo + }; + return (new Fingerprint(opts)); +}; + +Certificate.prototype.hash = function (algo) { + assert.string(algo, 'algorithm'); + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === undefined) + throw (new InvalidAlgorithmError(algo)); + + if (this._hashCache[algo]) + return (this._hashCache[algo]); + + var hash = crypto.createHash(algo). + update(this.toBuffer('x509')).digest(); + this._hashCache[algo] = hash; + return (hash); +}; + +Certificate.prototype.isExpired = function (when) { + if (when === undefined) + when = new Date(); + return (!((when.getTime() >= this.validFrom.getTime()) && + (when.getTime() < this.validUntil.getTime()))); +}; + +Certificate.prototype.isSignedBy = function (issuerCert) { + utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer'); + + if (!this.issuer.equals(issuerCert.subjects[0])) + return (false); + if (this.issuer.purposes && this.issuer.purposes.length > 0 && + this.issuer.purposes.indexOf('ca') === -1) { + return (false); + } + + return (this.isSignedByKey(issuerCert.subjectKey)); +}; + +Certificate.prototype.getExtension = function (keyOrOid) { + assert.string(keyOrOid, 'keyOrOid'); + var ext = this.getExtensions().filter(function (maybeExt) { + if (maybeExt.format === 'x509') + return (maybeExt.oid === keyOrOid); + if (maybeExt.format === 'openssh') + return (maybeExt.name === keyOrOid); + return (false); + })[0]; + return (ext); +}; + +Certificate.prototype.getExtensions = function () { + var exts = []; + var x509 = this.signatures.x509; + if (x509 && x509.extras && x509.extras.exts) { + x509.extras.exts.forEach(function (ext) { + ext.format = 'x509'; + exts.push(ext); + }); + } + var openssh = this.signatures.openssh; + if (openssh && openssh.exts) { + openssh.exts.forEach(function (ext) { + ext.format = 'openssh'; + exts.push(ext); + }); + } + return (exts); +}; + +Certificate.prototype.isSignedByKey = function (issuerKey) { + utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey'); + + if (this.issuerKey !== undefined) { + return (this.issuerKey. + fingerprint('sha512').matches(issuerKey)); + } + + var fmt = Object.keys(this.signatures)[0]; + var valid = formats[fmt].verify(this, issuerKey); + if (valid) + this.issuerKey = issuerKey; + return (valid); +}; + +Certificate.prototype.signWith = function (key) { + utils.assertCompatible(key, PrivateKey, [1, 2], 'key'); + var fmts = Object.keys(formats); + var didOne = false; + for (var i = 0; i < fmts.length; ++i) { + if (fmts[i] !== 'pem') { + var ret = formats[fmts[i]].sign(this, key); + if (ret === true) + didOne = true; + } + } + if (!didOne) { + throw (new Error('Failed to sign the certificate for any ' + + 'available certificate formats')); + } +}; + +Certificate.createSelfSigned = function (subjectOrSubjects, key, options) { + var subjects; + if (Array.isArray(subjectOrSubjects)) + subjects = subjectOrSubjects; + else + subjects = [subjectOrSubjects]; + + assert.arrayOfObject(subjects); + subjects.forEach(function (subject) { + utils.assertCompatible(subject, Identity, [1, 0], 'subject'); + }); + + utils.assertCompatible(key, PrivateKey, [1, 2], 'private key'); + + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalObject(options.validFrom, 'options.validFrom'); + assert.optionalObject(options.validUntil, 'options.validUntil'); + var validFrom = options.validFrom; + var validUntil = options.validUntil; + if (validFrom === undefined) + validFrom = new Date(); + if (validUntil === undefined) { + assert.optionalNumber(options.lifetime, 'options.lifetime'); + var lifetime = options.lifetime; + if (lifetime === undefined) + lifetime = 10*365*24*3600; + validUntil = new Date(); + validUntil.setTime(validUntil.getTime() + lifetime*1000); + } + assert.optionalBuffer(options.serial, 'options.serial'); + var serial = options.serial; + if (serial === undefined) + serial = Buffer.from('0000000000000001', 'hex'); + + var purposes = options.purposes; + if (purposes === undefined) + purposes = []; + + if (purposes.indexOf('signature') === -1) + purposes.push('signature'); + + /* Self-signed certs are always CAs. */ + if (purposes.indexOf('ca') === -1) + purposes.push('ca'); + if (purposes.indexOf('crl') === -1) + purposes.push('crl'); + + /* + * If we weren't explicitly given any other purposes, do the sensible + * thing and add some basic ones depending on the subject type. + */ + if (purposes.length <= 3) { + var hostSubjects = subjects.filter(function (subject) { + return (subject.type === 'host'); + }); + var userSubjects = subjects.filter(function (subject) { + return (subject.type === 'user'); + }); + if (hostSubjects.length > 0) { + if (purposes.indexOf('serverAuth') === -1) + purposes.push('serverAuth'); + } + if (userSubjects.length > 0) { + if (purposes.indexOf('clientAuth') === -1) + purposes.push('clientAuth'); + } + if (userSubjects.length > 0 || hostSubjects.length > 0) { + if (purposes.indexOf('keyAgreement') === -1) + purposes.push('keyAgreement'); + if (key.type === 'rsa' && + purposes.indexOf('encryption') === -1) + purposes.push('encryption'); + } + } + + var cert = new Certificate({ + subjects: subjects, + issuer: subjects[0], + subjectKey: key.toPublic(), + issuerKey: key.toPublic(), + signatures: {}, + serial: serial, + validFrom: validFrom, + validUntil: validUntil, + purposes: purposes + }); + cert.signWith(key); + + return (cert); +}; + +Certificate.create = + function (subjectOrSubjects, key, issuer, issuerKey, options) { + var subjects; + if (Array.isArray(subjectOrSubjects)) + subjects = subjectOrSubjects; + else + subjects = [subjectOrSubjects]; + + assert.arrayOfObject(subjects); + subjects.forEach(function (subject) { + utils.assertCompatible(subject, Identity, [1, 0], 'subject'); + }); + + utils.assertCompatible(key, Key, [1, 0], 'key'); + if (PrivateKey.isPrivateKey(key)) + key = key.toPublic(); + utils.assertCompatible(issuer, Identity, [1, 0], 'issuer'); + utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key'); + + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalObject(options.validFrom, 'options.validFrom'); + assert.optionalObject(options.validUntil, 'options.validUntil'); + var validFrom = options.validFrom; + var validUntil = options.validUntil; + if (validFrom === undefined) + validFrom = new Date(); + if (validUntil === undefined) { + assert.optionalNumber(options.lifetime, 'options.lifetime'); + var lifetime = options.lifetime; + if (lifetime === undefined) + lifetime = 10*365*24*3600; + validUntil = new Date(); + validUntil.setTime(validUntil.getTime() + lifetime*1000); + } + assert.optionalBuffer(options.serial, 'options.serial'); + var serial = options.serial; + if (serial === undefined) + serial = Buffer.from('0000000000000001', 'hex'); + + var purposes = options.purposes; + if (purposes === undefined) + purposes = []; + + if (purposes.indexOf('signature') === -1) + purposes.push('signature'); + + if (options.ca === true) { + if (purposes.indexOf('ca') === -1) + purposes.push('ca'); + if (purposes.indexOf('crl') === -1) + purposes.push('crl'); + } + + var hostSubjects = subjects.filter(function (subject) { + return (subject.type === 'host'); + }); + var userSubjects = subjects.filter(function (subject) { + return (subject.type === 'user'); + }); + if (hostSubjects.length > 0) { + if (purposes.indexOf('serverAuth') === -1) + purposes.push('serverAuth'); + } + if (userSubjects.length > 0) { + if (purposes.indexOf('clientAuth') === -1) + purposes.push('clientAuth'); + } + if (userSubjects.length > 0 || hostSubjects.length > 0) { + if (purposes.indexOf('keyAgreement') === -1) + purposes.push('keyAgreement'); + if (key.type === 'rsa' && + purposes.indexOf('encryption') === -1) + purposes.push('encryption'); + } + + var cert = new Certificate({ + subjects: subjects, + issuer: issuer, + subjectKey: key, + issuerKey: issuerKey.toPublic(), + signatures: {}, + serial: serial, + validFrom: validFrom, + validUntil: validUntil, + purposes: purposes + }); + cert.signWith(issuerKey); + + return (cert); +}; + +Certificate.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + return (k); + } catch (e) { + throw (new CertificateParseError(options.filename, format, e)); + } +}; + +Certificate.isCertificate = function (obj, ver) { + return (utils.isCompatible(obj, Certificate, ver)); +}; + +/* + * API versions for Certificate: + * [1,0] -- initial ver + * [1,1] -- openssh format now unpacks extensions + */ +Certificate.prototype._sshpkApiVersion = [1, 1]; + +Certificate._oldVersionDetect = function (obj) { + return ([1, 0]); +}; + + +/***/ }), + +/***/ 24527: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2017 Joyent, Inc. + +module.exports = { + DiffieHellman: DiffieHellman, + generateECDSA: generateECDSA, + generateED25519: generateED25519 +}; + +var assert = __nccwpck_require__(41706); +var crypto = __nccwpck_require__(6113); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var utils = __nccwpck_require__(8085); +var nacl = __nccwpck_require__(59595); + +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); + +var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); + +var ecdh = __nccwpck_require__(13781); +var ec = __nccwpck_require__(68592); +var jsbn = (__nccwpck_require__(42934).BigInteger); + +function DiffieHellman(key) { + utils.assertCompatible(key, Key, [1, 4], 'key'); + this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); + this._algo = key.type; + this._curve = key.curve; + this._key = key; + if (key.type === 'dsa') { + if (!CRYPTO_HAVE_ECDH) { + throw (new Error('Due to bugs in the node 0.10 ' + + 'crypto API, node 0.12.x or later is required ' + + 'to use DH')); + } + this._dh = crypto.createDiffieHellman( + key.part.p.data, undefined, + key.part.g.data, undefined); + this._p = key.part.p; + this._g = key.part.g; + if (this._isPriv) + this._dh.setPrivateKey(key.part.x.data); + this._dh.setPublicKey(key.part.y.data); + + } else if (key.type === 'ecdsa') { + if (!CRYPTO_HAVE_ECDH) { + this._ecParams = new X9ECParameters(this._curve); + + if (this._isPriv) { + this._priv = new ECPrivate( + this._ecParams, key.part.d.data); + } + return; + } + + var curve = { + 'nistp256': 'prime256v1', + 'nistp384': 'secp384r1', + 'nistp521': 'secp521r1' + }[key.curve]; + this._dh = crypto.createECDH(curve); + if (typeof (this._dh) !== 'object' || + typeof (this._dh.setPrivateKey) !== 'function') { + CRYPTO_HAVE_ECDH = false; + DiffieHellman.call(this, key); + return; + } + if (this._isPriv) + this._dh.setPrivateKey(key.part.d.data); + this._dh.setPublicKey(key.part.Q.data); + + } else if (key.type === 'curve25519') { + if (this._isPriv) { + utils.assertCompatible(key, PrivateKey, [1, 5], 'key'); + this._priv = key.part.k.data; + } + + } else { + throw (new Error('DH not supported for ' + key.type + ' keys')); + } +} + +DiffieHellman.prototype.getPublicKey = function () { + if (this._isPriv) + return (this._key.toPublic()); + return (this._key); +}; + +DiffieHellman.prototype.getPrivateKey = function () { + if (this._isPriv) + return (this._key); + else + return (undefined); +}; +DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; + +DiffieHellman.prototype._keyCheck = function (pk, isPub) { + assert.object(pk, 'key'); + if (!isPub) + utils.assertCompatible(pk, PrivateKey, [1, 3], 'key'); + utils.assertCompatible(pk, Key, [1, 4], 'key'); + + if (pk.type !== this._algo) { + throw (new Error('A ' + pk.type + ' key cannot be used in ' + + this._algo + ' Diffie-Hellman')); + } + + if (pk.curve !== this._curve) { + throw (new Error('A key from the ' + pk.curve + ' curve ' + + 'cannot be used with a ' + this._curve + + ' Diffie-Hellman')); + } + + if (pk.type === 'dsa') { + assert.deepEqual(pk.part.p, this._p, + 'DSA key prime does not match'); + assert.deepEqual(pk.part.g, this._g, + 'DSA key generator does not match'); + } +}; + +DiffieHellman.prototype.setKey = function (pk) { + this._keyCheck(pk); + + if (pk.type === 'dsa') { + this._dh.setPrivateKey(pk.part.x.data); + this._dh.setPublicKey(pk.part.y.data); + + } else if (pk.type === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + this._dh.setPrivateKey(pk.part.d.data); + this._dh.setPublicKey(pk.part.Q.data); + } else { + this._priv = new ECPrivate( + this._ecParams, pk.part.d.data); + } + + } else if (pk.type === 'curve25519') { + var k = pk.part.k; + if (!pk.part.k) + k = pk.part.r; + this._priv = k.data; + if (this._priv[0] === 0x00) + this._priv = this._priv.slice(1); + this._priv = this._priv.slice(0, 32); + } + this._key = pk; + this._isPriv = true; +}; +DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; + +DiffieHellman.prototype.computeSecret = function (otherpk) { + this._keyCheck(otherpk, true); + if (!this._isPriv) + throw (new Error('DH exchange has not been initialized with ' + + 'a private key yet')); + + var pub; + if (this._algo === 'dsa') { + return (this._dh.computeSecret( + otherpk.part.y.data)); + + } else if (this._algo === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + return (this._dh.computeSecret( + otherpk.part.Q.data)); + } else { + pub = new ECPublic( + this._ecParams, otherpk.part.Q.data); + return (this._priv.deriveSharedSecret(pub)); + } + + } else if (this._algo === 'curve25519') { + pub = otherpk.part.A.data; + while (pub[0] === 0x00 && pub.length > 32) + pub = pub.slice(1); + var priv = this._priv; + assert.strictEqual(pub.length, 32); + assert.strictEqual(priv.length, 32); + + var secret = nacl.box.before(new Uint8Array(pub), + new Uint8Array(priv)); + + return (Buffer.from(secret)); + } + + throw (new Error('Invalid algorithm: ' + this._algo)); +}; + +DiffieHellman.prototype.generateKey = function () { + var parts = []; + var priv, pub; + if (this._algo === 'dsa') { + this._dh.generateKeys(); + + parts.push({name: 'p', data: this._p.data}); + parts.push({name: 'q', data: this._key.part.q.data}); + parts.push({name: 'g', data: this._g.data}); + parts.push({name: 'y', data: this._dh.getPublicKey()}); + parts.push({name: 'x', data: this._dh.getPrivateKey()}); + this._key = new PrivateKey({ + type: 'dsa', + parts: parts + }); + this._isPriv = true; + return (this._key); + + } else if (this._algo === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + this._dh.generateKeys(); + + parts.push({name: 'curve', + data: Buffer.from(this._curve)}); + parts.push({name: 'Q', data: this._dh.getPublicKey()}); + parts.push({name: 'd', data: this._dh.getPrivateKey()}); + this._key = new PrivateKey({ + type: 'ecdsa', + curve: this._curve, + parts: parts + }); + this._isPriv = true; + return (this._key); + + } else { + var n = this._ecParams.getN(); + var r = new jsbn(crypto.randomBytes(n.bitLength())); + var n1 = n.subtract(jsbn.ONE); + priv = r.mod(n1).add(jsbn.ONE); + pub = this._ecParams.getG().multiply(priv); + + priv = Buffer.from(priv.toByteArray()); + pub = Buffer.from(this._ecParams.getCurve(). + encodePointHex(pub), 'hex'); + + this._priv = new ECPrivate(this._ecParams, priv); + + parts.push({name: 'curve', + data: Buffer.from(this._curve)}); + parts.push({name: 'Q', data: pub}); + parts.push({name: 'd', data: priv}); + + this._key = new PrivateKey({ + type: 'ecdsa', + curve: this._curve, + parts: parts + }); + this._isPriv = true; + return (this._key); + } + + } else if (this._algo === 'curve25519') { + var pair = nacl.box.keyPair(); + priv = Buffer.from(pair.secretKey); + pub = Buffer.from(pair.publicKey); + priv = Buffer.concat([priv, pub]); + assert.strictEqual(priv.length, 64); + assert.strictEqual(pub.length, 32); + + parts.push({name: 'A', data: pub}); + parts.push({name: 'k', data: priv}); + this._key = new PrivateKey({ + type: 'curve25519', + parts: parts + }); + this._isPriv = true; + return (this._key); + } + + throw (new Error('Invalid algorithm: ' + this._algo)); +}; +DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; + +/* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */ + +function X9ECParameters(name) { + var params = algs.curves[name]; + assert.object(params); + + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var n = new jsbn(params.n); + var h = jsbn.ONE; + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString('hex')); + + this.curve = curve; + this.g = G; + this.n = n; + this.h = h; +} +X9ECParameters.prototype.getCurve = function () { return (this.curve); }; +X9ECParameters.prototype.getG = function () { return (this.g); }; +X9ECParameters.prototype.getN = function () { return (this.n); }; +X9ECParameters.prototype.getH = function () { return (this.h); }; + +function ECPublic(params, buffer) { + this._params = params; + if (buffer[0] === 0x00) + buffer = buffer.slice(1); + this._pub = params.getCurve().decodePointHex(buffer.toString('hex')); +} + +function ECPrivate(params, buffer) { + this._params = params; + this._priv = new jsbn(utils.mpNormalize(buffer)); +} +ECPrivate.prototype.deriveSharedSecret = function (pubKey) { + assert.ok(pubKey instanceof ECPublic); + var S = pubKey._pub.multiply(this._priv); + return (Buffer.from(S.getX().toBigInteger().toByteArray())); +}; + +function generateED25519() { + var pair = nacl.sign.keyPair(); + var priv = Buffer.from(pair.secretKey); + var pub = Buffer.from(pair.publicKey); + assert.strictEqual(priv.length, 64); + assert.strictEqual(pub.length, 32); + + var parts = []; + parts.push({name: 'A', data: pub}); + parts.push({name: 'k', data: priv.slice(0, 32)}); + var key = new PrivateKey({ + type: 'ed25519', + parts: parts + }); + return (key); +} + +/* Generates a new ECDSA private key on a given curve. */ +function generateECDSA(curve) { + var parts = []; + var key; + + if (CRYPTO_HAVE_ECDH) { + /* + * Node crypto doesn't expose key generation directly, but the + * ECDH instances can generate keys. It turns out this just + * calls into the OpenSSL generic key generator, and we can + * read its output happily without doing an actual DH. So we + * use that here. + */ + var osCurve = { + 'nistp256': 'prime256v1', + 'nistp384': 'secp384r1', + 'nistp521': 'secp521r1' + }[curve]; + + var dh = crypto.createECDH(osCurve); + dh.generateKeys(); + + parts.push({name: 'curve', + data: Buffer.from(curve)}); + parts.push({name: 'Q', data: dh.getPublicKey()}); + parts.push({name: 'd', data: dh.getPrivateKey()}); + + key = new PrivateKey({ + type: 'ecdsa', + curve: curve, + parts: parts + }); + return (key); + } else { + + var ecParams = new X9ECParameters(curve); + + /* This algorithm taken from FIPS PUB 186-4 (section B.4.1) */ + var n = ecParams.getN(); + /* + * The crypto.randomBytes() function can only give us whole + * bytes, so taking a nod from X9.62, we round up. + */ + var cByteLen = Math.ceil((n.bitLength() + 64) / 8); + var c = new jsbn(crypto.randomBytes(cByteLen)); + + var n1 = n.subtract(jsbn.ONE); + var priv = c.mod(n1).add(jsbn.ONE); + var pub = ecParams.getG().multiply(priv); + + priv = Buffer.from(priv.toByteArray()); + pub = Buffer.from(ecParams.getCurve(). + encodePointHex(pub), 'hex'); + + parts.push({name: 'curve', data: Buffer.from(curve)}); + parts.push({name: 'Q', data: pub}); + parts.push({name: 'd', data: priv}); + + key = new PrivateKey({ + type: 'ecdsa', + curve: curve, + parts: parts + }); + return (key); + } +} + + +/***/ }), + +/***/ 58801: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + Verifier: Verifier, + Signer: Signer +}; + +var nacl = __nccwpck_require__(59595); +var stream = __nccwpck_require__(12781); +var util = __nccwpck_require__(73837); +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var Signature = __nccwpck_require__(5403); + +function Verifier(key, hashAlgo) { + if (hashAlgo.toLowerCase() !== 'sha512') + throw (new Error('ED25519 only supports the use of ' + + 'SHA-512 hashes')); + + this.key = key; + this.chunks = []; + + stream.Writable.call(this, {}); +} +util.inherits(Verifier, stream.Writable); + +Verifier.prototype._write = function (chunk, enc, cb) { + this.chunks.push(chunk); + cb(); +}; + +Verifier.prototype.update = function (chunk) { + if (typeof (chunk) === 'string') + chunk = Buffer.from(chunk, 'binary'); + this.chunks.push(chunk); +}; + +Verifier.prototype.verify = function (signature, fmt) { + var sig; + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== 'ed25519') + return (false); + sig = signature.toBuffer('raw'); + + } else if (typeof (signature) === 'string') { + sig = Buffer.from(signature, 'base64'); + + } else if (Signature.isSignature(signature, [1, 0])) { + throw (new Error('signature was created by too old ' + + 'a version of sshpk and cannot be verified')); + } + + assert.buffer(sig); + return (nacl.sign.detached.verify( + new Uint8Array(Buffer.concat(this.chunks)), + new Uint8Array(sig), + new Uint8Array(this.key.part.A.data))); +}; + +function Signer(key, hashAlgo) { + if (hashAlgo.toLowerCase() !== 'sha512') + throw (new Error('ED25519 only supports the use of ' + + 'SHA-512 hashes')); + + this.key = key; + this.chunks = []; + + stream.Writable.call(this, {}); +} +util.inherits(Signer, stream.Writable); + +Signer.prototype._write = function (chunk, enc, cb) { + this.chunks.push(chunk); + cb(); +}; + +Signer.prototype.update = function (chunk) { + if (typeof (chunk) === 'string') + chunk = Buffer.from(chunk, 'binary'); + this.chunks.push(chunk); +}; + +Signer.prototype.sign = function () { + var sig = nacl.sign.detached( + new Uint8Array(Buffer.concat(this.chunks)), + new Uint8Array(Buffer.concat([ + this.key.part.k.data, this.key.part.A.data]))); + var sigBuf = Buffer.from(sig); + var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw'); + sigObj.hashAlgorithm = 'sha512'; + return (sigObj); +}; + + +/***/ }), + +/***/ 67782: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +var assert = __nccwpck_require__(41706); +var util = __nccwpck_require__(73837); + +function FingerprintFormatError(fp, format) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, FingerprintFormatError); + this.name = 'FingerprintFormatError'; + this.fingerprint = fp; + this.format = format; + this.message = 'Fingerprint format is not supported, or is invalid: '; + if (fp !== undefined) + this.message += ' fingerprint = ' + fp; + if (format !== undefined) + this.message += ' format = ' + format; +} +util.inherits(FingerprintFormatError, Error); + +function InvalidAlgorithmError(alg) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, InvalidAlgorithmError); + this.name = 'InvalidAlgorithmError'; + this.algorithm = alg; + this.message = 'Algorithm "' + alg + '" is not supported'; +} +util.inherits(InvalidAlgorithmError, Error); + +function KeyParseError(name, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, KeyParseError); + this.name = 'KeyParseError'; + this.format = format; + this.keyName = name; + this.innerErr = innerErr; + this.message = 'Failed to parse ' + name + ' as a valid ' + format + + ' format key: ' + innerErr.message; +} +util.inherits(KeyParseError, Error); + +function SignatureParseError(type, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, SignatureParseError); + this.name = 'SignatureParseError'; + this.type = type; + this.format = format; + this.innerErr = innerErr; + this.message = 'Failed to parse the given data as a ' + type + + ' signature in ' + format + ' format: ' + innerErr.message; +} +util.inherits(SignatureParseError, Error); + +function CertificateParseError(name, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, CertificateParseError); + this.name = 'CertificateParseError'; + this.format = format; + this.certName = name; + this.innerErr = innerErr; + this.message = 'Failed to parse ' + name + ' as a valid ' + format + + ' format certificate: ' + innerErr.message; +} +util.inherits(CertificateParseError, Error); + +function KeyEncryptedError(name, format) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, KeyEncryptedError); + this.name = 'KeyEncryptedError'; + this.format = format; + this.keyName = name; + this.message = 'The ' + format + ' format key ' + name + ' is ' + + 'encrypted (password-protected), and no passphrase was ' + + 'provided in `options`'; +} +util.inherits(KeyEncryptedError, Error); + +module.exports = { + FingerprintFormatError: FingerprintFormatError, + InvalidAlgorithmError: InvalidAlgorithmError, + KeyParseError: KeyParseError, + SignatureParseError: SignatureParseError, + KeyEncryptedError: KeyEncryptedError, + CertificateParseError: CertificateParseError +}; + + +/***/ }), + +/***/ 54442: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2018 Joyent, Inc. + +module.exports = Fingerprint; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var crypto = __nccwpck_require__(6113); +var errs = __nccwpck_require__(67782); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var Certificate = __nccwpck_require__(43671); +var utils = __nccwpck_require__(8085); + +var FingerprintFormatError = errs.FingerprintFormatError; +var InvalidAlgorithmError = errs.InvalidAlgorithmError; + +function Fingerprint(opts) { + assert.object(opts, 'options'); + assert.string(opts.type, 'options.type'); + assert.buffer(opts.hash, 'options.hash'); + assert.string(opts.algorithm, 'options.algorithm'); + + this.algorithm = opts.algorithm.toLowerCase(); + if (algs.hashAlgs[this.algorithm] !== true) + throw (new InvalidAlgorithmError(this.algorithm)); + + this.hash = opts.hash; + this.type = opts.type; + this.hashType = opts.hashType; +} + +Fingerprint.prototype.toString = function (format) { + if (format === undefined) { + if (this.algorithm === 'md5' || this.hashType === 'spki') + format = 'hex'; + else + format = 'base64'; + } + assert.string(format); + + switch (format) { + case 'hex': + if (this.hashType === 'spki') + return (this.hash.toString('hex')); + return (addColons(this.hash.toString('hex'))); + case 'base64': + if (this.hashType === 'spki') + return (this.hash.toString('base64')); + return (sshBase64Format(this.algorithm, + this.hash.toString('base64'))); + default: + throw (new FingerprintFormatError(undefined, format)); + } +}; + +Fingerprint.prototype.matches = function (other) { + assert.object(other, 'key or certificate'); + if (this.type === 'key' && this.hashType !== 'ssh') { + utils.assertCompatible(other, Key, [1, 7], 'key with spki'); + if (PrivateKey.isPrivateKey(other)) { + utils.assertCompatible(other, PrivateKey, [1, 6], + 'privatekey with spki support'); + } + } else if (this.type === 'key') { + utils.assertCompatible(other, Key, [1, 0], 'key'); + } else { + utils.assertCompatible(other, Certificate, [1, 0], + 'certificate'); + } + + var theirHash = other.hash(this.algorithm, this.hashType); + var theirHash2 = crypto.createHash(this.algorithm). + update(theirHash).digest('base64'); + + if (this.hash2 === undefined) + this.hash2 = crypto.createHash(this.algorithm). + update(this.hash).digest('base64'); + + return (this.hash2 === theirHash2); +}; + +/*JSSTYLED*/ +var base64RE = /^[A-Za-z0-9+\/=]+$/; +/*JSSTYLED*/ +var hexRE = /^[a-fA-F0-9]+$/; + +Fingerprint.parse = function (fp, options) { + assert.string(fp, 'fingerprint'); + + var alg, hash, enAlgs; + if (Array.isArray(options)) { + enAlgs = options; + options = {}; + } + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + if (options.enAlgs !== undefined) + enAlgs = options.enAlgs; + if (options.algorithms !== undefined) + enAlgs = options.algorithms; + assert.optionalArrayOfString(enAlgs, 'algorithms'); + + var hashType = 'ssh'; + if (options.hashType !== undefined) + hashType = options.hashType; + assert.string(hashType, 'options.hashType'); + + var parts = fp.split(':'); + if (parts.length == 2) { + alg = parts[0].toLowerCase(); + if (!base64RE.test(parts[1])) + throw (new FingerprintFormatError(fp)); + try { + hash = Buffer.from(parts[1], 'base64'); + } catch (e) { + throw (new FingerprintFormatError(fp)); + } + } else if (parts.length > 2) { + alg = 'md5'; + if (parts[0].toLowerCase() === 'md5') + parts = parts.slice(1); + parts = parts.map(function (p) { + while (p.length < 2) + p = '0' + p; + if (p.length > 2) + throw (new FingerprintFormatError(fp)); + return (p); + }); + parts = parts.join(''); + if (!hexRE.test(parts) || parts.length % 2 !== 0) + throw (new FingerprintFormatError(fp)); + try { + hash = Buffer.from(parts, 'hex'); + } catch (e) { + throw (new FingerprintFormatError(fp)); + } + } else { + if (hexRE.test(fp)) { + hash = Buffer.from(fp, 'hex'); + } else if (base64RE.test(fp)) { + hash = Buffer.from(fp, 'base64'); + } else { + throw (new FingerprintFormatError(fp)); + } + + switch (hash.length) { + case 32: + alg = 'sha256'; + break; + case 16: + alg = 'md5'; + break; + case 20: + alg = 'sha1'; + break; + case 64: + alg = 'sha512'; + break; + default: + throw (new FingerprintFormatError(fp)); + } + + /* Plain hex/base64: guess it's probably SPKI unless told. */ + if (options.hashType === undefined) + hashType = 'spki'; + } + + if (alg === undefined) + throw (new FingerprintFormatError(fp)); + + if (algs.hashAlgs[alg] === undefined) + throw (new InvalidAlgorithmError(alg)); + + if (enAlgs !== undefined) { + enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); }); + if (enAlgs.indexOf(alg) === -1) + throw (new InvalidAlgorithmError(alg)); + } + + return (new Fingerprint({ + algorithm: alg, + hash: hash, + type: options.type || 'key', + hashType: hashType + })); +}; + +function addColons(s) { + /*JSSTYLED*/ + return (s.replace(/(.{2})(?=.)/g, '$1:')); +} + +function base64Strip(s) { + /*JSSTYLED*/ + return (s.replace(/=*$/, '')); +} + +function sshBase64Format(alg, h) { + return (alg.toUpperCase() + ':' + base64Strip(h)); +} + +Fingerprint.isFingerprint = function (obj, ver) { + return (utils.isCompatible(obj, Fingerprint, ver)); +}; + +/* + * API versions for Fingerprint: + * [1,0] -- initial ver + * [1,1] -- first tagged ver + * [1,2] -- hashType and spki support + */ +Fingerprint.prototype._sshpkApiVersion = [1, 2]; + +Fingerprint._oldVersionDetect = function (obj) { + assert.func(obj.toString); + assert.func(obj.matches); + return ([1, 0]); +}; + + +/***/ }), + +/***/ 20535: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2018 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var utils = __nccwpck_require__(8085); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); + +var pem = __nccwpck_require__(73339); +var ssh = __nccwpck_require__(44654); +var rfc4253 = __nccwpck_require__(66382); +var dnssec = __nccwpck_require__(7167); +var putty = __nccwpck_require__(8086); + +var DNSSEC_PRIVKEY_HEADER_PREFIX = 'Private-key-format: v1'; + +function read(buf, options) { + if (typeof (buf) === 'string') { + if (buf.trim().match(/^[-]+[ ]*BEGIN/)) + return (pem.read(buf, options)); + if (buf.match(/^\s*ssh-[a-z]/)) + return (ssh.read(buf, options)); + if (buf.match(/^\s*ecdsa-/)) + return (ssh.read(buf, options)); + if (buf.match(/^putty-user-key-file-2:/i)) + return (putty.read(buf, options)); + if (findDNSSECHeader(buf)) + return (dnssec.read(buf, options)); + buf = Buffer.from(buf, 'binary'); + } else { + assert.buffer(buf); + if (findPEMHeader(buf)) + return (pem.read(buf, options)); + if (findSSHHeader(buf)) + return (ssh.read(buf, options)); + if (findPuTTYHeader(buf)) + return (putty.read(buf, options)); + if (findDNSSECHeader(buf)) + return (dnssec.read(buf, options)); + } + if (buf.readUInt32BE(0) < buf.length) + return (rfc4253.read(buf, options)); + throw (new Error('Failed to auto-detect format of key')); +} + +function findPuTTYHeader(buf) { + var offset = 0; + while (offset < buf.length && + (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) + ++offset; + if (offset + 22 <= buf.length && + buf.slice(offset, offset + 22).toString('ascii').toLowerCase() === + 'putty-user-key-file-2:') + return (true); + return (false); +} + +function findSSHHeader(buf) { + var offset = 0; + while (offset < buf.length && + (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) + ++offset; + if (offset + 4 <= buf.length && + buf.slice(offset, offset + 4).toString('ascii') === 'ssh-') + return (true); + if (offset + 6 <= buf.length && + buf.slice(offset, offset + 6).toString('ascii') === 'ecdsa-') + return (true); + return (false); +} + +function findPEMHeader(buf) { + var offset = 0; + while (offset < buf.length && + (buf[offset] === 32 || buf[offset] === 10)) + ++offset; + if (buf[offset] !== 45) + return (false); + while (offset < buf.length && + (buf[offset] === 45)) + ++offset; + while (offset < buf.length && + (buf[offset] === 32)) + ++offset; + if (offset + 5 > buf.length || + buf.slice(offset, offset + 5).toString('ascii') !== 'BEGIN') + return (false); + return (true); +} + +function findDNSSECHeader(buf) { + // private case first + if (buf.length <= DNSSEC_PRIVKEY_HEADER_PREFIX.length) + return (false); + var headerCheck = buf.slice(0, DNSSEC_PRIVKEY_HEADER_PREFIX.length); + if (headerCheck.toString('ascii') === DNSSEC_PRIVKEY_HEADER_PREFIX) + return (true); + + // public-key RFC3110 ? + // 'domain.com. IN KEY ...' or 'domain.com. IN DNSKEY ...' + // skip any comment-lines + if (typeof (buf) !== 'string') { + buf = buf.toString('ascii'); + } + var lines = buf.split('\n'); + var line = 0; + /* JSSTYLED */ + while (lines[line].match(/^\;/)) + line++; + if (lines[line].toString('ascii').match(/\. IN KEY /)) + return (true); + if (lines[line].toString('ascii').match(/\. IN DNSKEY /)) + return (true); + return (false); +} + +function write(key, options) { + throw (new Error('"auto" format cannot be used for writing')); +} + + +/***/ }), + +/***/ 7167: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2017 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var utils = __nccwpck_require__(8085); +var SSHBuffer = __nccwpck_require__(49470); +var Dhe = __nccwpck_require__(24527); + +var supportedAlgos = { + 'rsa-sha1' : 5, + 'rsa-sha256' : 8, + 'rsa-sha512' : 10, + 'ecdsa-p256-sha256' : 13, + 'ecdsa-p384-sha384' : 14 + /* + * ed25519 is hypothetically supported with id 15 + * but the common tools available don't appear to be + * capable of generating/using ed25519 keys + */ +}; + +var supportedAlgosById = {}; +Object.keys(supportedAlgos).forEach(function (k) { + supportedAlgosById[supportedAlgos[k]] = k.toUpperCase(); +}); + +function read(buf, options) { + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + var lines = buf.split('\n'); + if (lines[0].match(/^Private-key-format\: v1/)) { + var algElems = lines[1].split(' '); + var algoNum = parseInt(algElems[1], 10); + var algoName = algElems[2]; + if (!supportedAlgosById[algoNum]) + throw (new Error('Unsupported algorithm: ' + algoName)); + return (readDNSSECPrivateKey(algoNum, lines.slice(2))); + } + + // skip any comment-lines + var line = 0; + /* JSSTYLED */ + while (lines[line].match(/^\;/)) + line++; + // we should now have *one single* line left with our KEY on it. + if ((lines[line].match(/\. IN KEY /) || + lines[line].match(/\. IN DNSKEY /)) && lines[line+1].length === 0) { + return (readRFC3110(lines[line])); + } + throw (new Error('Cannot parse dnssec key')); +} + +function readRFC3110(keyString) { + var elems = keyString.split(' '); + //unused var flags = parseInt(elems[3], 10); + //unused var protocol = parseInt(elems[4], 10); + var algorithm = parseInt(elems[5], 10); + if (!supportedAlgosById[algorithm]) + throw (new Error('Unsupported algorithm: ' + algorithm)); + var base64key = elems.slice(6, elems.length).join(); + var keyBuffer = Buffer.from(base64key, 'base64'); + if (supportedAlgosById[algorithm].match(/^RSA-/)) { + // join the rest of the body into a single base64-blob + var publicExponentLen = keyBuffer.readUInt8(0); + if (publicExponentLen != 3 && publicExponentLen != 1) + throw (new Error('Cannot parse dnssec key: ' + + 'unsupported exponent length')); + + var publicExponent = keyBuffer.slice(1, publicExponentLen+1); + publicExponent = utils.mpNormalize(publicExponent); + var modulus = keyBuffer.slice(1+publicExponentLen); + modulus = utils.mpNormalize(modulus); + // now, make the key + var rsaKey = { + type: 'rsa', + parts: [] + }; + rsaKey.parts.push({ name: 'e', data: publicExponent}); + rsaKey.parts.push({ name: 'n', data: modulus}); + return (new Key(rsaKey)); + } + if (supportedAlgosById[algorithm] === 'ECDSA-P384-SHA384' || + supportedAlgosById[algorithm] === 'ECDSA-P256-SHA256') { + var curve = 'nistp384'; + var size = 384; + if (supportedAlgosById[algorithm].match(/^ECDSA-P256-SHA256/)) { + curve = 'nistp256'; + size = 256; + } + + var ecdsaKey = { + type: 'ecdsa', + curve: curve, + size: size, + parts: [ + {name: 'curve', data: Buffer.from(curve) }, + {name: 'Q', data: utils.ecNormalize(keyBuffer) } + ] + }; + return (new Key(ecdsaKey)); + } + throw (new Error('Unsupported algorithm: ' + + supportedAlgosById[algorithm])); +} + +function elementToBuf(e) { + return (Buffer.from(e.split(' ')[1], 'base64')); +} + +function readDNSSECRSAPrivateKey(elements) { + var rsaParams = {}; + elements.forEach(function (element) { + if (element.split(' ')[0] === 'Modulus:') + rsaParams['n'] = elementToBuf(element); + else if (element.split(' ')[0] === 'PublicExponent:') + rsaParams['e'] = elementToBuf(element); + else if (element.split(' ')[0] === 'PrivateExponent:') + rsaParams['d'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Prime1:') + rsaParams['p'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Prime2:') + rsaParams['q'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Exponent1:') + rsaParams['dmodp'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Exponent2:') + rsaParams['dmodq'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Coefficient:') + rsaParams['iqmp'] = elementToBuf(element); + }); + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'e', data: utils.mpNormalize(rsaParams['e'])}, + { name: 'n', data: utils.mpNormalize(rsaParams['n'])}, + { name: 'd', data: utils.mpNormalize(rsaParams['d'])}, + { name: 'p', data: utils.mpNormalize(rsaParams['p'])}, + { name: 'q', data: utils.mpNormalize(rsaParams['q'])}, + { name: 'dmodp', + data: utils.mpNormalize(rsaParams['dmodp'])}, + { name: 'dmodq', + data: utils.mpNormalize(rsaParams['dmodq'])}, + { name: 'iqmp', + data: utils.mpNormalize(rsaParams['iqmp'])} + ] + }; + return (new PrivateKey(key)); +} + +function readDNSSECPrivateKey(alg, elements) { + if (supportedAlgosById[alg].match(/^RSA-/)) { + return (readDNSSECRSAPrivateKey(elements)); + } + if (supportedAlgosById[alg] === 'ECDSA-P384-SHA384' || + supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { + var d = Buffer.from(elements[0].split(' ')[1], 'base64'); + var curve = 'nistp384'; + var size = 384; + if (supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { + curve = 'nistp256'; + size = 256; + } + // DNSSEC generates the public-key on the fly (go calculate it) + var publicKey = utils.publicFromPrivateECDSA(curve, d); + var Q = publicKey.part['Q'].data; + var ecdsaKey = { + type: 'ecdsa', + curve: curve, + size: size, + parts: [ + {name: 'curve', data: Buffer.from(curve) }, + {name: 'd', data: d }, + {name: 'Q', data: Q } + ] + }; + return (new PrivateKey(ecdsaKey)); + } + throw (new Error('Unsupported algorithm: ' + supportedAlgosById[alg])); +} + +function dnssecTimestamp(date) { + var year = date.getFullYear() + ''; //stringify + var month = (date.getMonth() + 1); + var timestampStr = year + month + date.getUTCDate(); + timestampStr += '' + date.getUTCHours() + date.getUTCMinutes(); + timestampStr += date.getUTCSeconds(); + return (timestampStr); +} + +function rsaAlgFromOptions(opts) { + if (!opts || !opts.hashAlgo || opts.hashAlgo === 'sha1') + return ('5 (RSASHA1)'); + else if (opts.hashAlgo === 'sha256') + return ('8 (RSASHA256)'); + else if (opts.hashAlgo === 'sha512') + return ('10 (RSASHA512)'); + else + throw (new Error('Unknown or unsupported hash: ' + + opts.hashAlgo)); +} + +function writeRSA(key, options) { + // if we're missing parts, add them. + if (!key.part.dmodp || !key.part.dmodq) { + utils.addRSAMissing(key); + } + + var out = ''; + out += 'Private-key-format: v1.3\n'; + out += 'Algorithm: ' + rsaAlgFromOptions(options) + '\n'; + var n = utils.mpDenormalize(key.part['n'].data); + out += 'Modulus: ' + n.toString('base64') + '\n'; + var e = utils.mpDenormalize(key.part['e'].data); + out += 'PublicExponent: ' + e.toString('base64') + '\n'; + var d = utils.mpDenormalize(key.part['d'].data); + out += 'PrivateExponent: ' + d.toString('base64') + '\n'; + var p = utils.mpDenormalize(key.part['p'].data); + out += 'Prime1: ' + p.toString('base64') + '\n'; + var q = utils.mpDenormalize(key.part['q'].data); + out += 'Prime2: ' + q.toString('base64') + '\n'; + var dmodp = utils.mpDenormalize(key.part['dmodp'].data); + out += 'Exponent1: ' + dmodp.toString('base64') + '\n'; + var dmodq = utils.mpDenormalize(key.part['dmodq'].data); + out += 'Exponent2: ' + dmodq.toString('base64') + '\n'; + var iqmp = utils.mpDenormalize(key.part['iqmp'].data); + out += 'Coefficient: ' + iqmp.toString('base64') + '\n'; + // Assume that we're valid as-of now + var timestamp = new Date(); + out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; + return (Buffer.from(out, 'ascii')); +} + +function writeECDSA(key, options) { + var out = ''; + out += 'Private-key-format: v1.3\n'; + + if (key.curve === 'nistp256') { + out += 'Algorithm: 13 (ECDSAP256SHA256)\n'; + } else if (key.curve === 'nistp384') { + out += 'Algorithm: 14 (ECDSAP384SHA384)\n'; + } else { + throw (new Error('Unsupported curve')); + } + var base64Key = key.part['d'].data.toString('base64'); + out += 'PrivateKey: ' + base64Key + '\n'; + + // Assume that we're valid as-of now + var timestamp = new Date(); + out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; + + return (Buffer.from(out, 'ascii')); +} + +function write(key, options) { + if (PrivateKey.isPrivateKey(key)) { + if (key.type === 'rsa') { + return (writeRSA(key, options)); + } else if (key.type === 'ecdsa') { + return (writeECDSA(key, options)); + } else { + throw (new Error('Unsupported algorithm: ' + key.type)); + } + } else if (Key.isKey(key)) { + /* + * RFC3110 requires a keyname, and a keytype, which we + * don't really have a mechanism for specifying such + * additional metadata. + */ + throw (new Error('Format "dnssec" only supports ' + + 'writing private keys')); + } else { + throw (new Error('key is not a Key or PrivateKey')); + } +} + + +/***/ }), + +/***/ 72553: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2017 Joyent, Inc. + +module.exports = { + read: read, + verify: verify, + sign: sign, + signAsync: signAsync, + write: write, + + /* Internal private API */ + fromBuffer: fromBuffer, + toBuffer: toBuffer +}; + +var assert = __nccwpck_require__(41706); +var SSHBuffer = __nccwpck_require__(49470); +var crypto = __nccwpck_require__(6113); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var Identity = __nccwpck_require__(37046); +var rfc4253 = __nccwpck_require__(66382); +var Signature = __nccwpck_require__(5403); +var utils = __nccwpck_require__(8085); +var Certificate = __nccwpck_require__(43671); + +function verify(cert, key) { + /* + * We always give an issuerKey, so if our verify() is being called then + * there was no signature. Return false. + */ + return (false); +} + +var TYPES = { + 'user': 1, + 'host': 2 +}; +Object.keys(TYPES).forEach(function (k) { TYPES[TYPES[k]] = k; }); + +var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/; + +function read(buf, options) { + if (Buffer.isBuffer(buf)) + buf = buf.toString('ascii'); + var parts = buf.trim().split(/[ \t\n]+/g); + if (parts.length < 2 || parts.length > 3) + throw (new Error('Not a valid SSH certificate line')); + + var algo = parts[0]; + var data = parts[1]; + + data = Buffer.from(data, 'base64'); + return (fromBuffer(data, algo)); +} + +function fromBuffer(data, algo, partial) { + var sshbuf = new SSHBuffer({ buffer: data }); + var innerAlgo = sshbuf.readString(); + if (algo !== undefined && innerAlgo !== algo) + throw (new Error('SSH certificate algorithm mismatch')); + if (algo === undefined) + algo = innerAlgo; + + var cert = {}; + cert.signatures = {}; + cert.signatures.openssh = {}; + + cert.signatures.openssh.nonce = sshbuf.readBuffer(); + + var key = {}; + var parts = (key.parts = []); + key.type = getAlg(algo); + + var partCount = algs.info[key.type].parts.length; + while (parts.length < partCount) + parts.push(sshbuf.readPart()); + assert.ok(parts.length >= 1, 'key must have at least one part'); + + var algInfo = algs.info[key.type]; + if (key.type === 'ecdsa') { + var res = ECDSA_ALGO.exec(algo); + assert.ok(res !== null); + assert.strictEqual(res[1], parts[0].data.toString()); + } + + for (var i = 0; i < algInfo.parts.length; ++i) { + parts[i].name = algInfo.parts[i]; + if (parts[i].name !== 'curve' && + algInfo.normalize !== false) { + var p = parts[i]; + p.data = utils.mpNormalize(p.data); + } + } + + cert.subjectKey = new Key(key); + + cert.serial = sshbuf.readInt64(); + + var type = TYPES[sshbuf.readInt()]; + assert.string(type, 'valid cert type'); + + cert.signatures.openssh.keyId = sshbuf.readString(); + + var principals = []; + var pbuf = sshbuf.readBuffer(); + var psshbuf = new SSHBuffer({ buffer: pbuf }); + while (!psshbuf.atEnd()) + principals.push(psshbuf.readString()); + if (principals.length === 0) + principals = ['*']; + + cert.subjects = principals.map(function (pr) { + if (type === 'user') + return (Identity.forUser(pr)); + else if (type === 'host') + return (Identity.forHost(pr)); + throw (new Error('Unknown identity type ' + type)); + }); + + cert.validFrom = int64ToDate(sshbuf.readInt64()); + cert.validUntil = int64ToDate(sshbuf.readInt64()); + + var exts = []; + var extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); + var ext; + while (!extbuf.atEnd()) { + ext = { critical: true }; + ext.name = extbuf.readString(); + ext.data = extbuf.readBuffer(); + exts.push(ext); + } + extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); + while (!extbuf.atEnd()) { + ext = { critical: false }; + ext.name = extbuf.readString(); + ext.data = extbuf.readBuffer(); + exts.push(ext); + } + cert.signatures.openssh.exts = exts; + + /* reserved */ + sshbuf.readBuffer(); + + var signingKeyBuf = sshbuf.readBuffer(); + cert.issuerKey = rfc4253.read(signingKeyBuf); + + /* + * OpenSSH certs don't give the identity of the issuer, just their + * public key. So, we use an Identity that matches anything. The + * isSignedBy() function will later tell you if the key matches. + */ + cert.issuer = Identity.forHost('**'); + + var sigBuf = sshbuf.readBuffer(); + cert.signatures.openssh.signature = + Signature.parse(sigBuf, cert.issuerKey.type, 'ssh'); + + if (partial !== undefined) { + partial.remainder = sshbuf.remainder(); + partial.consumed = sshbuf._offset; + } + + return (new Certificate(cert)); +} + +function int64ToDate(buf) { + var i = buf.readUInt32BE(0) * 4294967296; + i += buf.readUInt32BE(4); + var d = new Date(); + d.setTime(i * 1000); + d.sourceInt64 = buf; + return (d); +} + +function dateToInt64(date) { + if (date.sourceInt64 !== undefined) + return (date.sourceInt64); + var i = Math.round(date.getTime() / 1000); + var upper = Math.floor(i / 4294967296); + var lower = Math.floor(i % 4294967296); + var buf = Buffer.alloc(8); + buf.writeUInt32BE(upper, 0); + buf.writeUInt32BE(lower, 4); + return (buf); +} + +function sign(cert, key) { + if (cert.signatures.openssh === undefined) + cert.signatures.openssh = {}; + try { + var blob = toBuffer(cert, true); + } catch (e) { + delete (cert.signatures.openssh); + return (false); + } + var sig = cert.signatures.openssh; + var hashAlgo = undefined; + if (key.type === 'rsa' || key.type === 'dsa') + hashAlgo = 'sha1'; + var signer = key.createSign(hashAlgo); + signer.write(blob); + sig.signature = signer.sign(); + return (true); +} + +function signAsync(cert, signer, done) { + if (cert.signatures.openssh === undefined) + cert.signatures.openssh = {}; + try { + var blob = toBuffer(cert, true); + } catch (e) { + delete (cert.signatures.openssh); + done(e); + return; + } + var sig = cert.signatures.openssh; + + signer(blob, function (err, signature) { + if (err) { + done(err); + return; + } + try { + /* + * This will throw if the signature isn't of a + * type/algo that can be used for SSH. + */ + signature.toBuffer('ssh'); + } catch (e) { + done(e); + return; + } + sig.signature = signature; + done(); + }); +} + +function write(cert, options) { + if (options === undefined) + options = {}; + + var blob = toBuffer(cert); + var out = getCertType(cert.subjectKey) + ' ' + blob.toString('base64'); + if (options.comment) + out = out + ' ' + options.comment; + return (out); +} + + +function toBuffer(cert, noSig) { + assert.object(cert.signatures.openssh, 'signature for openssh format'); + var sig = cert.signatures.openssh; + + if (sig.nonce === undefined) + sig.nonce = crypto.randomBytes(16); + var buf = new SSHBuffer({}); + buf.writeString(getCertType(cert.subjectKey)); + buf.writeBuffer(sig.nonce); + + var key = cert.subjectKey; + var algInfo = algs.info[key.type]; + algInfo.parts.forEach(function (part) { + buf.writePart(key.part[part]); + }); + + buf.writeInt64(cert.serial); + + var type = cert.subjects[0].type; + assert.notStrictEqual(type, 'unknown'); + cert.subjects.forEach(function (id) { + assert.strictEqual(id.type, type); + }); + type = TYPES[type]; + buf.writeInt(type); + + if (sig.keyId === undefined) { + sig.keyId = cert.subjects[0].type + '_' + + (cert.subjects[0].uid || cert.subjects[0].hostname); + } + buf.writeString(sig.keyId); + + var sub = new SSHBuffer({}); + cert.subjects.forEach(function (id) { + if (type === TYPES.host) + sub.writeString(id.hostname); + else if (type === TYPES.user) + sub.writeString(id.uid); + }); + buf.writeBuffer(sub.toBuffer()); + + buf.writeInt64(dateToInt64(cert.validFrom)); + buf.writeInt64(dateToInt64(cert.validUntil)); + + var exts = sig.exts; + if (exts === undefined) + exts = []; + + var extbuf = new SSHBuffer({}); + exts.forEach(function (ext) { + if (ext.critical !== true) + return; + extbuf.writeString(ext.name); + extbuf.writeBuffer(ext.data); + }); + buf.writeBuffer(extbuf.toBuffer()); + + extbuf = new SSHBuffer({}); + exts.forEach(function (ext) { + if (ext.critical === true) + return; + extbuf.writeString(ext.name); + extbuf.writeBuffer(ext.data); + }); + buf.writeBuffer(extbuf.toBuffer()); + + /* reserved */ + buf.writeBuffer(Buffer.alloc(0)); + + sub = rfc4253.write(cert.issuerKey); + buf.writeBuffer(sub); + + if (!noSig) + buf.writeBuffer(sig.signature.toBuffer('ssh')); + + return (buf.toBuffer()); +} + +function getAlg(certType) { + if (certType === 'ssh-rsa-cert-v01@openssh.com') + return ('rsa'); + if (certType === 'ssh-dss-cert-v01@openssh.com') + return ('dsa'); + if (certType.match(ECDSA_ALGO)) + return ('ecdsa'); + if (certType === 'ssh-ed25519-cert-v01@openssh.com') + return ('ed25519'); + throw (new Error('Unsupported cert type ' + certType)); +} + +function getCertType(key) { + if (key.type === 'rsa') + return ('ssh-rsa-cert-v01@openssh.com'); + if (key.type === 'dsa') + return ('ssh-dss-cert-v01@openssh.com'); + if (key.type === 'ecdsa') + return ('ecdsa-sha2-' + key.curve + '-cert-v01@openssh.com'); + if (key.type === 'ed25519') + return ('ssh-ed25519-cert-v01@openssh.com'); + throw (new Error('Unsupported key type ' + key.type)); +} + + +/***/ }), + +/***/ 73339: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2018 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = __nccwpck_require__(41706); +var asn1 = __nccwpck_require__(2); +var crypto = __nccwpck_require__(6113); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var utils = __nccwpck_require__(8085); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); + +var pkcs1 = __nccwpck_require__(45540); +var pkcs8 = __nccwpck_require__(28414); +var sshpriv = __nccwpck_require__(898); +var rfc4253 = __nccwpck_require__(66382); + +var errors = __nccwpck_require__(67782); + +var OID_PBES2 = '1.2.840.113549.1.5.13'; +var OID_PBKDF2 = '1.2.840.113549.1.5.12'; + +var OID_TO_CIPHER = { + '1.2.840.113549.3.7': '3des-cbc', + '2.16.840.1.101.3.4.1.2': 'aes128-cbc', + '2.16.840.1.101.3.4.1.42': 'aes256-cbc' +}; +var CIPHER_TO_OID = {}; +Object.keys(OID_TO_CIPHER).forEach(function (k) { + CIPHER_TO_OID[OID_TO_CIPHER[k]] = k; +}); + +var OID_TO_HASH = { + '1.2.840.113549.2.7': 'sha1', + '1.2.840.113549.2.9': 'sha256', + '1.2.840.113549.2.11': 'sha512' +}; +var HASH_TO_OID = {}; +Object.keys(OID_TO_HASH).forEach(function (k) { + HASH_TO_OID[OID_TO_HASH[k]] = k; +}); + +/* + * For reading we support both PKCS#1 and PKCS#8. If we find a private key, + * we just take the public component of it and use that. + */ +function read(buf, options, forceType) { + var input = buf; + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + + var lines = buf.trim().split(/[\r\n]+/g); + + var m; + var si = -1; + while (!m && si < lines.length) { + m = lines[++si].match(/*JSSTYLED*/ + /[-]+[ ]*BEGIN ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); + } + assert.ok(m, 'invalid PEM header'); + + var m2; + var ei = lines.length; + while (!m2 && ei > 0) { + m2 = lines[--ei].match(/*JSSTYLED*/ + /[-]+[ ]*END ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); + } + assert.ok(m2, 'invalid PEM footer'); + + /* Begin and end banners must match key type */ + assert.equal(m[2], m2[2]); + var type = m[2].toLowerCase(); + + var alg; + if (m[1]) { + /* They also must match algorithms, if given */ + assert.equal(m[1], m2[1], 'PEM header and footer mismatch'); + alg = m[1].trim(); + } + + lines = lines.slice(si, ei + 1); + + var headers = {}; + while (true) { + lines = lines.slice(1); + m = lines[0].match(/*JSSTYLED*/ + /^([A-Za-z0-9-]+): (.+)$/); + if (!m) + break; + headers[m[1].toLowerCase()] = m[2]; + } + + /* Chop off the first and last lines */ + lines = lines.slice(0, -1).join(''); + buf = Buffer.from(lines, 'base64'); + + var cipher, key, iv; + if (headers['proc-type']) { + var parts = headers['proc-type'].split(','); + if (parts[0] === '4' && parts[1] === 'ENCRYPTED') { + if (typeof (options.passphrase) === 'string') { + options.passphrase = Buffer.from( + options.passphrase, 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'PEM')); + } else { + parts = headers['dek-info'].split(','); + assert.ok(parts.length === 2); + cipher = parts[0].toLowerCase(); + iv = Buffer.from(parts[1], 'hex'); + key = utils.opensslKeyDeriv(cipher, iv, + options.passphrase, 1).key; + } + } + } + + if (alg && alg.toLowerCase() === 'encrypted') { + var eder = new asn1.BerReader(buf); + var pbesEnd; + eder.readSequence(); + + eder.readSequence(); + pbesEnd = eder.offset + eder.length; + + var method = eder.readOID(); + if (method !== OID_PBES2) { + throw (new Error('Unsupported PEM/PKCS8 encryption ' + + 'scheme: ' + method)); + } + + eder.readSequence(); /* PBES2-params */ + + eder.readSequence(); /* keyDerivationFunc */ + var kdfEnd = eder.offset + eder.length; + var kdfOid = eder.readOID(); + if (kdfOid !== OID_PBKDF2) + throw (new Error('Unsupported PBES2 KDF: ' + kdfOid)); + eder.readSequence(); + var salt = eder.readString(asn1.Ber.OctetString, true); + var iterations = eder.readInt(); + var hashAlg = 'sha1'; + if (eder.offset < kdfEnd) { + eder.readSequence(); + var hashAlgOid = eder.readOID(); + hashAlg = OID_TO_HASH[hashAlgOid]; + if (hashAlg === undefined) { + throw (new Error('Unsupported PBKDF2 hash: ' + + hashAlgOid)); + } + } + eder._offset = kdfEnd; + + eder.readSequence(); /* encryptionScheme */ + var cipherOid = eder.readOID(); + cipher = OID_TO_CIPHER[cipherOid]; + if (cipher === undefined) { + throw (new Error('Unsupported PBES2 cipher: ' + + cipherOid)); + } + iv = eder.readString(asn1.Ber.OctetString, true); + + eder._offset = pbesEnd; + buf = eder.readString(asn1.Ber.OctetString, true); + + if (typeof (options.passphrase) === 'string') { + options.passphrase = Buffer.from( + options.passphrase, 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'PEM')); + } + + var cinfo = utils.opensshCipherInfo(cipher); + + cipher = cinfo.opensslName; + key = utils.pbkdf2(hashAlg, salt, iterations, cinfo.keySize, + options.passphrase); + alg = undefined; + } + + if (cipher && key && iv) { + var cipherStream = crypto.createDecipheriv(cipher, key, iv); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + if (e.toString().indexOf('bad decrypt') !== -1) { + throw (new Error('Incorrect passphrase ' + + 'supplied, could not decrypt key')); + } + throw (e); + }); + cipherStream.write(buf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + buf = Buffer.concat(chunks); + } + + /* The new OpenSSH internal format abuses PEM headers */ + if (alg && alg.toLowerCase() === 'openssh') + return (sshpriv.readSSHPrivate(type, buf, options)); + if (alg && alg.toLowerCase() === 'ssh2') + return (rfc4253.readType(type, buf, options)); + + var der = new asn1.BerReader(buf); + der.originalInput = input; + + /* + * All of the PEM file types start with a sequence tag, so chop it + * off here + */ + der.readSequence(); + + /* PKCS#1 type keys name an algorithm in the banner explicitly */ + if (alg) { + if (forceType) + assert.strictEqual(forceType, 'pkcs1'); + return (pkcs1.readPkcs1(alg, type, der)); + } else { + if (forceType) + assert.strictEqual(forceType, 'pkcs8'); + return (pkcs8.readPkcs8(alg, type, der)); + } +} + +function write(key, options, type) { + assert.object(key); + + var alg = { + 'ecdsa': 'EC', + 'rsa': 'RSA', + 'dsa': 'DSA', + 'ed25519': 'EdDSA' + }[key.type]; + var header; + + var der = new asn1.BerWriter(); + + if (PrivateKey.isPrivateKey(key)) { + if (type && type === 'pkcs8') { + header = 'PRIVATE KEY'; + pkcs8.writePkcs8(der, key); + } else { + if (type) + assert.strictEqual(type, 'pkcs1'); + header = alg + ' PRIVATE KEY'; + pkcs1.writePkcs1(der, key); + } + + } else if (Key.isKey(key)) { + if (type && type === 'pkcs1') { + header = alg + ' PUBLIC KEY'; + pkcs1.writePkcs1(der, key); + } else { + if (type) + assert.strictEqual(type, 'pkcs8'); + header = 'PUBLIC KEY'; + pkcs8.writePkcs8(der, key); + } + + } else { + throw (new Error('key is not a Key or PrivateKey')); + } + + var tmp = der.buffer.toString('base64'); + var len = tmp.length + (tmp.length / 64) + + 18 + 16 + header.length*2 + 10; + var buf = Buffer.alloc(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 64; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} + + +/***/ }), + +/***/ 45540: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + readPkcs1: readPkcs1, + write: write, + writePkcs1: writePkcs1 +}; + +var assert = __nccwpck_require__(41706); +var asn1 = __nccwpck_require__(2); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var utils = __nccwpck_require__(8085); + +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var pem = __nccwpck_require__(73339); + +var pkcs8 = __nccwpck_require__(28414); +var readECDSACurve = pkcs8.readECDSACurve; + +function read(buf, options) { + return (pem.read(buf, options, 'pkcs1')); +} + +function write(key, options) { + return (pem.write(key, options, 'pkcs1')); +} + +/* Helper to read in a single mpint */ +function readMPInt(der, nm) { + assert.strictEqual(der.peek(), asn1.Ber.Integer, + nm + ' is not an Integer'); + return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); +} + +function readPkcs1(alg, type, der) { + switch (alg) { + case 'RSA': + if (type === 'public') + return (readPkcs1RSAPublic(der)); + else if (type === 'private') + return (readPkcs1RSAPrivate(der)); + throw (new Error('Unknown key type: ' + type)); + case 'DSA': + if (type === 'public') + return (readPkcs1DSAPublic(der)); + else if (type === 'private') + return (readPkcs1DSAPrivate(der)); + throw (new Error('Unknown key type: ' + type)); + case 'EC': + case 'ECDSA': + if (type === 'private') + return (readPkcs1ECDSAPrivate(der)); + else if (type === 'public') + return (readPkcs1ECDSAPublic(der)); + throw (new Error('Unknown key type: ' + type)); + case 'EDDSA': + case 'EdDSA': + if (type === 'private') + return (readPkcs1EdDSAPrivate(der)); + throw (new Error(type + ' keys not supported with EdDSA')); + default: + throw (new Error('Unknown key algo: ' + alg)); + } +} + +function readPkcs1RSAPublic(der) { + // modulus and exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'exponent'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'e', data: e }, + { name: 'n', data: n } + ] + }; + + return (new Key(key)); +} + +function readPkcs1RSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version[0], 0); + + // modulus then public exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'public exponent'); + var d = readMPInt(der, 'private exponent'); + var p = readMPInt(der, 'prime1'); + var q = readMPInt(der, 'prime2'); + var dmodp = readMPInt(der, 'exponent1'); + var dmodq = readMPInt(der, 'exponent2'); + var iqmp = readMPInt(der, 'iqmp'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'n', data: n }, + { name: 'e', data: e }, + { name: 'd', data: d }, + { name: 'iqmp', data: iqmp }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'dmodp', data: dmodp }, + { name: 'dmodq', data: dmodq } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs1DSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version.readUInt8(0), 0); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + var y = readMPInt(der, 'y'); + var x = readMPInt(der, 'x'); + + // now, make the key + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y }, + { name: 'x', data: x } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs1EdDSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version.readUInt8(0), 1); + + // private key + var k = der.readString(asn1.Ber.OctetString, true); + + der.readSequence(0xa0); + var oid = der.readOID(); + assert.strictEqual(oid, '1.3.101.112', 'the ed25519 curve identifier'); + + der.readSequence(0xa1); + var A = utils.readBitString(der); + + var key = { + type: 'ed25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) }, + { name: 'k', data: k } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs1DSAPublic(der) { + var y = readMPInt(der, 'y'); + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + var key = { + type: 'dsa', + parts: [ + { name: 'y', data: y }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g } + ] + }; + + return (new Key(key)); +} + +function readPkcs1ECDSAPublic(der) { + der.readSequence(); + + var oid = der.readOID(); + assert.strictEqual(oid, '1.2.840.10045.2.1', 'must be ecPublicKey'); + + var curveOid = der.readOID(); + + var curve; + var curves = Object.keys(algs.curves); + for (var j = 0; j < curves.length; ++j) { + var c = curves[j]; + var cd = algs.curves[c]; + if (cd.pkcs8oid === curveOid) { + curve = c; + break; + } + } + assert.string(curve, 'a known ECDSA named curve'); + + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curve) }, + { name: 'Q', data: Q } + ] + }; + + return (new Key(key)); +} + +function readPkcs1ECDSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version.readUInt8(0), 1); + + // private key + var d = der.readString(asn1.Ber.OctetString, true); + + der.readSequence(0xa0); + var curve = readECDSACurve(der); + assert.string(curve, 'a known elliptic curve'); + + der.readSequence(0xa1); + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curve) }, + { name: 'Q', data: Q }, + { name: 'd', data: d } + ] + }; + + return (new PrivateKey(key)); +} + +function writePkcs1(der, key) { + der.startSequence(); + + switch (key.type) { + case 'rsa': + if (PrivateKey.isPrivateKey(key)) + writePkcs1RSAPrivate(der, key); + else + writePkcs1RSAPublic(der, key); + break; + case 'dsa': + if (PrivateKey.isPrivateKey(key)) + writePkcs1DSAPrivate(der, key); + else + writePkcs1DSAPublic(der, key); + break; + case 'ecdsa': + if (PrivateKey.isPrivateKey(key)) + writePkcs1ECDSAPrivate(der, key); + else + writePkcs1ECDSAPublic(der, key); + break; + case 'ed25519': + if (PrivateKey.isPrivateKey(key)) + writePkcs1EdDSAPrivate(der, key); + else + writePkcs1EdDSAPublic(der, key); + break; + default: + throw (new Error('Unknown key algo: ' + key.type)); + } + + der.endSequence(); +} + +function writePkcs1RSAPublic(der, key) { + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); +} + +function writePkcs1RSAPrivate(der, key) { + var ver = Buffer.from([0]); + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + if (!key.part.dmodp || !key.part.dmodq) + utils.addRSAMissing(key); + der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); + der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); + der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); +} + +function writePkcs1DSAPrivate(der, key) { + var ver = Buffer.from([0]); + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.writeBuffer(key.part.x.data, asn1.Ber.Integer); +} + +function writePkcs1DSAPublic(der, key) { + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); +} + +function writePkcs1ECDSAPublic(der, key) { + der.startSequence(); + + der.writeOID('1.2.840.10045.2.1'); /* ecPublicKey */ + var curve = key.part.curve.data.toString(); + var curveOid = algs.curves[curve].pkcs8oid; + assert.string(curveOid, 'a known ECDSA named curve'); + der.writeOID(curveOid); + + der.endSequence(); + + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); +} + +function writePkcs1ECDSAPrivate(der, key) { + var ver = Buffer.from([1]); + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); + + der.startSequence(0xa0); + var curve = key.part.curve.data.toString(); + var curveOid = algs.curves[curve].pkcs8oid; + assert.string(curveOid, 'a known ECDSA named curve'); + der.writeOID(curveOid); + der.endSequence(); + + der.startSequence(0xa1); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + der.endSequence(); +} + +function writePkcs1EdDSAPrivate(der, key) { + var ver = Buffer.from([1]); + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.k.data, asn1.Ber.OctetString); + + der.startSequence(0xa0); + der.writeOID('1.3.101.112'); + der.endSequence(); + + der.startSequence(0xa1); + utils.writeBitString(der, key.part.A.data); + der.endSequence(); +} + +function writePkcs1EdDSAPublic(der, key) { + throw (new Error('Public keys are not supported for EdDSA PKCS#1')); +} + + +/***/ }), + +/***/ 28414: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2018 Joyent, Inc. + +module.exports = { + read: read, + readPkcs8: readPkcs8, + write: write, + writePkcs8: writePkcs8, + pkcs8ToBuffer: pkcs8ToBuffer, + + readECDSACurve: readECDSACurve, + writeECDSACurve: writeECDSACurve +}; + +var assert = __nccwpck_require__(41706); +var asn1 = __nccwpck_require__(2); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var utils = __nccwpck_require__(8085); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var pem = __nccwpck_require__(73339); + +function read(buf, options) { + return (pem.read(buf, options, 'pkcs8')); +} + +function write(key, options) { + return (pem.write(key, options, 'pkcs8')); +} + +/* Helper to read in a single mpint */ +function readMPInt(der, nm) { + assert.strictEqual(der.peek(), asn1.Ber.Integer, + nm + ' is not an Integer'); + return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); +} + +function readPkcs8(alg, type, der) { + /* Private keys in pkcs#8 format have a weird extra int */ + if (der.peek() === asn1.Ber.Integer) { + assert.strictEqual(type, 'private', + 'unexpected Integer at start of public key'); + der.readString(asn1.Ber.Integer, true); + } + + der.readSequence(); + var next = der.offset + der.length; + + var oid = der.readOID(); + switch (oid) { + case '1.2.840.113549.1.1.1': + der._offset = next; + if (type === 'public') + return (readPkcs8RSAPublic(der)); + else + return (readPkcs8RSAPrivate(der)); + case '1.2.840.10040.4.1': + if (type === 'public') + return (readPkcs8DSAPublic(der)); + else + return (readPkcs8DSAPrivate(der)); + case '1.2.840.10045.2.1': + if (type === 'public') + return (readPkcs8ECDSAPublic(der)); + else + return (readPkcs8ECDSAPrivate(der)); + case '1.3.101.112': + if (type === 'public') { + return (readPkcs8EdDSAPublic(der)); + } else { + return (readPkcs8EdDSAPrivate(der)); + } + case '1.3.101.110': + if (type === 'public') { + return (readPkcs8X25519Public(der)); + } else { + return (readPkcs8X25519Private(der)); + } + default: + throw (new Error('Unknown key type OID ' + oid)); + } +} + +function readPkcs8RSAPublic(der) { + // bit string sequence + der.readSequence(asn1.Ber.BitString); + der.readByte(); + der.readSequence(); + + // modulus + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'exponent'); + + // now, make the key + var key = { + type: 'rsa', + source: der.originalInput, + parts: [ + { name: 'e', data: e }, + { name: 'n', data: n } + ] + }; + + return (new Key(key)); +} + +function readPkcs8RSAPrivate(der) { + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + + var ver = readMPInt(der, 'version'); + assert.equal(ver[0], 0x0, 'unknown RSA private key version'); + + // modulus then public exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'public exponent'); + var d = readMPInt(der, 'private exponent'); + var p = readMPInt(der, 'prime1'); + var q = readMPInt(der, 'prime2'); + var dmodp = readMPInt(der, 'exponent1'); + var dmodq = readMPInt(der, 'exponent2'); + var iqmp = readMPInt(der, 'iqmp'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'n', data: n }, + { name: 'e', data: e }, + { name: 'd', data: d }, + { name: 'iqmp', data: iqmp }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'dmodp', data: dmodp }, + { name: 'dmodq', data: dmodq } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8DSAPublic(der) { + der.readSequence(); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + // bit string sequence + der.readSequence(asn1.Ber.BitString); + der.readByte(); + + var y = readMPInt(der, 'y'); + + // now, make the key + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y } + ] + }; + + return (new Key(key)); +} + +function readPkcs8DSAPrivate(der) { + der.readSequence(); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + der.readSequence(asn1.Ber.OctetString); + var x = readMPInt(der, 'x'); + + /* The pkcs#8 format does not include the public key */ + var y = utils.calculateDSAPublic(g, p, x); + + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y }, + { name: 'x', data: x } + ] + }; + + return (new PrivateKey(key)); +} + +function readECDSACurve(der) { + var curveName, curveNames; + var j, c, cd; + + if (der.peek() === asn1.Ber.OID) { + var oid = der.readOID(); + + curveNames = Object.keys(algs.curves); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + if (cd.pkcs8oid === oid) { + curveName = c; + break; + } + } + + } else { + // ECParameters sequence + der.readSequence(); + var version = der.readString(asn1.Ber.Integer, true); + assert.strictEqual(version[0], 1, 'ECDSA key not version 1'); + + var curve = {}; + + // FieldID sequence + der.readSequence(); + var fieldTypeOid = der.readOID(); + assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1', + 'ECDSA key is not from a prime-field'); + var p = curve.p = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + /* + * p always starts with a 1 bit, so count the zeros to get its + * real size. + */ + curve.size = p.length * 8 - utils.countZeros(p); + + // Curve sequence + der.readSequence(); + curve.a = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true)); + curve.b = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true)); + if (der.peek() === asn1.Ber.BitString) + curve.s = der.readString(asn1.Ber.BitString, true); + + // Combined Gx and Gy + curve.G = der.readString(asn1.Ber.OctetString, true); + assert.strictEqual(curve.G[0], 0x4, + 'uncompressed G is required'); + + curve.n = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + curve.h = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' + + 'required'); + + curveNames = Object.keys(algs.curves); + var ks = Object.keys(curve); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + var equal = true; + for (var i = 0; i < ks.length; ++i) { + var k = ks[i]; + if (cd[k] === undefined) + continue; + if (typeof (cd[k]) === 'object' && + cd[k].equals !== undefined) { + if (!cd[k].equals(curve[k])) { + equal = false; + break; + } + } else if (Buffer.isBuffer(cd[k])) { + if (cd[k].toString('binary') + !== curve[k].toString('binary')) { + equal = false; + break; + } + } else { + if (cd[k] !== curve[k]) { + equal = false; + break; + } + } + } + if (equal) { + curveName = c; + break; + } + } + } + return (curveName); +} + +function readPkcs8ECDSAPrivate(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, 'a known elliptic curve'); + + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + + var version = readMPInt(der, 'version'); + assert.equal(version[0], 1, 'unknown version of ECDSA key'); + + var d = der.readString(asn1.Ber.OctetString, true); + var Q; + + if (der.peek() == 0xa0) { + der.readSequence(0xa0); + der._offset += der.length; + } + if (der.peek() == 0xa1) { + der.readSequence(0xa1); + Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + } + + if (Q === undefined) { + var pub = utils.publicFromPrivateECDSA(curveName, d); + Q = pub.part.Q.data; + } + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curveName) }, + { name: 'Q', data: Q }, + { name: 'd', data: d } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8ECDSAPublic(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, 'a known elliptic curve'); + + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curveName) }, + { name: 'Q', data: Q } + ] + }; + + return (new Key(key)); +} + +function readPkcs8EdDSAPublic(der) { + if (der.peek() === 0x00) + der.readByte(); + + var A = utils.readBitString(der); + + var key = { + type: 'ed25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) } + ] + }; + + return (new Key(key)); +} + +function readPkcs8X25519Public(der) { + var A = utils.readBitString(der); + + var key = { + type: 'curve25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) } + ] + }; + + return (new Key(key)); +} + +function readPkcs8EdDSAPrivate(der) { + if (der.peek() === 0x00) + der.readByte(); + + der.readSequence(asn1.Ber.OctetString); + var k = der.readString(asn1.Ber.OctetString, true); + k = utils.zeroPadToLength(k, 32); + + var A; + if (der.peek() === asn1.Ber.BitString) { + A = utils.readBitString(der); + A = utils.zeroPadToLength(A, 32); + } else { + A = utils.calculateED25519Public(k); + } + + var key = { + type: 'ed25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) }, + { name: 'k', data: utils.zeroPadToLength(k, 32) } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8X25519Private(der) { + if (der.peek() === 0x00) + der.readByte(); + + der.readSequence(asn1.Ber.OctetString); + var k = der.readString(asn1.Ber.OctetString, true); + k = utils.zeroPadToLength(k, 32); + + var A = utils.calculateX25519Public(k); + + var key = { + type: 'curve25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) }, + { name: 'k', data: utils.zeroPadToLength(k, 32) } + ] + }; + + return (new PrivateKey(key)); +} + +function pkcs8ToBuffer(key) { + var der = new asn1.BerWriter(); + writePkcs8(der, key); + return (der.buffer); +} + +function writePkcs8(der, key) { + der.startSequence(); + + if (PrivateKey.isPrivateKey(key)) { + var sillyInt = Buffer.from([0]); + der.writeBuffer(sillyInt, asn1.Ber.Integer); + } + + der.startSequence(); + switch (key.type) { + case 'rsa': + der.writeOID('1.2.840.113549.1.1.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8RSAPrivate(key, der); + else + writePkcs8RSAPublic(key, der); + break; + case 'dsa': + der.writeOID('1.2.840.10040.4.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8DSAPrivate(key, der); + else + writePkcs8DSAPublic(key, der); + break; + case 'ecdsa': + der.writeOID('1.2.840.10045.2.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8ECDSAPrivate(key, der); + else + writePkcs8ECDSAPublic(key, der); + break; + case 'ed25519': + der.writeOID('1.3.101.112'); + if (PrivateKey.isPrivateKey(key)) + throw (new Error('Ed25519 private keys in pkcs8 ' + + 'format are not supported')); + writePkcs8EdDSAPublic(key, der); + break; + default: + throw (new Error('Unsupported key type: ' + key.type)); + } + + der.endSequence(); +} + +function writePkcs8RSAPrivate(key, der) { + der.writeNull(); + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + + var version = Buffer.from([0]); + der.writeBuffer(version, asn1.Ber.Integer); + + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + if (!key.part.dmodp || !key.part.dmodq) + utils.addRSAMissing(key); + der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); + der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); + der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); + + der.endSequence(); + der.endSequence(); +} + +function writePkcs8RSAPublic(key, der) { + der.writeNull(); + der.endSequence(); + + der.startSequence(asn1.Ber.BitString); + der.writeByte(0x00); + + der.startSequence(); + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.endSequence(); + + der.endSequence(); +} + +function writePkcs8DSAPrivate(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.writeBuffer(key.part.x.data, asn1.Ber.Integer); + der.endSequence(); +} + +function writePkcs8DSAPublic(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + der.endSequence(); + + der.startSequence(asn1.Ber.BitString); + der.writeByte(0x00); + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.endSequence(); +} + +function writeECDSACurve(key, der) { + var curve = algs.curves[key.curve]; + if (curve.pkcs8oid) { + /* This one has a name in pkcs#8, so just write the oid */ + der.writeOID(curve.pkcs8oid); + + } else { + // ECParameters sequence + der.startSequence(); + + var version = Buffer.from([1]); + der.writeBuffer(version, asn1.Ber.Integer); + + // FieldID sequence + der.startSequence(); + der.writeOID('1.2.840.10045.1.1'); // prime-field + der.writeBuffer(curve.p, asn1.Ber.Integer); + der.endSequence(); + + // Curve sequence + der.startSequence(); + var a = curve.p; + if (a[0] === 0x0) + a = a.slice(1); + der.writeBuffer(a, asn1.Ber.OctetString); + der.writeBuffer(curve.b, asn1.Ber.OctetString); + der.writeBuffer(curve.s, asn1.Ber.BitString); + der.endSequence(); + + der.writeBuffer(curve.G, asn1.Ber.OctetString); + der.writeBuffer(curve.n, asn1.Ber.Integer); + var h = curve.h; + if (!h) { + h = Buffer.from([1]); + } + der.writeBuffer(h, asn1.Ber.Integer); + + // ECParameters + der.endSequence(); + } +} + +function writePkcs8ECDSAPublic(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); +} + +function writePkcs8ECDSAPrivate(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + + var version = Buffer.from([1]); + der.writeBuffer(version, asn1.Ber.Integer); + + der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); + + der.startSequence(0xa1); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + der.endSequence(); + + der.endSequence(); + der.endSequence(); +} + +function writePkcs8EdDSAPublic(key, der) { + der.endSequence(); + + utils.writeBitString(der, key.part.A.data); +} + +function writePkcs8EdDSAPrivate(key, der) { + der.endSequence(); + + var k = utils.mpNormalize(key.part.k.data, true); + der.startSequence(asn1.Ber.OctetString); + der.writeBuffer(k, asn1.Ber.OctetString); + der.endSequence(); +} + + +/***/ }), + +/***/ 8086: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2018 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var rfc4253 = __nccwpck_require__(66382); +var Key = __nccwpck_require__(90316); + +var errors = __nccwpck_require__(67782); + +function read(buf, options) { + var lines = buf.toString('ascii').split(/[\r\n]+/); + var found = false; + var parts; + var si = 0; + while (si < lines.length) { + parts = splitHeader(lines[si++]); + if (parts && + parts[0].toLowerCase() === 'putty-user-key-file-2') { + found = true; + break; + } + } + if (!found) { + throw (new Error('No PuTTY format first line found')); + } + var alg = parts[1]; + + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), 'encryption'); + + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), 'comment'); + var comment = parts[1]; + + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), 'public-lines'); + var publicLines = parseInt(parts[1], 10); + if (!isFinite(publicLines) || publicLines < 0 || + publicLines > lines.length) { + throw (new Error('Invalid public-lines count')); + } + + var publicBuf = Buffer.from( + lines.slice(si, si + publicLines).join(''), 'base64'); + var keyType = rfc4253.algToKeyType(alg); + var key = rfc4253.read(publicBuf); + if (key.type !== keyType) { + throw (new Error('Outer key algorithm mismatch')); + } + key.comment = comment; + return (key); +} + +function splitHeader(line) { + var idx = line.indexOf(':'); + if (idx === -1) + return (null); + var header = line.slice(0, idx); + ++idx; + while (line[idx] === ' ') + ++idx; + var rest = line.slice(idx); + return ([header, rest]); +} + +function write(key, options) { + assert.object(key); + if (!Key.isKey(key)) + throw (new Error('Must be a public key')); + + var alg = rfc4253.keyTypeToAlg(key); + var buf = rfc4253.write(key); + var comment = key.comment || ''; + + var b64 = buf.toString('base64'); + var lines = wrap(b64, 64); + + lines.unshift('Public-Lines: ' + lines.length); + lines.unshift('Comment: ' + comment); + lines.unshift('Encryption: none'); + lines.unshift('PuTTY-User-Key-File-2: ' + alg); + + return (Buffer.from(lines.join('\n') + '\n')); +} + +function wrap(txt, len) { + var lines = []; + var pos = 0; + while (pos < txt.length) { + lines.push(txt.slice(pos, pos + 64)); + pos += 64; + } + return (lines); +} + + +/***/ }), + +/***/ 66382: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read.bind(undefined, false, undefined), + readType: read.bind(undefined, false), + write: write, + /* semi-private api, used by sshpk-agent */ + readPartial: read.bind(undefined, true), + + /* shared with ssh format */ + readInternal: read, + keyTypeToAlg: keyTypeToAlg, + algToKeyType: algToKeyType +}; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var utils = __nccwpck_require__(8085); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var SSHBuffer = __nccwpck_require__(49470); + +function algToKeyType(alg) { + assert.string(alg); + if (alg === 'ssh-dss') + return ('dsa'); + else if (alg === 'ssh-rsa') + return ('rsa'); + else if (alg === 'ssh-ed25519') + return ('ed25519'); + else if (alg === 'ssh-curve25519') + return ('curve25519'); + else if (alg.match(/^ecdsa-sha2-/)) + return ('ecdsa'); + else + throw (new Error('Unknown algorithm ' + alg)); +} + +function keyTypeToAlg(key) { + assert.object(key); + if (key.type === 'dsa') + return ('ssh-dss'); + else if (key.type === 'rsa') + return ('ssh-rsa'); + else if (key.type === 'ed25519') + return ('ssh-ed25519'); + else if (key.type === 'curve25519') + return ('ssh-curve25519'); + else if (key.type === 'ecdsa') + return ('ecdsa-sha2-' + key.part.curve.data.toString()); + else + throw (new Error('Unknown key type ' + key.type)); +} + +function read(partial, type, buf, options) { + if (typeof (buf) === 'string') + buf = Buffer.from(buf); + assert.buffer(buf, 'buf'); + + var key = {}; + + var parts = key.parts = []; + var sshbuf = new SSHBuffer({buffer: buf}); + + var alg = sshbuf.readString(); + assert.ok(!sshbuf.atEnd(), 'key must have at least one part'); + + key.type = algToKeyType(alg); + + var partCount = algs.info[key.type].parts.length; + if (type && type === 'private') + partCount = algs.privInfo[key.type].parts.length; + + while (!sshbuf.atEnd() && parts.length < partCount) + parts.push(sshbuf.readPart()); + while (!partial && !sshbuf.atEnd()) + parts.push(sshbuf.readPart()); + + assert.ok(parts.length >= 1, + 'key must have at least one part'); + assert.ok(partial || sshbuf.atEnd(), + 'leftover bytes at end of key'); + + var Constructor = Key; + var algInfo = algs.info[key.type]; + if (type === 'private' || algInfo.parts.length !== parts.length) { + algInfo = algs.privInfo[key.type]; + Constructor = PrivateKey; + } + assert.strictEqual(algInfo.parts.length, parts.length); + + if (key.type === 'ecdsa') { + var res = /^ecdsa-sha2-(.+)$/.exec(alg); + assert.ok(res !== null); + assert.strictEqual(res[1], parts[0].data.toString()); + } + + var normalized = true; + for (var i = 0; i < algInfo.parts.length; ++i) { + var p = parts[i]; + p.name = algInfo.parts[i]; + /* + * OpenSSH stores ed25519 "private" keys as seed + public key + * concat'd together (k followed by A). We want to keep them + * separate for other formats that don't do this. + */ + if (key.type === 'ed25519' && p.name === 'k') + p.data = p.data.slice(0, 32); + + if (p.name !== 'curve' && algInfo.normalize !== false) { + var nd; + if (key.type === 'ed25519') { + nd = utils.zeroPadToLength(p.data, 32); + } else { + nd = utils.mpNormalize(p.data); + } + if (nd.toString('binary') !== + p.data.toString('binary')) { + p.data = nd; + normalized = false; + } + } + } + + if (normalized) + key._rfc4253Cache = sshbuf.toBuffer(); + + if (partial && typeof (partial) === 'object') { + partial.remainder = sshbuf.remainder(); + partial.consumed = sshbuf._offset; + } + + return (new Constructor(key)); +} + +function write(key, options) { + assert.object(key); + + var alg = keyTypeToAlg(key); + var i; + + var algInfo = algs.info[key.type]; + if (PrivateKey.isPrivateKey(key)) + algInfo = algs.privInfo[key.type]; + var parts = algInfo.parts; + + var buf = new SSHBuffer({}); + + buf.writeString(alg); + + for (i = 0; i < parts.length; ++i) { + var data = key.part[parts[i]].data; + if (algInfo.normalize !== false) { + if (key.type === 'ed25519') + data = utils.zeroPadToLength(data, 32); + else + data = utils.mpNormalize(data); + } + if (key.type === 'ed25519' && parts[i] === 'k') + data = Buffer.concat([data, key.part.A.data]); + buf.writeBuffer(data); + } + + return (buf.toBuffer()); +} + + +/***/ }), + +/***/ 898: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + readSSHPrivate: readSSHPrivate, + write: write +}; + +var assert = __nccwpck_require__(41706); +var asn1 = __nccwpck_require__(2); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var utils = __nccwpck_require__(8085); +var crypto = __nccwpck_require__(6113); + +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var pem = __nccwpck_require__(73339); +var rfc4253 = __nccwpck_require__(66382); +var SSHBuffer = __nccwpck_require__(49470); +var errors = __nccwpck_require__(67782); + +var bcrypt; + +function read(buf, options) { + return (pem.read(buf, options)); +} + +var MAGIC = 'openssh-key-v1'; + +function readSSHPrivate(type, buf, options) { + buf = new SSHBuffer({buffer: buf}); + + var magic = buf.readCString(); + assert.strictEqual(magic, MAGIC, 'bad magic string'); + + var cipher = buf.readString(); + var kdf = buf.readString(); + var kdfOpts = buf.readBuffer(); + + var nkeys = buf.readInt(); + if (nkeys !== 1) { + throw (new Error('OpenSSH-format key file contains ' + + 'multiple keys: this is unsupported.')); + } + + var pubKey = buf.readBuffer(); + + if (type === 'public') { + assert.ok(buf.atEnd(), 'excess bytes left after key'); + return (rfc4253.read(pubKey)); + } + + var privKeyBlob = buf.readBuffer(); + assert.ok(buf.atEnd(), 'excess bytes left after key'); + + var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts }); + switch (kdf) { + case 'none': + if (cipher !== 'none') { + throw (new Error('OpenSSH-format key uses KDF "none" ' + + 'but specifies a cipher other than "none"')); + } + break; + case 'bcrypt': + var salt = kdfOptsBuf.readBuffer(); + var rounds = kdfOptsBuf.readInt(); + var cinf = utils.opensshCipherInfo(cipher); + if (bcrypt === undefined) { + bcrypt = __nccwpck_require__(77567); + } + + if (typeof (options.passphrase) === 'string') { + options.passphrase = Buffer.from(options.passphrase, + 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'OpenSSH')); + } + + var pass = new Uint8Array(options.passphrase); + var salti = new Uint8Array(salt); + /* Use the pbkdf to derive both the key and the IV. */ + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, + out, out.length, rounds); + if (res !== 0) { + throw (new Error('bcrypt_pbkdf function returned ' + + 'failure, parameters invalid')); + } + out = Buffer.from(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + var cipherStream = crypto.createDecipheriv(cinf.opensslName, + ckey, iv); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + if (e.toString().indexOf('bad decrypt') !== -1) { + throw (new Error('Incorrect passphrase ' + + 'supplied, could not decrypt key')); + } + throw (e); + }); + cipherStream.write(privKeyBlob); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privKeyBlob = Buffer.concat(chunks); + break; + default: + throw (new Error( + 'OpenSSH-format key uses unknown KDF "' + kdf + '"')); + } + + buf = new SSHBuffer({buffer: privKeyBlob}); + + var checkInt1 = buf.readInt(); + var checkInt2 = buf.readInt(); + if (checkInt1 !== checkInt2) { + throw (new Error('Incorrect passphrase supplied, could not ' + + 'decrypt key')); + } + + var ret = {}; + var key = rfc4253.readInternal(ret, 'private', buf.remainder()); + + buf.skip(ret.consumed); + + var comment = buf.readString(); + key.comment = comment; + + return (key); +} + +function write(key, options) { + var pubKey; + if (PrivateKey.isPrivateKey(key)) + pubKey = key.toPublic(); + else + pubKey = key; + + var cipher = 'none'; + var kdf = 'none'; + var kdfopts = Buffer.alloc(0); + var cinf = { blockSize: 8 }; + var passphrase; + if (options !== undefined) { + passphrase = options.passphrase; + if (typeof (passphrase) === 'string') + passphrase = Buffer.from(passphrase, 'utf-8'); + if (passphrase !== undefined) { + assert.buffer(passphrase, 'options.passphrase'); + assert.optionalString(options.cipher, 'options.cipher'); + cipher = options.cipher; + if (cipher === undefined) + cipher = 'aes128-ctr'; + cinf = utils.opensshCipherInfo(cipher); + kdf = 'bcrypt'; + } + } + + var privBuf; + if (PrivateKey.isPrivateKey(key)) { + privBuf = new SSHBuffer({}); + var checkInt = crypto.randomBytes(4).readUInt32BE(0); + privBuf.writeInt(checkInt); + privBuf.writeInt(checkInt); + privBuf.write(key.toBuffer('rfc4253')); + privBuf.writeString(key.comment || ''); + + var n = 1; + while (privBuf._offset % cinf.blockSize !== 0) + privBuf.writeChar(n++); + privBuf = privBuf.toBuffer(); + } + + switch (kdf) { + case 'none': + break; + case 'bcrypt': + var salt = crypto.randomBytes(16); + var rounds = 16; + var kdfssh = new SSHBuffer({}); + kdfssh.writeBuffer(salt); + kdfssh.writeInt(rounds); + kdfopts = kdfssh.toBuffer(); + + if (bcrypt === undefined) { + bcrypt = __nccwpck_require__(77567); + } + var pass = new Uint8Array(passphrase); + var salti = new Uint8Array(salt); + /* Use the pbkdf to derive both the key and the IV. */ + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, + out, out.length, rounds); + if (res !== 0) { + throw (new Error('bcrypt_pbkdf function returned ' + + 'failure, parameters invalid')); + } + out = Buffer.from(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + + var cipherStream = crypto.createCipheriv(cinf.opensslName, + ckey, iv); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + throw (e); + }); + cipherStream.write(privBuf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privBuf = Buffer.concat(chunks); + break; + default: + throw (new Error('Unsupported kdf ' + kdf)); + } + + var buf = new SSHBuffer({}); + + buf.writeCString(MAGIC); + buf.writeString(cipher); /* cipher */ + buf.writeString(kdf); /* kdf */ + buf.writeBuffer(kdfopts); /* kdfoptions */ + + buf.writeInt(1); /* nkeys */ + buf.writeBuffer(pubKey.toBuffer('rfc4253')); + + if (privBuf) + buf.writeBuffer(privBuf); + + buf = buf.toBuffer(); + + var header; + if (PrivateKey.isPrivateKey(key)) + header = 'OPENSSH PRIVATE KEY'; + else + header = 'OPENSSH PUBLIC KEY'; + + var tmp = buf.toString('base64'); + var len = tmp.length + (tmp.length / 70) + + 18 + 16 + header.length*2 + 10; + buf = Buffer.alloc(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 70; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} + + +/***/ }), + +/***/ 44654: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var rfc4253 = __nccwpck_require__(66382); +var utils = __nccwpck_require__(8085); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); + +var sshpriv = __nccwpck_require__(898); + +/*JSSTYLED*/ +var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/; +/*JSSTYLED*/ +var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t\n]+([a-zA-Z0-9+\/][a-zA-Z0-9+\/ \t\n=]*)([^a-zA-Z0-9+\/ \t\n=].*)?$/; + +function read(buf, options) { + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + + var trimmed = buf.trim().replace(/[\\\r]/g, ''); + var m = trimmed.match(SSHKEY_RE); + if (!m) + m = trimmed.match(SSHKEY_RE2); + assert.ok(m, 'key must match regex'); + + var type = rfc4253.algToKeyType(m[1]); + var kbuf = Buffer.from(m[2], 'base64'); + + /* + * This is a bit tricky. If we managed to parse the key and locate the + * key comment with the regex, then do a non-partial read and assert + * that we have consumed all bytes. If we couldn't locate the key + * comment, though, there may be whitespace shenanigans going on that + * have conjoined the comment to the rest of the key. We do a partial + * read in this case to try to make the best out of a sorry situation. + */ + var key; + var ret = {}; + if (m[4]) { + try { + key = rfc4253.read(kbuf); + + } catch (e) { + m = trimmed.match(SSHKEY_RE2); + assert.ok(m, 'key must match regex'); + kbuf = Buffer.from(m[2], 'base64'); + key = rfc4253.readInternal(ret, 'public', kbuf); + } + } else { + key = rfc4253.readInternal(ret, 'public', kbuf); + } + + assert.strictEqual(type, key.type); + + if (m[4] && m[4].length > 0) { + key.comment = m[4]; + + } else if (ret.consumed) { + /* + * Now the magic: trying to recover the key comment when it's + * gotten conjoined to the key or otherwise shenanigan'd. + * + * Work out how much base64 we used, then drop all non-base64 + * chars from the beginning up to this point in the the string. + * Then offset in this and try to make up for missing = chars. + */ + var data = m[2] + (m[3] ? m[3] : ''); + var realOffset = Math.ceil(ret.consumed / 3) * 4; + data = data.slice(0, realOffset - 2). /*JSSTYLED*/ + replace(/[^a-zA-Z0-9+\/=]/g, '') + + data.slice(realOffset - 2); + + var padding = ret.consumed % 3; + if (padding > 0 && + data.slice(realOffset - 1, realOffset) !== '=') + realOffset--; + while (data.slice(realOffset, realOffset + 1) === '=') + realOffset++; + + /* Finally, grab what we think is the comment & clean it up. */ + var trailer = data.slice(realOffset); + trailer = trailer.replace(/[\r\n]/g, ' '). + replace(/^\s+/, ''); + if (trailer.match(/^[a-zA-Z0-9]/)) + key.comment = trailer; + } + + return (key); +} + +function write(key, options) { + assert.object(key); + if (!Key.isKey(key)) + throw (new Error('Must be a public key')); + + var parts = []; + var alg = rfc4253.keyTypeToAlg(key); + parts.push(alg); + + var buf = rfc4253.write(key); + parts.push(buf.toString('base64')); + + if (key.comment) + parts.push(key.comment); + + return (Buffer.from(parts.join(' '))); +} + + +/***/ }), + +/***/ 19238: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2016 Joyent, Inc. + +var x509 = __nccwpck_require__(3599); + +module.exports = { + read: read, + verify: x509.verify, + sign: x509.sign, + write: write +}; + +var assert = __nccwpck_require__(41706); +var asn1 = __nccwpck_require__(2); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var utils = __nccwpck_require__(8085); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var pem = __nccwpck_require__(73339); +var Identity = __nccwpck_require__(37046); +var Signature = __nccwpck_require__(5403); +var Certificate = __nccwpck_require__(43671); + +function read(buf, options) { + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + + var lines = buf.trim().split(/[\r\n]+/g); + + var m; + var si = -1; + while (!m && si < lines.length) { + m = lines[++si].match(/*JSSTYLED*/ + /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/); + } + assert.ok(m, 'invalid PEM header'); + + var m2; + var ei = lines.length; + while (!m2 && ei > 0) { + m2 = lines[--ei].match(/*JSSTYLED*/ + /[-]+[ ]*END CERTIFICATE[ ]*[-]+/); + } + assert.ok(m2, 'invalid PEM footer'); + + lines = lines.slice(si, ei + 1); + + var headers = {}; + while (true) { + lines = lines.slice(1); + m = lines[0].match(/*JSSTYLED*/ + /^([A-Za-z0-9-]+): (.+)$/); + if (!m) + break; + headers[m[1].toLowerCase()] = m[2]; + } + + /* Chop off the first and last lines */ + lines = lines.slice(0, -1).join(''); + buf = Buffer.from(lines, 'base64'); + + return (x509.read(buf, options)); +} + +function write(cert, options) { + var dbuf = x509.write(cert, options); + + var header = 'CERTIFICATE'; + var tmp = dbuf.toString('base64'); + var len = tmp.length + (tmp.length / 64) + + 18 + 16 + header.length*2 + 10; + var buf = Buffer.alloc(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 64; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} + + +/***/ }), + +/***/ 3599: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2017 Joyent, Inc. + +module.exports = { + read: read, + verify: verify, + sign: sign, + signAsync: signAsync, + write: write +}; + +var assert = __nccwpck_require__(41706); +var asn1 = __nccwpck_require__(2); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var utils = __nccwpck_require__(8085); +var Key = __nccwpck_require__(90316); +var PrivateKey = __nccwpck_require__(78512); +var pem = __nccwpck_require__(73339); +var Identity = __nccwpck_require__(37046); +var Signature = __nccwpck_require__(5403); +var Certificate = __nccwpck_require__(43671); +var pkcs8 = __nccwpck_require__(28414); + +/* + * This file is based on RFC5280 (X.509). + */ + +/* Helper to read in a single mpint */ +function readMPInt(der, nm) { + assert.strictEqual(der.peek(), asn1.Ber.Integer, + nm + ' is not an Integer'); + return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); +} + +function verify(cert, key) { + var sig = cert.signatures.x509; + assert.object(sig, 'x509 signature'); + + var algParts = sig.algo.split('-'); + if (algParts[0] !== key.type) + return (false); + + var blob = sig.cache; + if (blob === undefined) { + var der = new asn1.BerWriter(); + writeTBSCert(cert, der); + blob = der.buffer; + } + + var verifier = key.createVerify(algParts[1]); + verifier.write(blob); + return (verifier.verify(sig.signature)); +} + +function Local(i) { + return (asn1.Ber.Context | asn1.Ber.Constructor | i); +} + +function Context(i) { + return (asn1.Ber.Context | i); +} + +var SIGN_ALGS = { + 'rsa-md5': '1.2.840.113549.1.1.4', + 'rsa-sha1': '1.2.840.113549.1.1.5', + 'rsa-sha256': '1.2.840.113549.1.1.11', + 'rsa-sha384': '1.2.840.113549.1.1.12', + 'rsa-sha512': '1.2.840.113549.1.1.13', + 'dsa-sha1': '1.2.840.10040.4.3', + 'dsa-sha256': '2.16.840.1.101.3.4.3.2', + 'ecdsa-sha1': '1.2.840.10045.4.1', + 'ecdsa-sha256': '1.2.840.10045.4.3.2', + 'ecdsa-sha384': '1.2.840.10045.4.3.3', + 'ecdsa-sha512': '1.2.840.10045.4.3.4', + 'ed25519-sha512': '1.3.101.112' +}; +Object.keys(SIGN_ALGS).forEach(function (k) { + SIGN_ALGS[SIGN_ALGS[k]] = k; +}); +SIGN_ALGS['1.3.14.3.2.3'] = 'rsa-md5'; +SIGN_ALGS['1.3.14.3.2.29'] = 'rsa-sha1'; + +var EXTS = { + 'issuerKeyId': '2.5.29.35', + 'altName': '2.5.29.17', + 'basicConstraints': '2.5.29.19', + 'keyUsage': '2.5.29.15', + 'extKeyUsage': '2.5.29.37' +}; + +function read(buf, options) { + if (typeof (buf) === 'string') { + buf = Buffer.from(buf, 'binary'); + } + assert.buffer(buf, 'buf'); + + var der = new asn1.BerReader(buf); + + der.readSequence(); + if (Math.abs(der.length - der.remain) > 1) { + throw (new Error('DER sequence does not contain whole byte ' + + 'stream')); + } + + var tbsStart = der.offset; + der.readSequence(); + var sigOffset = der.offset + der.length; + var tbsEnd = sigOffset; + + if (der.peek() === Local(0)) { + der.readSequence(Local(0)); + var version = der.readInt(); + assert.ok(version <= 3, + 'only x.509 versions up to v3 supported'); + } + + var cert = {}; + cert.signatures = {}; + var sig = (cert.signatures.x509 = {}); + sig.extras = {}; + + cert.serial = readMPInt(der, 'serial'); + + der.readSequence(); + var after = der.offset + der.length; + var certAlgOid = der.readOID(); + var certAlg = SIGN_ALGS[certAlgOid]; + if (certAlg === undefined) + throw (new Error('unknown signature algorithm ' + certAlgOid)); + + der._offset = after; + cert.issuer = Identity.parseAsn1(der); + + der.readSequence(); + cert.validFrom = readDate(der); + cert.validUntil = readDate(der); + + cert.subjects = [Identity.parseAsn1(der)]; + + der.readSequence(); + after = der.offset + der.length; + cert.subjectKey = pkcs8.readPkcs8(undefined, 'public', der); + der._offset = after; + + /* issuerUniqueID */ + if (der.peek() === Local(1)) { + der.readSequence(Local(1)); + sig.extras.issuerUniqueID = + buf.slice(der.offset, der.offset + der.length); + der._offset += der.length; + } + + /* subjectUniqueID */ + if (der.peek() === Local(2)) { + der.readSequence(Local(2)); + sig.extras.subjectUniqueID = + buf.slice(der.offset, der.offset + der.length); + der._offset += der.length; + } + + /* extensions */ + if (der.peek() === Local(3)) { + der.readSequence(Local(3)); + var extEnd = der.offset + der.length; + der.readSequence(); + + while (der.offset < extEnd) + readExtension(cert, buf, der); + + assert.strictEqual(der.offset, extEnd); + } + + assert.strictEqual(der.offset, sigOffset); + + der.readSequence(); + after = der.offset + der.length; + var sigAlgOid = der.readOID(); + var sigAlg = SIGN_ALGS[sigAlgOid]; + if (sigAlg === undefined) + throw (new Error('unknown signature algorithm ' + sigAlgOid)); + der._offset = after; + + var sigData = der.readString(asn1.Ber.BitString, true); + if (sigData[0] === 0) + sigData = sigData.slice(1); + var algParts = sigAlg.split('-'); + + sig.signature = Signature.parse(sigData, algParts[0], 'asn1'); + sig.signature.hashAlgorithm = algParts[1]; + sig.algo = sigAlg; + sig.cache = buf.slice(tbsStart, tbsEnd); + + return (new Certificate(cert)); +} + +function readDate(der) { + if (der.peek() === asn1.Ber.UTCTime) { + return (utcTimeToDate(der.readString(asn1.Ber.UTCTime))); + } else if (der.peek() === asn1.Ber.GeneralizedTime) { + return (gTimeToDate(der.readString(asn1.Ber.GeneralizedTime))); + } else { + throw (new Error('Unsupported date format')); + } +} + +function writeDate(der, date) { + if (date.getUTCFullYear() >= 2050 || date.getUTCFullYear() < 1950) { + der.writeString(dateToGTime(date), asn1.Ber.GeneralizedTime); + } else { + der.writeString(dateToUTCTime(date), asn1.Ber.UTCTime); + } +} + +/* RFC5280, section 4.2.1.6 (GeneralName type) */ +var ALTNAME = { + OtherName: Local(0), + RFC822Name: Context(1), + DNSName: Context(2), + X400Address: Local(3), + DirectoryName: Local(4), + EDIPartyName: Local(5), + URI: Context(6), + IPAddress: Context(7), + OID: Context(8) +}; + +/* RFC5280, section 4.2.1.12 (KeyPurposeId) */ +var EXTPURPOSE = { + 'serverAuth': '1.3.6.1.5.5.7.3.1', + 'clientAuth': '1.3.6.1.5.5.7.3.2', + 'codeSigning': '1.3.6.1.5.5.7.3.3', + + /* See https://github.com/joyent/oid-docs/blob/master/root.md */ + 'joyentDocker': '1.3.6.1.4.1.38678.1.4.1', + 'joyentCmon': '1.3.6.1.4.1.38678.1.4.2' +}; +var EXTPURPOSE_REV = {}; +Object.keys(EXTPURPOSE).forEach(function (k) { + EXTPURPOSE_REV[EXTPURPOSE[k]] = k; +}); + +var KEYUSEBITS = [ + 'signature', 'identity', 'keyEncryption', + 'encryption', 'keyAgreement', 'ca', 'crl' +]; + +function readExtension(cert, buf, der) { + der.readSequence(); + var after = der.offset + der.length; + var extId = der.readOID(); + var id; + var sig = cert.signatures.x509; + if (!sig.extras.exts) + sig.extras.exts = []; + + var critical; + if (der.peek() === asn1.Ber.Boolean) + critical = der.readBoolean(); + + switch (extId) { + case (EXTS.basicConstraints): + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + var bcEnd = der.offset + der.length; + var ca = false; + if (der.peek() === asn1.Ber.Boolean) + ca = der.readBoolean(); + if (cert.purposes === undefined) + cert.purposes = []; + if (ca === true) + cert.purposes.push('ca'); + var bc = { oid: extId, critical: critical }; + if (der.offset < bcEnd && der.peek() === asn1.Ber.Integer) + bc.pathLen = der.readInt(); + sig.extras.exts.push(bc); + break; + case (EXTS.extKeyUsage): + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + if (cert.purposes === undefined) + cert.purposes = []; + var ekEnd = der.offset + der.length; + while (der.offset < ekEnd) { + var oid = der.readOID(); + cert.purposes.push(EXTPURPOSE_REV[oid] || oid); + } + /* + * This is a bit of a hack: in the case where we have a cert + * that's only allowed to do serverAuth or clientAuth (and not + * the other), we want to make sure all our Subjects are of + * the right type. But we already parsed our Subjects and + * decided if they were hosts or users earlier (since it appears + * first in the cert). + * + * So we go through and mutate them into the right kind here if + * it doesn't match. This might not be hugely beneficial, as it + * seems that single-purpose certs are not often seen in the + * wild. + */ + if (cert.purposes.indexOf('serverAuth') !== -1 && + cert.purposes.indexOf('clientAuth') === -1) { + cert.subjects.forEach(function (ide) { + if (ide.type !== 'host') { + ide.type = 'host'; + ide.hostname = ide.uid || + ide.email || + ide.components[0].value; + } + }); + } else if (cert.purposes.indexOf('clientAuth') !== -1 && + cert.purposes.indexOf('serverAuth') === -1) { + cert.subjects.forEach(function (ide) { + if (ide.type !== 'user') { + ide.type = 'user'; + ide.uid = ide.hostname || + ide.email || + ide.components[0].value; + } + }); + } + sig.extras.exts.push({ oid: extId, critical: critical }); + break; + case (EXTS.keyUsage): + der.readSequence(asn1.Ber.OctetString); + var bits = der.readString(asn1.Ber.BitString, true); + var setBits = readBitField(bits, KEYUSEBITS); + setBits.forEach(function (bit) { + if (cert.purposes === undefined) + cert.purposes = []; + if (cert.purposes.indexOf(bit) === -1) + cert.purposes.push(bit); + }); + sig.extras.exts.push({ oid: extId, critical: critical, + bits: bits }); + break; + case (EXTS.altName): + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + var aeEnd = der.offset + der.length; + while (der.offset < aeEnd) { + switch (der.peek()) { + case ALTNAME.OtherName: + case ALTNAME.EDIPartyName: + der.readSequence(); + der._offset += der.length; + break; + case ALTNAME.OID: + der.readOID(ALTNAME.OID); + break; + case ALTNAME.RFC822Name: + /* RFC822 specifies email addresses */ + var email = der.readString(ALTNAME.RFC822Name); + id = Identity.forEmail(email); + if (!cert.subjects[0].equals(id)) + cert.subjects.push(id); + break; + case ALTNAME.DirectoryName: + der.readSequence(ALTNAME.DirectoryName); + id = Identity.parseAsn1(der); + if (!cert.subjects[0].equals(id)) + cert.subjects.push(id); + break; + case ALTNAME.DNSName: + var host = der.readString( + ALTNAME.DNSName); + id = Identity.forHost(host); + if (!cert.subjects[0].equals(id)) + cert.subjects.push(id); + break; + default: + der.readString(der.peek()); + break; + } + } + sig.extras.exts.push({ oid: extId, critical: critical }); + break; + default: + sig.extras.exts.push({ + oid: extId, + critical: critical, + data: der.readString(asn1.Ber.OctetString, true) + }); + break; + } + + der._offset = after; +} + +var UTCTIME_RE = + /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; +function utcTimeToDate(t) { + var m = t.match(UTCTIME_RE); + assert.ok(m, 'timestamps must be in UTC'); + var d = new Date(); + + var thisYear = d.getUTCFullYear(); + var century = Math.floor(thisYear / 100) * 100; + + var year = parseInt(m[1], 10); + if (thisYear % 100 < 50 && year >= 60) + year += (century - 1); + else + year += century; + d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10)); + d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); + if (m[6] && m[6].length > 0) + d.setUTCSeconds(parseInt(m[6], 10)); + return (d); +} + +var GTIME_RE = + /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; +function gTimeToDate(t) { + var m = t.match(GTIME_RE); + assert.ok(m); + var d = new Date(); + + d.setUTCFullYear(parseInt(m[1], 10), parseInt(m[2], 10) - 1, + parseInt(m[3], 10)); + d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); + if (m[6] && m[6].length > 0) + d.setUTCSeconds(parseInt(m[6], 10)); + return (d); +} + +function zeroPad(n, m) { + if (m === undefined) + m = 2; + var s = '' + n; + while (s.length < m) + s = '0' + s; + return (s); +} + +function dateToUTCTime(d) { + var s = ''; + s += zeroPad(d.getUTCFullYear() % 100); + s += zeroPad(d.getUTCMonth() + 1); + s += zeroPad(d.getUTCDate()); + s += zeroPad(d.getUTCHours()); + s += zeroPad(d.getUTCMinutes()); + s += zeroPad(d.getUTCSeconds()); + s += 'Z'; + return (s); +} + +function dateToGTime(d) { + var s = ''; + s += zeroPad(d.getUTCFullYear(), 4); + s += zeroPad(d.getUTCMonth() + 1); + s += zeroPad(d.getUTCDate()); + s += zeroPad(d.getUTCHours()); + s += zeroPad(d.getUTCMinutes()); + s += zeroPad(d.getUTCSeconds()); + s += 'Z'; + return (s); +} + +function sign(cert, key) { + if (cert.signatures.x509 === undefined) + cert.signatures.x509 = {}; + var sig = cert.signatures.x509; + + sig.algo = key.type + '-' + key.defaultHashAlgorithm(); + if (SIGN_ALGS[sig.algo] === undefined) + return (false); + + var der = new asn1.BerWriter(); + writeTBSCert(cert, der); + var blob = der.buffer; + sig.cache = blob; + + var signer = key.createSign(); + signer.write(blob); + cert.signatures.x509.signature = signer.sign(); + + return (true); +} + +function signAsync(cert, signer, done) { + if (cert.signatures.x509 === undefined) + cert.signatures.x509 = {}; + var sig = cert.signatures.x509; + + var der = new asn1.BerWriter(); + writeTBSCert(cert, der); + var blob = der.buffer; + sig.cache = blob; + + signer(blob, function (err, signature) { + if (err) { + done(err); + return; + } + sig.algo = signature.type + '-' + signature.hashAlgorithm; + if (SIGN_ALGS[sig.algo] === undefined) { + done(new Error('Invalid signing algorithm "' + + sig.algo + '"')); + return; + } + sig.signature = signature; + done(); + }); +} + +function write(cert, options) { + var sig = cert.signatures.x509; + assert.object(sig, 'x509 signature'); + + var der = new asn1.BerWriter(); + der.startSequence(); + if (sig.cache) { + der._ensure(sig.cache.length); + sig.cache.copy(der._buf, der._offset); + der._offset += sig.cache.length; + } else { + writeTBSCert(cert, der); + } + + der.startSequence(); + der.writeOID(SIGN_ALGS[sig.algo]); + if (sig.algo.match(/^rsa-/)) + der.writeNull(); + der.endSequence(); + + var sigData = sig.signature.toBuffer('asn1'); + var data = Buffer.alloc(sigData.length + 1); + data[0] = 0; + sigData.copy(data, 1); + der.writeBuffer(data, asn1.Ber.BitString); + der.endSequence(); + + return (der.buffer); +} + +function writeTBSCert(cert, der) { + var sig = cert.signatures.x509; + assert.object(sig, 'x509 signature'); + + der.startSequence(); + + der.startSequence(Local(0)); + der.writeInt(2); + der.endSequence(); + + der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer); + + der.startSequence(); + der.writeOID(SIGN_ALGS[sig.algo]); + if (sig.algo.match(/^rsa-/)) + der.writeNull(); + der.endSequence(); + + cert.issuer.toAsn1(der); + + der.startSequence(); + writeDate(der, cert.validFrom); + writeDate(der, cert.validUntil); + der.endSequence(); + + var subject = cert.subjects[0]; + var altNames = cert.subjects.slice(1); + subject.toAsn1(der); + + pkcs8.writePkcs8(der, cert.subjectKey); + + if (sig.extras && sig.extras.issuerUniqueID) { + der.writeBuffer(sig.extras.issuerUniqueID, Local(1)); + } + + if (sig.extras && sig.extras.subjectUniqueID) { + der.writeBuffer(sig.extras.subjectUniqueID, Local(2)); + } + + if (altNames.length > 0 || subject.type === 'host' || + (cert.purposes !== undefined && cert.purposes.length > 0) || + (sig.extras && sig.extras.exts)) { + der.startSequence(Local(3)); + der.startSequence(); + + var exts = []; + if (cert.purposes !== undefined && cert.purposes.length > 0) { + exts.push({ + oid: EXTS.basicConstraints, + critical: true + }); + exts.push({ + oid: EXTS.keyUsage, + critical: true + }); + exts.push({ + oid: EXTS.extKeyUsage, + critical: true + }); + } + exts.push({ oid: EXTS.altName }); + if (sig.extras && sig.extras.exts) + exts = sig.extras.exts; + + for (var i = 0; i < exts.length; ++i) { + der.startSequence(); + der.writeOID(exts[i].oid); + + if (exts[i].critical !== undefined) + der.writeBoolean(exts[i].critical); + + if (exts[i].oid === EXTS.altName) { + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + if (subject.type === 'host') { + der.writeString(subject.hostname, + Context(2)); + } + for (var j = 0; j < altNames.length; ++j) { + if (altNames[j].type === 'host') { + der.writeString( + altNames[j].hostname, + ALTNAME.DNSName); + } else if (altNames[j].type === + 'email') { + der.writeString( + altNames[j].email, + ALTNAME.RFC822Name); + } else { + /* + * Encode anything else as a + * DN style name for now. + */ + der.startSequence( + ALTNAME.DirectoryName); + altNames[j].toAsn1(der); + der.endSequence(); + } + } + der.endSequence(); + der.endSequence(); + } else if (exts[i].oid === EXTS.basicConstraints) { + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + var ca = (cert.purposes.indexOf('ca') !== -1); + var pathLen = exts[i].pathLen; + der.writeBoolean(ca); + if (pathLen !== undefined) + der.writeInt(pathLen); + der.endSequence(); + der.endSequence(); + } else if (exts[i].oid === EXTS.extKeyUsage) { + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + cert.purposes.forEach(function (purpose) { + if (purpose === 'ca') + return; + if (KEYUSEBITS.indexOf(purpose) !== -1) + return; + var oid = purpose; + if (EXTPURPOSE[purpose] !== undefined) + oid = EXTPURPOSE[purpose]; + der.writeOID(oid); + }); + der.endSequence(); + der.endSequence(); + } else if (exts[i].oid === EXTS.keyUsage) { + der.startSequence(asn1.Ber.OctetString); + /* + * If we parsed this certificate from a byte + * stream (i.e. we didn't generate it in sshpk) + * then we'll have a ".bits" property on the + * ext with the original raw byte contents. + * + * If we have this, use it here instead of + * regenerating it. This guarantees we output + * the same data we parsed, so signatures still + * validate. + */ + if (exts[i].bits !== undefined) { + der.writeBuffer(exts[i].bits, + asn1.Ber.BitString); + } else { + var bits = writeBitField(cert.purposes, + KEYUSEBITS); + der.writeBuffer(bits, + asn1.Ber.BitString); + } + der.endSequence(); + } else { + der.writeBuffer(exts[i].data, + asn1.Ber.OctetString); + } + + der.endSequence(); + } + + der.endSequence(); + der.endSequence(); + } + + der.endSequence(); +} + +/* + * Reads an ASN.1 BER bitfield out of the Buffer produced by doing + * `BerReader#readString(asn1.Ber.BitString)`. That function gives us the raw + * contents of the BitString tag, which is a count of unused bits followed by + * the bits as a right-padded byte string. + * + * `bits` is the Buffer, `bitIndex` should contain an array of string names + * for the bits in the string, ordered starting with bit #0 in the ASN.1 spec. + * + * Returns an array of Strings, the names of the bits that were set to 1. + */ +function readBitField(bits, bitIndex) { + var bitLen = 8 * (bits.length - 1) - bits[0]; + var setBits = {}; + for (var i = 0; i < bitLen; ++i) { + var byteN = 1 + Math.floor(i / 8); + var bit = 7 - (i % 8); + var mask = 1 << bit; + var bitVal = ((bits[byteN] & mask) !== 0); + var name = bitIndex[i]; + if (bitVal && typeof (name) === 'string') { + setBits[name] = true; + } + } + return (Object.keys(setBits)); +} + +/* + * `setBits` is an array of strings, containing the names for each bit that + * sould be set to 1. `bitIndex` is same as in `readBitField()`. + * + * Returns a Buffer, ready to be written out with `BerWriter#writeString()`. + */ +function writeBitField(setBits, bitIndex) { + var bitLen = bitIndex.length; + var blen = Math.ceil(bitLen / 8); + var unused = blen * 8 - bitLen; + var bits = Buffer.alloc(1 + blen); // zero-filled + bits[0] = unused; + for (var i = 0; i < bitLen; ++i) { + var byteN = 1 + Math.floor(i / 8); + var bit = 7 - (i % 8); + var mask = 1 << bit; + var name = bitIndex[i]; + if (name === undefined) + continue; + var bitVal = (setBits.indexOf(name) !== -1); + if (bitVal) { + bits[byteN] |= mask; + } + } + return (bits); +} + + +/***/ }), + +/***/ 37046: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2017 Joyent, Inc. + +module.exports = Identity; + +var assert = __nccwpck_require__(41706); +var algs = __nccwpck_require__(67625); +var crypto = __nccwpck_require__(6113); +var Fingerprint = __nccwpck_require__(54442); +var Signature = __nccwpck_require__(5403); +var errs = __nccwpck_require__(67782); +var util = __nccwpck_require__(73837); +var utils = __nccwpck_require__(8085); +var asn1 = __nccwpck_require__(2); +var Buffer = (__nccwpck_require__(77556).Buffer); + +/*JSSTYLED*/ +var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i; + +var oids = {}; +oids.cn = '2.5.4.3'; +oids.o = '2.5.4.10'; +oids.ou = '2.5.4.11'; +oids.l = '2.5.4.7'; +oids.s = '2.5.4.8'; +oids.c = '2.5.4.6'; +oids.sn = '2.5.4.4'; +oids.postalCode = '2.5.4.17'; +oids.serialNumber = '2.5.4.5'; +oids.street = '2.5.4.9'; +oids.x500UniqueIdentifier = '2.5.4.45'; +oids.role = '2.5.4.72'; +oids.telephoneNumber = '2.5.4.20'; +oids.description = '2.5.4.13'; +oids.dc = '0.9.2342.19200300.100.1.25'; +oids.uid = '0.9.2342.19200300.100.1.1'; +oids.mail = '0.9.2342.19200300.100.1.3'; +oids.title = '2.5.4.12'; +oids.gn = '2.5.4.42'; +oids.initials = '2.5.4.43'; +oids.pseudonym = '2.5.4.65'; +oids.emailAddress = '1.2.840.113549.1.9.1'; + +var unoids = {}; +Object.keys(oids).forEach(function (k) { + unoids[oids[k]] = k; +}); + +function Identity(opts) { + var self = this; + assert.object(opts, 'options'); + assert.arrayOfObject(opts.components, 'options.components'); + this.components = opts.components; + this.componentLookup = {}; + this.components.forEach(function (c) { + if (c.name && !c.oid) + c.oid = oids[c.name]; + if (c.oid && !c.name) + c.name = unoids[c.oid]; + if (self.componentLookup[c.name] === undefined) + self.componentLookup[c.name] = []; + self.componentLookup[c.name].push(c); + }); + if (this.componentLookup.cn && this.componentLookup.cn.length > 0) { + this.cn = this.componentLookup.cn[0].value; + } + assert.optionalString(opts.type, 'options.type'); + if (opts.type === undefined) { + if (this.components.length === 1 && + this.componentLookup.cn && + this.componentLookup.cn.length === 1 && + this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { + this.type = 'host'; + this.hostname = this.componentLookup.cn[0].value; + + } else if (this.componentLookup.dc && + this.components.length === this.componentLookup.dc.length) { + this.type = 'host'; + this.hostname = this.componentLookup.dc.map( + function (c) { + return (c.value); + }).join('.'); + + } else if (this.componentLookup.uid && + this.components.length === + this.componentLookup.uid.length) { + this.type = 'user'; + this.uid = this.componentLookup.uid[0].value; + + } else if (this.componentLookup.cn && + this.componentLookup.cn.length === 1 && + this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { + this.type = 'host'; + this.hostname = this.componentLookup.cn[0].value; + + } else if (this.componentLookup.uid && + this.componentLookup.uid.length === 1) { + this.type = 'user'; + this.uid = this.componentLookup.uid[0].value; + + } else if (this.componentLookup.mail && + this.componentLookup.mail.length === 1) { + this.type = 'email'; + this.email = this.componentLookup.mail[0].value; + + } else if (this.componentLookup.cn && + this.componentLookup.cn.length === 1) { + this.type = 'user'; + this.uid = this.componentLookup.cn[0].value; + + } else { + this.type = 'unknown'; + } + } else { + this.type = opts.type; + if (this.type === 'host') + this.hostname = opts.hostname; + else if (this.type === 'user') + this.uid = opts.uid; + else if (this.type === 'email') + this.email = opts.email; + else + throw (new Error('Unknown type ' + this.type)); + } +} + +Identity.prototype.toString = function () { + return (this.components.map(function (c) { + var n = c.name.toUpperCase(); + /*JSSTYLED*/ + n = n.replace(/=/g, '\\='); + var v = c.value; + /*JSSTYLED*/ + v = v.replace(/,/g, '\\,'); + return (n + '=' + v); + }).join(', ')); +}; + +Identity.prototype.get = function (name, asArray) { + assert.string(name, 'name'); + var arr = this.componentLookup[name]; + if (arr === undefined || arr.length === 0) + return (undefined); + if (!asArray && arr.length > 1) + throw (new Error('Multiple values for attribute ' + name)); + if (!asArray) + return (arr[0].value); + return (arr.map(function (c) { + return (c.value); + })); +}; + +Identity.prototype.toArray = function (idx) { + return (this.components.map(function (c) { + return ({ + name: c.name, + value: c.value + }); + })); +}; + +/* + * These are from X.680 -- PrintableString allowed chars are in section 37.4 + * table 8. Spec for IA5Strings is "1,6 + SPACE + DEL" where 1 refers to + * ISO IR #001 (standard ASCII control characters) and 6 refers to ISO IR #006 + * (the basic ASCII character set). + */ +/* JSSTYLED */ +var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/; +/* JSSTYLED */ +var NOT_IA5 = /[^\x00-\x7f]/; + +Identity.prototype.toAsn1 = function (der, tag) { + der.startSequence(tag); + this.components.forEach(function (c) { + der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set); + der.startSequence(); + der.writeOID(c.oid); + /* + * If we fit in a PrintableString, use that. Otherwise use an + * IA5String or UTF8String. + * + * If this identity was parsed from a DN, use the ASN.1 types + * from the original representation (otherwise this might not + * be a full match for the original in some validators). + */ + if (c.asn1type === asn1.Ber.Utf8String || + c.value.match(NOT_IA5)) { + var v = Buffer.from(c.value, 'utf8'); + der.writeBuffer(v, asn1.Ber.Utf8String); + + } else if (c.asn1type === asn1.Ber.IA5String || + c.value.match(NOT_PRINTABLE)) { + der.writeString(c.value, asn1.Ber.IA5String); + + } else { + var type = asn1.Ber.PrintableString; + if (c.asn1type !== undefined) + type = c.asn1type; + der.writeString(c.value, type); + } + der.endSequence(); + der.endSequence(); + }); + der.endSequence(); +}; + +function globMatch(a, b) { + if (a === '**' || b === '**') + return (true); + var aParts = a.split('.'); + var bParts = b.split('.'); + if (aParts.length !== bParts.length) + return (false); + for (var i = 0; i < aParts.length; ++i) { + if (aParts[i] === '*' || bParts[i] === '*') + continue; + if (aParts[i] !== bParts[i]) + return (false); + } + return (true); +} + +Identity.prototype.equals = function (other) { + if (!Identity.isIdentity(other, [1, 0])) + return (false); + if (other.components.length !== this.components.length) + return (false); + for (var i = 0; i < this.components.length; ++i) { + if (this.components[i].oid !== other.components[i].oid) + return (false); + if (!globMatch(this.components[i].value, + other.components[i].value)) { + return (false); + } + } + return (true); +}; + +Identity.forHost = function (hostname) { + assert.string(hostname, 'hostname'); + return (new Identity({ + type: 'host', + hostname: hostname, + components: [ { name: 'cn', value: hostname } ] + })); +}; + +Identity.forUser = function (uid) { + assert.string(uid, 'uid'); + return (new Identity({ + type: 'user', + uid: uid, + components: [ { name: 'uid', value: uid } ] + })); +}; + +Identity.forEmail = function (email) { + assert.string(email, 'email'); + return (new Identity({ + type: 'email', + email: email, + components: [ { name: 'mail', value: email } ] + })); +}; + +Identity.parseDN = function (dn) { + assert.string(dn, 'dn'); + var parts = ['']; + var idx = 0; + var rem = dn; + while (rem.length > 0) { + var m; + /*JSSTYLED*/ + if ((m = /^,/.exec(rem)) !== null) { + parts[++idx] = ''; + rem = rem.slice(m[0].length); + /*JSSTYLED*/ + } else if ((m = /^\\,/.exec(rem)) !== null) { + parts[idx] += ','; + rem = rem.slice(m[0].length); + /*JSSTYLED*/ + } else if ((m = /^\\./.exec(rem)) !== null) { + parts[idx] += m[0]; + rem = rem.slice(m[0].length); + /*JSSTYLED*/ + } else if ((m = /^[^\\,]+/.exec(rem)) !== null) { + parts[idx] += m[0]; + rem = rem.slice(m[0].length); + } else { + throw (new Error('Failed to parse DN')); + } + } + var cmps = parts.map(function (c) { + c = c.trim(); + var eqPos = c.indexOf('='); + while (eqPos > 0 && c.charAt(eqPos - 1) === '\\') + eqPos = c.indexOf('=', eqPos + 1); + if (eqPos === -1) { + throw (new Error('Failed to parse DN')); + } + /*JSSTYLED*/ + var name = c.slice(0, eqPos).toLowerCase().replace(/\\=/g, '='); + var value = c.slice(eqPos + 1); + return ({ name: name, value: value }); + }); + return (new Identity({ components: cmps })); +}; + +Identity.fromArray = function (components) { + assert.arrayOfObject(components, 'components'); + components.forEach(function (cmp) { + assert.object(cmp, 'component'); + assert.string(cmp.name, 'component.name'); + if (!Buffer.isBuffer(cmp.value) && + !(typeof (cmp.value) === 'string')) { + throw (new Error('Invalid component value')); + } + }); + return (new Identity({ components: components })); +}; + +Identity.parseAsn1 = function (der, top) { + var components = []; + der.readSequence(top); + var end = der.offset + der.length; + while (der.offset < end) { + der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set); + var after = der.offset + der.length; + der.readSequence(); + var oid = der.readOID(); + var type = der.peek(); + var value; + switch (type) { + case asn1.Ber.PrintableString: + case asn1.Ber.IA5String: + case asn1.Ber.OctetString: + case asn1.Ber.T61String: + value = der.readString(type); + break; + case asn1.Ber.Utf8String: + value = der.readString(type, true); + value = value.toString('utf8'); + break; + case asn1.Ber.CharacterString: + case asn1.Ber.BMPString: + value = der.readString(type, true); + value = value.toString('utf16le'); + break; + default: + throw (new Error('Unknown asn1 type ' + type)); + } + components.push({ oid: oid, asn1type: type, value: value }); + der._offset = after; + } + der._offset = end; + return (new Identity({ + components: components + })); +}; + +Identity.isIdentity = function (obj, ver) { + return (utils.isCompatible(obj, Identity, ver)); +}; + +/* + * API versions for Identity: + * [1,0] -- initial ver + */ +Identity.prototype._sshpkApiVersion = [1, 0]; + +Identity._oldVersionDetect = function (obj) { + return ([1, 0]); +}; + + +/***/ }), + +/***/ 8547: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +var Key = __nccwpck_require__(90316); +var Fingerprint = __nccwpck_require__(54442); +var Signature = __nccwpck_require__(5403); +var PrivateKey = __nccwpck_require__(78512); +var Certificate = __nccwpck_require__(43671); +var Identity = __nccwpck_require__(37046); +var errs = __nccwpck_require__(67782); + +module.exports = { + /* top-level classes */ + Key: Key, + parseKey: Key.parse, + Fingerprint: Fingerprint, + parseFingerprint: Fingerprint.parse, + Signature: Signature, + parseSignature: Signature.parse, + PrivateKey: PrivateKey, + parsePrivateKey: PrivateKey.parse, + generatePrivateKey: PrivateKey.generate, + Certificate: Certificate, + parseCertificate: Certificate.parse, + createSelfSignedCertificate: Certificate.createSelfSigned, + createCertificate: Certificate.create, + Identity: Identity, + identityFromDN: Identity.parseDN, + identityForHost: Identity.forHost, + identityForUser: Identity.forUser, + identityForEmail: Identity.forEmail, + identityFromArray: Identity.fromArray, + + /* errors */ + FingerprintFormatError: errs.FingerprintFormatError, + InvalidAlgorithmError: errs.InvalidAlgorithmError, + KeyParseError: errs.KeyParseError, + SignatureParseError: errs.SignatureParseError, + KeyEncryptedError: errs.KeyEncryptedError, + CertificateParseError: errs.CertificateParseError +}; + + +/***/ }), + +/***/ 90316: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2018 Joyent, Inc. + +module.exports = Key; + +var assert = __nccwpck_require__(41706); +var algs = __nccwpck_require__(67625); +var crypto = __nccwpck_require__(6113); +var Fingerprint = __nccwpck_require__(54442); +var Signature = __nccwpck_require__(5403); +var DiffieHellman = (__nccwpck_require__(24527).DiffieHellman); +var errs = __nccwpck_require__(67782); +var utils = __nccwpck_require__(8085); +var PrivateKey = __nccwpck_require__(78512); +var edCompat; + +try { + edCompat = __nccwpck_require__(58801); +} catch (e) { + /* Just continue through, and bail out if we try to use it. */ +} + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; + +var formats = {}; +formats['auto'] = __nccwpck_require__(20535); +formats['pem'] = __nccwpck_require__(73339); +formats['pkcs1'] = __nccwpck_require__(45540); +formats['pkcs8'] = __nccwpck_require__(28414); +formats['rfc4253'] = __nccwpck_require__(66382); +formats['ssh'] = __nccwpck_require__(44654); +formats['ssh-private'] = __nccwpck_require__(898); +formats['openssh'] = formats['ssh-private']; +formats['dnssec'] = __nccwpck_require__(7167); +formats['putty'] = __nccwpck_require__(8086); +formats['ppk'] = formats['putty']; + +function Key(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.parts, 'options.parts'); + assert.string(opts.type, 'options.type'); + assert.optionalString(opts.comment, 'options.comment'); + + var algInfo = algs.info[opts.type]; + if (typeof (algInfo) !== 'object') + throw (new InvalidAlgorithmError(opts.type)); + + var partLookup = {}; + for (var i = 0; i < opts.parts.length; ++i) { + var part = opts.parts[i]; + partLookup[part.name] = part; + } + + this.type = opts.type; + this.parts = opts.parts; + this.part = partLookup; + this.comment = undefined; + this.source = opts.source; + + /* for speeding up hashing/fingerprint operations */ + this._rfc4253Cache = opts._rfc4253Cache; + this._hashCache = {}; + + var sz; + this.curve = undefined; + if (this.type === 'ecdsa') { + var curve = this.part.curve.data.toString(); + this.curve = curve; + sz = algs.curves[curve].size; + } else if (this.type === 'ed25519' || this.type === 'curve25519') { + sz = 256; + this.curve = 'curve25519'; + } else { + var szPart = this.part[algInfo.sizePart]; + sz = szPart.data.length; + sz = sz * 8 - utils.countZeros(szPart.data); + } + this.size = sz; +} + +Key.formats = formats; + +Key.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'ssh'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + if (format === 'rfc4253') { + if (this._rfc4253Cache === undefined) + this._rfc4253Cache = formats['rfc4253'].write(this); + return (this._rfc4253Cache); + } + + return (formats[format].write(this, options)); +}; + +Key.prototype.toString = function (format, options) { + return (this.toBuffer(format, options).toString()); +}; + +Key.prototype.hash = function (algo, type) { + assert.string(algo, 'algorithm'); + assert.optionalString(type, 'type'); + if (type === undefined) + type = 'ssh'; + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === undefined) + throw (new InvalidAlgorithmError(algo)); + + var cacheKey = algo + '||' + type; + if (this._hashCache[cacheKey]) + return (this._hashCache[cacheKey]); + + var buf; + if (type === 'ssh') { + buf = this.toBuffer('rfc4253'); + } else if (type === 'spki') { + buf = formats.pkcs8.pkcs8ToBuffer(this); + } else { + throw (new Error('Hash type ' + type + ' not supported')); + } + var hash = crypto.createHash(algo).update(buf).digest(); + this._hashCache[cacheKey] = hash; + return (hash); +}; + +Key.prototype.fingerprint = function (algo, type) { + if (algo === undefined) + algo = 'sha256'; + if (type === undefined) + type = 'ssh'; + assert.string(algo, 'algorithm'); + assert.string(type, 'type'); + var opts = { + type: 'key', + hash: this.hash(algo, type), + algorithm: algo, + hashType: type + }; + return (new Fingerprint(opts)); +}; + +Key.prototype.defaultHashAlgorithm = function () { + var hashAlgo = 'sha1'; + if (this.type === 'rsa') + hashAlgo = 'sha256'; + if (this.type === 'dsa' && this.size > 1024) + hashAlgo = 'sha256'; + if (this.type === 'ed25519') + hashAlgo = 'sha512'; + if (this.type === 'ecdsa') { + if (this.size <= 256) + hashAlgo = 'sha256'; + else if (this.size <= 384) + hashAlgo = 'sha384'; + else + hashAlgo = 'sha512'; + } + return (hashAlgo); +}; + +Key.prototype.createVerify = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Verifier(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldVerify = v.verify.bind(v); + var key = this.toBuffer('pkcs8'); + var curve = this.curve; + var self = this; + v.verify = function (signature, fmt) { + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== self.type) + return (false); + if (signature.hashAlgorithm && + signature.hashAlgorithm !== hashAlgo) + return (false); + if (signature.curve && self.type === 'ecdsa' && + signature.curve !== curve) + return (false); + return (oldVerify(key, signature.toBuffer('asn1'))); + + } else if (typeof (signature) === 'string' || + Buffer.isBuffer(signature)) { + return (oldVerify(key, signature, fmt)); + + /* + * Avoid doing this on valid arguments, walking the prototype + * chain can be quite slow. + */ + } else if (Signature.isSignature(signature, [1, 0])) { + throw (new Error('signature was created by too old ' + + 'a version of sshpk and cannot be verified')); + + } else { + throw (new TypeError('signature must be a string, ' + + 'Buffer, or Signature object')); + } + }; + return (v); +}; + +Key.prototype.createDiffieHellman = function () { + if (this.type === 'rsa') + throw (new Error('RSA keys do not support Diffie-Hellman')); + + return (new DiffieHellman(this)); +}; +Key.prototype.createDH = Key.prototype.createDiffieHellman; + +Key.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + if (k instanceof PrivateKey) + k = k.toPublic(); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +Key.isKey = function (obj, ver) { + return (utils.isCompatible(obj, Key, ver)); +}; + +/* + * API versions for Key: + * [1,0] -- initial ver, may take Signature for createVerify or may not + * [1,1] -- added pkcs1, pkcs8 formats + * [1,2] -- added auto, ssh-private, openssh formats + * [1,3] -- added defaultHashAlgorithm + * [1,4] -- added ed support, createDH + * [1,5] -- first explicitly tagged version + * [1,6] -- changed ed25519 part names + * [1,7] -- spki hash types + */ +Key.prototype._sshpkApiVersion = [1, 7]; + +Key._oldVersionDetect = function (obj) { + assert.func(obj.toBuffer); + assert.func(obj.fingerprint); + if (obj.createDH) + return ([1, 4]); + if (obj.defaultHashAlgorithm) + return ([1, 3]); + if (obj.formats['auto']) + return ([1, 2]); + if (obj.formats['pkcs1']) + return ([1, 1]); + return ([1, 0]); +}; + + +/***/ }), + +/***/ 78512: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2017 Joyent, Inc. + +module.exports = PrivateKey; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var crypto = __nccwpck_require__(6113); +var Fingerprint = __nccwpck_require__(54442); +var Signature = __nccwpck_require__(5403); +var errs = __nccwpck_require__(67782); +var util = __nccwpck_require__(73837); +var utils = __nccwpck_require__(8085); +var dhe = __nccwpck_require__(24527); +var generateECDSA = dhe.generateECDSA; +var generateED25519 = dhe.generateED25519; +var edCompat = __nccwpck_require__(58801); +var nacl = __nccwpck_require__(59595); + +var Key = __nccwpck_require__(90316); + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; +var KeyEncryptedError = errs.KeyEncryptedError; + +var formats = {}; +formats['auto'] = __nccwpck_require__(20535); +formats['pem'] = __nccwpck_require__(73339); +formats['pkcs1'] = __nccwpck_require__(45540); +formats['pkcs8'] = __nccwpck_require__(28414); +formats['rfc4253'] = __nccwpck_require__(66382); +formats['ssh-private'] = __nccwpck_require__(898); +formats['openssh'] = formats['ssh-private']; +formats['ssh'] = formats['ssh-private']; +formats['dnssec'] = __nccwpck_require__(7167); + +function PrivateKey(opts) { + assert.object(opts, 'options'); + Key.call(this, opts); + + this._pubCache = undefined; +} +util.inherits(PrivateKey, Key); + +PrivateKey.formats = formats; + +PrivateKey.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'pkcs1'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + return (formats[format].write(this, options)); +}; + +PrivateKey.prototype.hash = function (algo, type) { + return (this.toPublic().hash(algo, type)); +}; + +PrivateKey.prototype.fingerprint = function (algo, type) { + return (this.toPublic().fingerprint(algo, type)); +}; + +PrivateKey.prototype.toPublic = function () { + if (this._pubCache) + return (this._pubCache); + + var algInfo = algs.info[this.type]; + var pubParts = []; + for (var i = 0; i < algInfo.parts.length; ++i) { + var p = algInfo.parts[i]; + pubParts.push(this.part[p]); + } + + this._pubCache = new Key({ + type: this.type, + source: this, + parts: pubParts + }); + if (this.comment) + this._pubCache.comment = this.comment; + return (this._pubCache); +}; + +PrivateKey.prototype.derive = function (newType) { + assert.string(newType, 'type'); + var priv, pub, pair; + + if (this.type === 'ed25519' && newType === 'curve25519') { + priv = this.part.k.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + + pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); + + return (new PrivateKey({ + type: 'curve25519', + parts: [ + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } + ] + })); + } else if (this.type === 'curve25519' && newType === 'ed25519') { + priv = this.part.k.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + + pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); + + return (new PrivateKey({ + type: 'ed25519', + parts: [ + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } + ] + })); + } + throw (new Error('Key derivation not supported from ' + this.type + + ' to ' + newType)); +}; + +PrivateKey.prototype.createVerify = function (hashAlgo) { + return (this.toPublic().createVerify(hashAlgo)); +}; + +PrivateKey.prototype.createSign = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Signer(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldSign = v.sign.bind(v); + var key = this.toBuffer('pkcs1'); + var type = this.type; + var curve = this.curve; + v.sign = function () { + var sig = oldSign(key); + if (typeof (sig) === 'string') + sig = Buffer.from(sig, 'binary'); + sig = Signature.parse(sig, type, 'asn1'); + sig.hashAlgorithm = hashAlgo; + sig.curve = curve; + return (sig); + }; + return (v); +}; + +PrivateKey.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + assert.ok(k instanceof PrivateKey, 'key is not a private key'); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +PrivateKey.isPrivateKey = function (obj, ver) { + return (utils.isCompatible(obj, PrivateKey, ver)); +}; + +PrivateKey.generate = function (type, options) { + if (options === undefined) + options = {}; + assert.object(options, 'options'); + + switch (type) { + case 'ecdsa': + if (options.curve === undefined) + options.curve = 'nistp256'; + assert.string(options.curve, 'options.curve'); + return (generateECDSA(options.curve)); + case 'ed25519': + return (generateED25519()); + default: + throw (new Error('Key generation not supported with key ' + + 'type "' + type + '"')); + } +}; + +/* + * API versions for PrivateKey: + * [1,0] -- initial ver + * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats + * [1,2] -- added defaultHashAlgorithm + * [1,3] -- added derive, ed, createDH + * [1,4] -- first tagged version + * [1,5] -- changed ed25519 part names and format + * [1,6] -- type arguments for hash() and fingerprint() + */ +PrivateKey.prototype._sshpkApiVersion = [1, 6]; + +PrivateKey._oldVersionDetect = function (obj) { + assert.func(obj.toPublic); + assert.func(obj.createSign); + if (obj.derive) + return ([1, 3]); + if (obj.defaultHashAlgorithm) + return ([1, 2]); + if (obj.formats['auto']) + return ([1, 1]); + return ([1, 0]); +}; + + +/***/ }), + +/***/ 5403: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +module.exports = Signature; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var algs = __nccwpck_require__(67625); +var crypto = __nccwpck_require__(6113); +var errs = __nccwpck_require__(67782); +var utils = __nccwpck_require__(8085); +var asn1 = __nccwpck_require__(2); +var SSHBuffer = __nccwpck_require__(49470); + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var SignatureParseError = errs.SignatureParseError; + +function Signature(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.parts, 'options.parts'); + assert.string(opts.type, 'options.type'); + + var partLookup = {}; + for (var i = 0; i < opts.parts.length; ++i) { + var part = opts.parts[i]; + partLookup[part.name] = part; + } + + this.type = opts.type; + this.hashAlgorithm = opts.hashAlgo; + this.curve = opts.curve; + this.parts = opts.parts; + this.part = partLookup; +} + +Signature.prototype.toBuffer = function (format) { + if (format === undefined) + format = 'asn1'; + assert.string(format, 'format'); + + var buf; + var stype = 'ssh-' + this.type; + + switch (this.type) { + case 'rsa': + switch (this.hashAlgorithm) { + case 'sha256': + stype = 'rsa-sha2-256'; + break; + case 'sha512': + stype = 'rsa-sha2-512'; + break; + case 'sha1': + case undefined: + break; + default: + throw (new Error('SSH signature ' + + 'format does not support hash ' + + 'algorithm ' + this.hashAlgorithm)); + } + if (format === 'ssh') { + buf = new SSHBuffer({}); + buf.writeString(stype); + buf.writePart(this.part.sig); + return (buf.toBuffer()); + } else { + return (this.part.sig.data); + } + break; + + case 'ed25519': + if (format === 'ssh') { + buf = new SSHBuffer({}); + buf.writeString(stype); + buf.writePart(this.part.sig); + return (buf.toBuffer()); + } else { + return (this.part.sig.data); + } + break; + + case 'dsa': + case 'ecdsa': + var r, s; + if (format === 'asn1') { + var der = new asn1.BerWriter(); + der.startSequence(); + r = utils.mpNormalize(this.part.r.data); + s = utils.mpNormalize(this.part.s.data); + der.writeBuffer(r, asn1.Ber.Integer); + der.writeBuffer(s, asn1.Ber.Integer); + der.endSequence(); + return (der.buffer); + } else if (format === 'ssh' && this.type === 'dsa') { + buf = new SSHBuffer({}); + buf.writeString('ssh-dss'); + r = this.part.r.data; + if (r.length > 20 && r[0] === 0x00) + r = r.slice(1); + s = this.part.s.data; + if (s.length > 20 && s[0] === 0x00) + s = s.slice(1); + if ((this.hashAlgorithm && + this.hashAlgorithm !== 'sha1') || + r.length + s.length !== 40) { + throw (new Error('OpenSSH only supports ' + + 'DSA signatures with SHA1 hash')); + } + buf.writeBuffer(Buffer.concat([r, s])); + return (buf.toBuffer()); + } else if (format === 'ssh' && this.type === 'ecdsa') { + var inner = new SSHBuffer({}); + r = this.part.r.data; + inner.writeBuffer(r); + inner.writePart(this.part.s); + + buf = new SSHBuffer({}); + /* XXX: find a more proper way to do this? */ + var curve; + if (r[0] === 0x00) + r = r.slice(1); + var sz = r.length * 8; + if (sz === 256) + curve = 'nistp256'; + else if (sz === 384) + curve = 'nistp384'; + else if (sz === 528) + curve = 'nistp521'; + buf.writeString('ecdsa-sha2-' + curve); + buf.writeBuffer(inner.toBuffer()); + return (buf.toBuffer()); + } + throw (new Error('Invalid signature format')); + default: + throw (new Error('Invalid signature data')); + } +}; + +Signature.prototype.toString = function (format) { + assert.optionalString(format, 'format'); + return (this.toBuffer(format).toString('base64')); +}; + +Signature.parse = function (data, type, format) { + if (typeof (data) === 'string') + data = Buffer.from(data, 'base64'); + assert.buffer(data, 'data'); + assert.string(format, 'format'); + assert.string(type, 'type'); + + var opts = {}; + opts.type = type.toLowerCase(); + opts.parts = []; + + try { + assert.ok(data.length > 0, 'signature must not be empty'); + switch (opts.type) { + case 'rsa': + return (parseOneNum(data, type, format, opts)); + case 'ed25519': + return (parseOneNum(data, type, format, opts)); + + case 'dsa': + case 'ecdsa': + if (format === 'asn1') + return (parseDSAasn1(data, type, format, opts)); + else if (opts.type === 'dsa') + return (parseDSA(data, type, format, opts)); + else + return (parseECDSA(data, type, format, opts)); + + default: + throw (new InvalidAlgorithmError(type)); + } + + } catch (e) { + if (e instanceof InvalidAlgorithmError) + throw (e); + throw (new SignatureParseError(type, format, e)); + } +}; + +function parseOneNum(data, type, format, opts) { + if (format === 'ssh') { + try { + var buf = new SSHBuffer({buffer: data}); + var head = buf.readString(); + } catch (e) { + /* fall through */ + } + if (buf !== undefined) { + var msg = 'SSH signature does not match expected ' + + 'type (expected ' + type + ', got ' + head + ')'; + switch (head) { + case 'ssh-rsa': + assert.strictEqual(type, 'rsa', msg); + opts.hashAlgo = 'sha1'; + break; + case 'rsa-sha2-256': + assert.strictEqual(type, 'rsa', msg); + opts.hashAlgo = 'sha256'; + break; + case 'rsa-sha2-512': + assert.strictEqual(type, 'rsa', msg); + opts.hashAlgo = 'sha512'; + break; + case 'ssh-ed25519': + assert.strictEqual(type, 'ed25519', msg); + opts.hashAlgo = 'sha512'; + break; + default: + throw (new Error('Unknown SSH signature ' + + 'type: ' + head)); + } + var sig = buf.readPart(); + assert.ok(buf.atEnd(), 'extra trailing bytes'); + sig.name = 'sig'; + opts.parts.push(sig); + return (new Signature(opts)); + } + } + opts.parts.push({name: 'sig', data: data}); + return (new Signature(opts)); +} + +function parseDSAasn1(data, type, format, opts) { + var der = new asn1.BerReader(data); + der.readSequence(); + var r = der.readString(asn1.Ber.Integer, true); + var s = der.readString(asn1.Ber.Integer, true); + + opts.parts.push({name: 'r', data: utils.mpNormalize(r)}); + opts.parts.push({name: 's', data: utils.mpNormalize(s)}); + + return (new Signature(opts)); +} + +function parseDSA(data, type, format, opts) { + if (data.length != 40) { + var buf = new SSHBuffer({buffer: data}); + var d = buf.readBuffer(); + if (d.toString('ascii') === 'ssh-dss') + d = buf.readBuffer(); + assert.ok(buf.atEnd(), 'extra trailing bytes'); + assert.strictEqual(d.length, 40, 'invalid inner length'); + data = d; + } + opts.parts.push({name: 'r', data: data.slice(0, 20)}); + opts.parts.push({name: 's', data: data.slice(20, 40)}); + return (new Signature(opts)); +} + +function parseECDSA(data, type, format, opts) { + var buf = new SSHBuffer({buffer: data}); + + var r, s; + var inner = buf.readBuffer(); + var stype = inner.toString('ascii'); + if (stype.slice(0, 6) === 'ecdsa-') { + var parts = stype.split('-'); + assert.strictEqual(parts[0], 'ecdsa'); + assert.strictEqual(parts[1], 'sha2'); + opts.curve = parts[2]; + switch (opts.curve) { + case 'nistp256': + opts.hashAlgo = 'sha256'; + break; + case 'nistp384': + opts.hashAlgo = 'sha384'; + break; + case 'nistp521': + opts.hashAlgo = 'sha512'; + break; + default: + throw (new Error('Unsupported ECDSA curve: ' + + opts.curve)); + } + inner = buf.readBuffer(); + assert.ok(buf.atEnd(), 'extra trailing bytes on outer'); + buf = new SSHBuffer({buffer: inner}); + r = buf.readPart(); + } else { + r = {data: inner}; + } + + s = buf.readPart(); + assert.ok(buf.atEnd(), 'extra trailing bytes'); + + r.name = 'r'; + s.name = 's'; + + opts.parts.push(r); + opts.parts.push(s); + return (new Signature(opts)); +} + +Signature.isSignature = function (obj, ver) { + return (utils.isCompatible(obj, Signature, ver)); +}; + +/* + * API versions for Signature: + * [1,0] -- initial ver + * [2,0] -- support for rsa in full ssh format, compat with sshpk-agent + * hashAlgorithm property + * [2,1] -- first tagged version + */ +Signature.prototype._sshpkApiVersion = [2, 1]; + +Signature._oldVersionDetect = function (obj) { + assert.func(obj.toBuffer); + if (obj.hasOwnProperty('hashAlgorithm')) + return ([2, 0]); + return ([1, 0]); +}; + + +/***/ }), + +/***/ 49470: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +module.exports = SSHBuffer; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); + +function SSHBuffer(opts) { + assert.object(opts, 'options'); + if (opts.buffer !== undefined) + assert.buffer(opts.buffer, 'options.buffer'); + + this._size = opts.buffer ? opts.buffer.length : 1024; + this._buffer = opts.buffer || Buffer.alloc(this._size); + this._offset = 0; +} + +SSHBuffer.prototype.toBuffer = function () { + return (this._buffer.slice(0, this._offset)); +}; + +SSHBuffer.prototype.atEnd = function () { + return (this._offset >= this._buffer.length); +}; + +SSHBuffer.prototype.remainder = function () { + return (this._buffer.slice(this._offset)); +}; + +SSHBuffer.prototype.skip = function (n) { + this._offset += n; +}; + +SSHBuffer.prototype.expand = function () { + this._size *= 2; + var buf = Buffer.alloc(this._size); + this._buffer.copy(buf, 0); + this._buffer = buf; +}; + +SSHBuffer.prototype.readPart = function () { + return ({data: this.readBuffer()}); +}; + +SSHBuffer.prototype.readBuffer = function () { + var len = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + assert.ok(this._offset + len <= this._buffer.length, + 'length out of bounds at +0x' + this._offset.toString(16) + + ' (data truncated?)'); + var buf = this._buffer.slice(this._offset, this._offset + len); + this._offset += len; + return (buf); +}; + +SSHBuffer.prototype.readString = function () { + return (this.readBuffer().toString()); +}; + +SSHBuffer.prototype.readCString = function () { + var offset = this._offset; + while (offset < this._buffer.length && + this._buffer[offset] !== 0x00) + offset++; + assert.ok(offset < this._buffer.length, 'c string does not terminate'); + var str = this._buffer.slice(this._offset, offset).toString(); + this._offset = offset + 1; + return (str); +}; + +SSHBuffer.prototype.readInt = function () { + var v = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + return (v); +}; + +SSHBuffer.prototype.readInt64 = function () { + assert.ok(this._offset + 8 < this._buffer.length, + 'buffer not long enough to read Int64'); + var v = this._buffer.slice(this._offset, this._offset + 8); + this._offset += 8; + return (v); +}; + +SSHBuffer.prototype.readChar = function () { + var v = this._buffer[this._offset++]; + return (v); +}; + +SSHBuffer.prototype.writeBuffer = function (buf) { + while (this._offset + 4 + buf.length > this._size) + this.expand(); + this._buffer.writeUInt32BE(buf.length, this._offset); + this._offset += 4; + buf.copy(this._buffer, this._offset); + this._offset += buf.length; +}; + +SSHBuffer.prototype.writeString = function (str) { + this.writeBuffer(Buffer.from(str, 'utf8')); +}; + +SSHBuffer.prototype.writeCString = function (str) { + while (this._offset + 1 + str.length > this._size) + this.expand(); + this._buffer.write(str, this._offset); + this._offset += str.length; + this._buffer[this._offset++] = 0; +}; + +SSHBuffer.prototype.writeInt = function (v) { + while (this._offset + 4 > this._size) + this.expand(); + this._buffer.writeUInt32BE(v, this._offset); + this._offset += 4; +}; + +SSHBuffer.prototype.writeInt64 = function (v) { + assert.buffer(v, 'value'); + if (v.length > 8) { + var lead = v.slice(0, v.length - 8); + for (var i = 0; i < lead.length; ++i) { + assert.strictEqual(lead[i], 0, + 'must fit in 64 bits of precision'); + } + v = v.slice(v.length - 8, v.length); + } + while (this._offset + 8 > this._size) + this.expand(); + v.copy(this._buffer, this._offset); + this._offset += 8; +}; + +SSHBuffer.prototype.writeChar = function (v) { + while (this._offset + 1 > this._size) + this.expand(); + this._buffer[this._offset++] = v; +}; + +SSHBuffer.prototype.writePart = function (p) { + this.writeBuffer(p.data); +}; + +SSHBuffer.prototype.write = function (buf) { + while (this._offset + buf.length > this._size) + this.expand(); + buf.copy(this._buffer, this._offset); + this._offset += buf.length; +}; + + +/***/ }), + +/***/ 8085: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + bufferSplit: bufferSplit, + addRSAMissing: addRSAMissing, + calculateDSAPublic: calculateDSAPublic, + calculateED25519Public: calculateED25519Public, + calculateX25519Public: calculateX25519Public, + mpNormalize: mpNormalize, + mpDenormalize: mpDenormalize, + ecNormalize: ecNormalize, + countZeros: countZeros, + assertCompatible: assertCompatible, + isCompatible: isCompatible, + opensslKeyDeriv: opensslKeyDeriv, + opensshCipherInfo: opensshCipherInfo, + publicFromPrivateECDSA: publicFromPrivateECDSA, + zeroPadToLength: zeroPadToLength, + writeBitString: writeBitString, + readBitString: readBitString, + pbkdf2: pbkdf2 +}; + +var assert = __nccwpck_require__(41706); +var Buffer = (__nccwpck_require__(77556).Buffer); +var PrivateKey = __nccwpck_require__(78512); +var Key = __nccwpck_require__(90316); +var crypto = __nccwpck_require__(6113); +var algs = __nccwpck_require__(67625); +var asn1 = __nccwpck_require__(2); + +var ec = __nccwpck_require__(68592); +var jsbn = (__nccwpck_require__(42934).BigInteger); +var nacl = __nccwpck_require__(59595); + +var MAX_CLASS_DEPTH = 3; + +function isCompatible(obj, klass, needVer) { + if (obj === null || typeof (obj) !== 'object') + return (false); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return (true); + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + if (!proto || ++depth > MAX_CLASS_DEPTH) + return (false); + } + if (proto.constructor.name !== klass.name) + return (false); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + if (ver[0] != needVer[0] || ver[1] < needVer[1]) + return (false); + return (true); +} + +function assertCompatible(obj, klass, needVer, name) { + if (name === undefined) + name = 'object'; + assert.ok(obj, name + ' must not be null'); + assert.object(obj, name + ' must be an object'); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return; + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + assert.ok(proto && ++depth <= MAX_CLASS_DEPTH, + name + ' must be a ' + klass.name + ' instance'); + } + assert.strictEqual(proto.constructor.name, klass.name, + name + ' must be a ' + klass.name + ' instance'); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1], + name + ' must be compatible with ' + klass.name + ' klass ' + + 'version ' + needVer[0] + '.' + needVer[1]); +} + +var CIPHER_LEN = { + 'des-ede3-cbc': { key: 24, iv: 8 }, + 'aes-128-cbc': { key: 16, iv: 16 }, + 'aes-256-cbc': { key: 32, iv: 16 } +}; +var PKCS5_SALT_LEN = 8; + +function opensslKeyDeriv(cipher, salt, passphrase, count) { + assert.buffer(salt, 'salt'); + assert.buffer(passphrase, 'passphrase'); + assert.number(count, 'iteration count'); + + var clen = CIPHER_LEN[cipher]; + assert.object(clen, 'supported cipher'); + + salt = salt.slice(0, PKCS5_SALT_LEN); + + var D, D_prev, bufs; + var material = Buffer.alloc(0); + while (material.length < clen.key + clen.iv) { + bufs = []; + if (D_prev) + bufs.push(D_prev); + bufs.push(passphrase); + bufs.push(salt); + D = Buffer.concat(bufs); + for (var j = 0; j < count; ++j) + D = crypto.createHash('md5').update(D).digest(); + material = Buffer.concat([material, D]); + D_prev = D; + } + + return ({ + key: material.slice(0, clen.key), + iv: material.slice(clen.key, clen.key + clen.iv) + }); +} + +/* See: RFC2898 */ +function pbkdf2(hashAlg, salt, iterations, size, passphrase) { + var hkey = Buffer.alloc(salt.length + 4); + salt.copy(hkey); + + var gen = 0, ts = []; + var i = 1; + while (gen < size) { + var t = T(i++); + gen += t.length; + ts.push(t); + } + return (Buffer.concat(ts).slice(0, size)); + + function T(I) { + hkey.writeUInt32BE(I, hkey.length - 4); + + var hmac = crypto.createHmac(hashAlg, passphrase); + hmac.update(hkey); + + var Ti = hmac.digest(); + var Uc = Ti; + var c = 1; + while (c++ < iterations) { + hmac = crypto.createHmac(hashAlg, passphrase); + hmac.update(Uc); + Uc = hmac.digest(); + for (var x = 0; x < Ti.length; ++x) + Ti[x] ^= Uc[x]; + } + return (Ti); + } +} + +/* Count leading zero bits on a buffer */ +function countZeros(buf) { + var o = 0, obit = 8; + while (o < buf.length) { + var mask = (1 << obit); + if ((buf[o] & mask) === mask) + break; + obit--; + if (obit < 0) { + o++; + obit = 8; + } + } + return (o*8 + (8 - obit) - 1); +} + +function bufferSplit(buf, chr) { + assert.buffer(buf); + assert.string(chr); + + var parts = []; + var lastPart = 0; + var matches = 0; + for (var i = 0; i < buf.length; ++i) { + if (buf[i] === chr.charCodeAt(matches)) + ++matches; + else if (buf[i] === chr.charCodeAt(0)) + matches = 1; + else + matches = 0; + + if (matches >= chr.length) { + var newPart = i + 1; + parts.push(buf.slice(lastPart, newPart - matches)); + lastPart = newPart; + matches = 0; + } + } + if (lastPart <= buf.length) + parts.push(buf.slice(lastPart, buf.length)); + + return (parts); +} + +function ecNormalize(buf, addZero) { + assert.buffer(buf); + if (buf[0] === 0x00 && buf[1] === 0x04) { + if (addZero) + return (buf); + return (buf.slice(1)); + } else if (buf[0] === 0x04) { + if (!addZero) + return (buf); + } else { + while (buf[0] === 0x00) + buf = buf.slice(1); + if (buf[0] === 0x02 || buf[0] === 0x03) + throw (new Error('Compressed elliptic curve points ' + + 'are not supported')); + if (buf[0] !== 0x04) + throw (new Error('Not a valid elliptic curve point')); + if (!addZero) + return (buf); + } + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x0; + buf.copy(b, 1); + return (b); +} + +function readBitString(der, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var buf = der.readString(tag, true); + assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' + + 'not supported (0x' + buf[0].toString(16) + ')'); + return (buf.slice(1)); +} + +function writeBitString(der, buf, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + der.writeBuffer(b, tag); +} + +function mpNormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) + buf = buf.slice(1); + if ((buf[0] & 0x80) === 0x80) { + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function mpDenormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00) + buf = buf.slice(1); + return (buf); +} + +function zeroPadToLength(buf, len) { + assert.buffer(buf); + assert.number(len); + while (buf.length > len) { + assert.equal(buf[0], 0x00); + buf = buf.slice(1); + } + while (buf.length < len) { + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function bigintToMpBuf(bigint) { + var buf = Buffer.from(bigint.toByteArray()); + buf = mpNormalize(buf); + return (buf); +} + +function calculateDSAPublic(g, p, x) { + assert.buffer(g); + assert.buffer(p); + assert.buffer(x); + g = new jsbn(g); + p = new jsbn(p); + x = new jsbn(x); + var y = g.modPow(x, p); + var ybuf = bigintToMpBuf(y); + return (ybuf); +} + +function calculateED25519Public(k) { + assert.buffer(k); + + var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + +function calculateX25519Public(k) { + assert.buffer(k); + + var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + +function addRSAMissing(key) { + assert.object(key); + assertCompatible(key, PrivateKey, [1, 1]); + + var d = new jsbn(key.part.d.data); + var buf; + + if (!key.part.dmodp) { + var p = new jsbn(key.part.p.data); + var dmodp = d.mod(p.subtract(1)); + + buf = bigintToMpBuf(dmodp); + key.part.dmodp = {name: 'dmodp', data: buf}; + key.parts.push(key.part.dmodp); + } + if (!key.part.dmodq) { + var q = new jsbn(key.part.q.data); + var dmodq = d.mod(q.subtract(1)); + + buf = bigintToMpBuf(dmodq); + key.part.dmodq = {name: 'dmodq', data: buf}; + key.parts.push(key.part.dmodq); + } +} + +function publicFromPrivateECDSA(curveName, priv) { + assert.string(curveName, 'curveName'); + assert.buffer(priv); + var params = algs.curves[curveName]; + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString('hex')); + + var d = new jsbn(mpNormalize(priv)); + var pub = G.multiply(d); + pub = Buffer.from(curve.encodePointHex(pub), 'hex'); + + var parts = []; + parts.push({name: 'curve', data: Buffer.from(curveName)}); + parts.push({name: 'Q', data: pub}); + + var key = new Key({type: 'ecdsa', curve: curve, parts: parts}); + return (key); +} + +function opensshCipherInfo(cipher) { + var inf = {}; + switch (cipher) { + case '3des-cbc': + inf.keySize = 24; + inf.blockSize = 8; + inf.opensslName = 'des-ede3-cbc'; + break; + case 'blowfish-cbc': + inf.keySize = 16; + inf.blockSize = 8; + inf.opensslName = 'bf-cbc'; + break; + case 'aes128-cbc': + case 'aes128-ctr': + case 'aes128-gcm@openssh.com': + inf.keySize = 16; + inf.blockSize = 16; + inf.opensslName = 'aes-128-' + cipher.slice(7, 10); + break; + case 'aes192-cbc': + case 'aes192-ctr': + case 'aes192-gcm@openssh.com': + inf.keySize = 24; + inf.blockSize = 16; + inf.opensslName = 'aes-192-' + cipher.slice(7, 10); + break; + case 'aes256-cbc': + case 'aes256-ctr': + case 'aes256-gcm@openssh.com': + inf.keySize = 32; + inf.blockSize = 16; + inf.opensslName = 'aes-256-' + cipher.slice(7, 10); + break; + default: + throw (new Error( + 'Unsupported openssl cipher "' + cipher + '"')); + } + return (inf); +} + + +/***/ }), + +/***/ 75670: +/***/ ((module) => { + +"use strict"; + + +module.exports = { + DEFAULT_INITIAL_SIZE: (8 * 1024), + DEFAULT_INCREMENT_AMOUNT: (8 * 1024), + DEFAULT_FREQUENCY: 1, + DEFAULT_CHUNK_SIZE: 1024 +}; + + +/***/ }), + +/***/ 15294: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var stream = __nccwpck_require__(12781); +var constants = __nccwpck_require__(75670); +var util = __nccwpck_require__(73837); + +var ReadableStreamBuffer = module.exports = function(opts) { + var that = this; + opts = opts || {}; + + stream.Readable.call(this, opts); + + this.stopped = false; + + var frequency = opts.hasOwnProperty('frequency') ? opts.frequency : constants.DEFAULT_FREQUENCY; + var chunkSize = opts.chunkSize || constants.DEFAULT_CHUNK_SIZE; + var initialSize = opts.initialSize || constants.DEFAULT_INITIAL_SIZE; + var incrementAmount = opts.incrementAmount || constants.DEFAULT_INCREMENT_AMOUNT; + + var size = 0; + var buffer = new Buffer(initialSize); + var allowPush = false; + + var sendData = function() { + var amount = Math.min(chunkSize, size); + var sendMore = false; + + if (amount > 0) { + var chunk = null; + chunk = new Buffer(amount); + buffer.copy(chunk, 0, 0, amount); + + sendMore = that.push(chunk) !== false; + allowPush = sendMore; + + buffer.copy(buffer, 0, amount, size); + size -= amount; + } + + if(size === 0 && that.stopped) { + that.push(null); + } + + if (sendMore) { + sendData.timeout = setTimeout(sendData, frequency); + } + else { + sendData.timeout = null; + } + }; + + this.stop = function() { + if (this.stopped) { + throw new Error('stop() called on already stopped ReadableStreamBuffer'); + } + this.stopped = true; + + if (size === 0) { + this.push(null); + } + }; + + this.size = function() { + return size; + }; + + this.maxSize = function() { + return buffer.length; + }; + + var increaseBufferIfNecessary = function(incomingDataSize) { + if((buffer.length - size) < incomingDataSize) { + var factor = Math.ceil((incomingDataSize - (buffer.length - size)) / incrementAmount); + + var newBuffer = new Buffer(buffer.length + (incrementAmount * factor)); + buffer.copy(newBuffer, 0, 0, size); + buffer = newBuffer; + } + }; + + var kickSendDataTask = function () { + if (!sendData.timeout && allowPush) { + sendData.timeout = setTimeout(sendData, frequency); + } + } + + this.put = function(data, encoding) { + if (that.stopped) { + throw new Error('Tried to write data to a stopped ReadableStreamBuffer'); + } + + if(Buffer.isBuffer(data)) { + increaseBufferIfNecessary(data.length); + data.copy(buffer, size, 0); + size += data.length; + } + else { + data = data + ''; + var dataSizeInBytes = Buffer.byteLength(data); + increaseBufferIfNecessary(dataSizeInBytes); + buffer.write(data, size, encoding || 'utf8'); + size += dataSizeInBytes; + } + + kickSendDataTask(); + }; + + this._read = function() { + allowPush = true; + kickSendDataTask(); + }; +}; + +util.inherits(ReadableStreamBuffer, stream.Readable); + + +/***/ }), + +/***/ 88040: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(75670); +module.exports.ReadableStreamBuffer = __nccwpck_require__(15294); +module.exports.WritableStreamBuffer = __nccwpck_require__(63846); + + +/***/ }), + +/***/ 63846: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var util = __nccwpck_require__(73837); +var stream = __nccwpck_require__(12781); +var constants = __nccwpck_require__(75670); + +var WritableStreamBuffer = module.exports = function(opts) { + opts = opts || {}; + opts.decodeStrings = true; + + stream.Writable.call(this, opts); + + var initialSize = opts.initialSize || constants.DEFAULT_INITIAL_SIZE; + var incrementAmount = opts.incrementAmount || constants.DEFAULT_INCREMENT_AMOUNT; + + var buffer = new Buffer(initialSize); + var size = 0; + + this.size = function() { + return size; + }; + + this.maxSize = function() { + return buffer.length; + }; + + this.getContents = function(length) { + if(!size) return false; + + var data = new Buffer(Math.min(length || size, size)); + buffer.copy(data, 0, 0, data.length); + + if(data.length < size) + buffer.copy(buffer, 0, data.length); + + size -= data.length; + + return data; + }; + + this.getContentsAsString = function(encoding, length) { + if(!size) return false; + + var data = buffer.toString(encoding || 'utf8', 0, Math.min(length || size, size)); + var dataLength = Buffer.byteLength(data); + + if(dataLength < size) + buffer.copy(buffer, 0, dataLength); + + size -= dataLength; + return data; + }; + + var increaseBufferIfNecessary = function(incomingDataSize) { + if((buffer.length - size) < incomingDataSize) { + var factor = Math.ceil((incomingDataSize - (buffer.length - size)) / incrementAmount); + + var newBuffer = new Buffer(buffer.length + (incrementAmount * factor)); + buffer.copy(newBuffer, 0, 0, size); + buffer = newBuffer; + } + }; + + this._write = function(chunk, encoding, callback) { + increaseBufferIfNecessary(chunk.length); + chunk.copy(buffer, size, 0); + size += chunk.length; + callback(); + }; +}; + +util.inherits(WritableStreamBuffer, stream.Writable); + + +/***/ }), + +/***/ 87698: +/***/ ((module) => { + +"use strict"; + + +module.exports = input => { + const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt(); + const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt(); + + if (input[input.length - 1] === LF) { + input = input.slice(0, input.length - 1); + } + + if (input[input.length - 1] === CR) { + input = input.slice(0, input.length - 1); + } + + return input; +}; + + +/***/ }), + +/***/ 11506: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +// high-level commands +exports.c = exports.create = __nccwpck_require__(62890) +exports.r = exports.replace = __nccwpck_require__(70348) +exports.t = exports.list = __nccwpck_require__(35010) +exports.u = exports.update = __nccwpck_require__(62786) +exports.x = exports.extract = __nccwpck_require__(19783) + +// classes +exports.Pack = __nccwpck_require__(58833) +exports.Unpack = __nccwpck_require__(52781) +exports.Parse = __nccwpck_require__(26433) +exports.ReadEntry = __nccwpck_require__(75461) +exports.WriteEntry = __nccwpck_require__(85002) +exports.Header = __nccwpck_require__(18362) +exports.Pax = __nccwpck_require__(29386) +exports.types = __nccwpck_require__(44821) + + +/***/ }), + +/***/ 62890: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// tar -c +const hlo = __nccwpck_require__(60686) + +const Pack = __nccwpck_require__(58833) +const fsm = __nccwpck_require__(99612) +const t = __nccwpck_require__(35010) +const path = __nccwpck_require__(71017) + +module.exports = (opt_, files, cb) => { + if (typeof files === 'function') + cb = files + + if (Array.isArray(opt_)) + files = opt_, opt_ = {} + + if (!files || !Array.isArray(files) || !files.length) + throw new TypeError('no files or directories specified') + + files = Array.from(files) + + const opt = hlo(opt_) + + if (opt.sync && typeof cb === 'function') + throw new TypeError('callback not supported for sync tar functions') + + if (!opt.file && typeof cb === 'function') + throw new TypeError('callback only supported with file option') + + return opt.file && opt.sync ? createFileSync(opt, files) + : opt.file ? createFile(opt, files, cb) + : opt.sync ? createSync(opt, files) + : create(opt, files) +} + +const createFileSync = (opt, files) => { + const p = new Pack.Sync(opt) + const stream = new fsm.WriteStreamSync(opt.file, { + mode: opt.mode || 0o666, + }) + p.pipe(stream) + addFilesSync(p, files) +} + +const createFile = (opt, files, cb) => { + const p = new Pack(opt) + const stream = new fsm.WriteStream(opt.file, { + mode: opt.mode || 0o666, + }) + p.pipe(stream) + + const promise = new Promise((res, rej) => { + stream.on('error', rej) + stream.on('close', res) + p.on('error', rej) + }) + + addFilesAsync(p, files) + + return cb ? promise.then(cb, cb) : promise +} + +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + t({ + file: path.resolve(p.cwd, file.substr(1)), + sync: true, + noResume: true, + onentry: entry => p.add(entry), + }) + } else + p.add(file) + }) + p.end() +} + +const addFilesAsync = (p, files) => { + while (files.length) { + const file = files.shift() + if (file.charAt(0) === '@') { + return t({ + file: path.resolve(p.cwd, file.substr(1)), + noResume: true, + onentry: entry => p.add(entry), + }).then(_ => addFilesAsync(p, files)) + } else + p.add(file) + } + p.end() +} + +const createSync = (opt, files) => { + const p = new Pack.Sync(opt) + addFilesSync(p, files) + return p +} + +const create = (opt, files) => { + const p = new Pack(opt) + addFilesAsync(p, files) + return p +} + + +/***/ }), + +/***/ 19783: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// tar -x +const hlo = __nccwpck_require__(60686) +const Unpack = __nccwpck_require__(52781) +const fs = __nccwpck_require__(57147) +const fsm = __nccwpck_require__(99612) +const path = __nccwpck_require__(71017) +const stripSlash = __nccwpck_require__(25905) + +module.exports = (opt_, files, cb) => { + if (typeof opt_ === 'function') + cb = opt_, files = null, opt_ = {} + else if (Array.isArray(opt_)) + files = opt_, opt_ = {} + + if (typeof files === 'function') + cb = files, files = null + + if (!files) + files = [] + else + files = Array.from(files) + + const opt = hlo(opt_) + + if (opt.sync && typeof cb === 'function') + throw new TypeError('callback not supported for sync tar functions') + + if (!opt.file && typeof cb === 'function') + throw new TypeError('callback only supported with file option') + + if (files.length) + filesFilter(opt, files) + + return opt.file && opt.sync ? extractFileSync(opt) + : opt.file ? extractFile(opt, cb) + : opt.sync ? extractSync(opt) + : extract(opt) +} + +// construct a filter that limits the file entries listed +// include child entries if a dir is included +const filesFilter = (opt, files) => { + const map = new Map(files.map(f => [stripSlash(f), true])) + const filter = opt.filter + + const mapHas = (file, r) => { + const root = r || path.parse(file).root || '.' + const ret = file === root ? false + : map.has(file) ? map.get(file) + : mapHas(path.dirname(file), root) + + map.set(file, ret) + return ret + } + + opt.filter = filter + ? (file, entry) => filter(file, entry) && mapHas(stripSlash(file)) + : file => mapHas(stripSlash(file)) +} + +const extractFileSync = opt => { + const u = new Unpack.Sync(opt) + + const file = opt.file + const stat = fs.statSync(file) + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + const readSize = opt.maxReadSize || 16 * 1024 * 1024 + const stream = new fsm.ReadStreamSync(file, { + readSize: readSize, + size: stat.size, + }) + stream.pipe(u) +} + +const extractFile = (opt, cb) => { + const u = new Unpack(opt) + const readSize = opt.maxReadSize || 16 * 1024 * 1024 + + const file = opt.file + const p = new Promise((resolve, reject) => { + u.on('error', reject) + u.on('close', resolve) + + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + fs.stat(file, (er, stat) => { + if (er) + reject(er) + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }) + stream.on('error', reject) + stream.pipe(u) + } + }) + }) + return cb ? p.then(cb, cb) : p +} + +const extractSync = opt => new Unpack.Sync(opt) + +const extract = opt => new Unpack(opt) + + +/***/ }), + +/***/ 94156: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Get the appropriate flag to use for creating files +// We use fmap on Windows platforms for files less than +// 512kb. This is a fairly low limit, but avoids making +// things slower in some cases. Since most of what this +// library is used for is extracting tarballs of many +// relatively small files in npm packages and the like, +// it can be a big boost on Windows platforms. +// Only supported in Node v12.9.0 and above. +const platform = process.env.__FAKE_PLATFORM__ || process.platform +const isWindows = platform === 'win32' +const fs = global.__FAKE_TESTING_FS__ || __nccwpck_require__(57147) + +/* istanbul ignore next */ +const { O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP = 0 } = fs.constants + +const fMapEnabled = isWindows && !!UV_FS_O_FILEMAP +const fMapLimit = 512 * 1024 +const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY +module.exports = !fMapEnabled ? () => 'w' + : size => size < fMapLimit ? fMapFlag : 'w' + + +/***/ }), + +/***/ 18362: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +// parse a 512-byte header block to a data object, or vice-versa +// encode returns `true` if a pax extended header is needed, because +// the data could not be faithfully encoded in a simple header. +// (Also, check header.needPax to see if it needs a pax header.) + +const types = __nccwpck_require__(44821) +const pathModule = (__nccwpck_require__(71017).posix) +const large = __nccwpck_require__(93548) + +const SLURP = Symbol('slurp') +const TYPE = Symbol('type') + +class Header { + constructor (data, off, ex, gex) { + this.cksumValid = false + this.needPax = false + this.nullBlock = false + + this.block = null + this.path = null + this.mode = null + this.uid = null + this.gid = null + this.size = null + this.mtime = null + this.cksum = null + this[TYPE] = '0' + this.linkpath = null + this.uname = null + this.gname = null + this.devmaj = 0 + this.devmin = 0 + this.atime = null + this.ctime = null + + if (Buffer.isBuffer(data)) + this.decode(data, off || 0, ex, gex) + else if (data) + this.set(data) + } + + decode (buf, off, ex, gex) { + if (!off) + off = 0 + + if (!buf || !(buf.length >= off + 512)) + throw new Error('need 512 bytes for header') + + this.path = decString(buf, off, 100) + this.mode = decNumber(buf, off + 100, 8) + this.uid = decNumber(buf, off + 108, 8) + this.gid = decNumber(buf, off + 116, 8) + this.size = decNumber(buf, off + 124, 12) + this.mtime = decDate(buf, off + 136, 12) + this.cksum = decNumber(buf, off + 148, 12) + + // if we have extended or global extended headers, apply them now + // See https://github.com/npm/node-tar/pull/187 + this[SLURP](ex) + this[SLURP](gex, true) + + // old tar versions marked dirs as a file with a trailing / + this[TYPE] = decString(buf, off + 156, 1) + if (this[TYPE] === '') + this[TYPE] = '0' + if (this[TYPE] === '0' && this.path.substr(-1) === '/') + this[TYPE] = '5' + + // tar implementations sometimes incorrectly put the stat(dir).size + // as the size in the tarball, even though Directory entries are + // not able to have any body at all. In the very rare chance that + // it actually DOES have a body, we weren't going to do anything with + // it anyway, and it'll just be a warning about an invalid header. + if (this[TYPE] === '5') + this.size = 0 + + this.linkpath = decString(buf, off + 157, 100) + if (buf.slice(off + 257, off + 265).toString() === 'ustar\u000000') { + this.uname = decString(buf, off + 265, 32) + this.gname = decString(buf, off + 297, 32) + this.devmaj = decNumber(buf, off + 329, 8) + this.devmin = decNumber(buf, off + 337, 8) + if (buf[off + 475] !== 0) { + // definitely a prefix, definitely >130 chars. + const prefix = decString(buf, off + 345, 155) + this.path = prefix + '/' + this.path + } else { + const prefix = decString(buf, off + 345, 130) + if (prefix) + this.path = prefix + '/' + this.path + this.atime = decDate(buf, off + 476, 12) + this.ctime = decDate(buf, off + 488, 12) + } + } + + let sum = 8 * 0x20 + for (let i = off; i < off + 148; i++) + sum += buf[i] + + for (let i = off + 156; i < off + 512; i++) + sum += buf[i] + + this.cksumValid = sum === this.cksum + if (this.cksum === null && sum === 8 * 0x20) + this.nullBlock = true + } + + [SLURP] (ex, global) { + for (const k in ex) { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. + if (ex[k] !== null && ex[k] !== undefined && + !(global && k === 'path')) + this[k] = ex[k] + } + } + + encode (buf, off) { + if (!buf) { + buf = this.block = Buffer.alloc(512) + off = 0 + } + + if (!off) + off = 0 + + if (!(buf.length >= off + 512)) + throw new Error('need 512 bytes for header') + + const prefixSize = this.ctime || this.atime ? 130 : 155 + const split = splitPrefix(this.path || '', prefixSize) + const path = split[0] + const prefix = split[1] + this.needPax = split[2] + + this.needPax = encString(buf, off, 100, path) || this.needPax + this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax + this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax + this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax + this.needPax = encNumber(buf, off + 124, 12, this.size) || this.needPax + this.needPax = encDate(buf, off + 136, 12, this.mtime) || this.needPax + buf[off + 156] = this[TYPE].charCodeAt(0) + this.needPax = encString(buf, off + 157, 100, this.linkpath) || this.needPax + buf.write('ustar\u000000', off + 257, 8) + this.needPax = encString(buf, off + 265, 32, this.uname) || this.needPax + this.needPax = encString(buf, off + 297, 32, this.gname) || this.needPax + this.needPax = encNumber(buf, off + 329, 8, this.devmaj) || this.needPax + this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax + this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax + if (buf[off + 475] !== 0) + this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax + else { + this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax + this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax + this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax + } + + let sum = 8 * 0x20 + for (let i = off; i < off + 148; i++) + sum += buf[i] + + for (let i = off + 156; i < off + 512; i++) + sum += buf[i] + + this.cksum = sum + encNumber(buf, off + 148, 8, this.cksum) + this.cksumValid = true + + return this.needPax + } + + set (data) { + for (const i in data) { + if (data[i] !== null && data[i] !== undefined) + this[i] = data[i] + } + } + + get type () { + return types.name.get(this[TYPE]) || this[TYPE] + } + + get typeKey () { + return this[TYPE] + } + + set type (type) { + if (types.code.has(type)) + this[TYPE] = types.code.get(type) + else + this[TYPE] = type + } +} + +const splitPrefix = (p, prefixSize) => { + const pathSize = 100 + let pp = p + let prefix = '' + let ret + const root = pathModule.parse(p).root || '.' + + if (Buffer.byteLength(pp) < pathSize) + ret = [pp, prefix, false] + else { + // first set prefix to the dir, and path to the base + prefix = pathModule.dirname(pp) + pp = pathModule.basename(pp) + + do { + // both fit! + if (Buffer.byteLength(pp) <= pathSize && + Buffer.byteLength(prefix) <= prefixSize) + ret = [pp, prefix, false] + + // prefix fits in prefix, but path doesn't fit in path + else if (Buffer.byteLength(pp) > pathSize && + Buffer.byteLength(prefix) <= prefixSize) + ret = [pp.substr(0, pathSize - 1), prefix, true] + + else { + // make path take a bit from prefix + pp = pathModule.join(pathModule.basename(prefix), pp) + prefix = pathModule.dirname(prefix) + } + } while (prefix !== root && !ret) + + // at this point, found no resolution, just truncate + if (!ret) + ret = [p.substr(0, pathSize - 1), '', true] + } + return ret +} + +const decString = (buf, off, size) => + buf.slice(off, off + size).toString('utf8').replace(/\0.*/, '') + +const decDate = (buf, off, size) => + numToDate(decNumber(buf, off, size)) + +const numToDate = num => num === null ? null : new Date(num * 1000) + +const decNumber = (buf, off, size) => + buf[off] & 0x80 ? large.parse(buf.slice(off, off + size)) + : decSmallNumber(buf, off, size) + +const nanNull = value => isNaN(value) ? null : value + +const decSmallNumber = (buf, off, size) => + nanNull(parseInt( + buf.slice(off, off + size) + .toString('utf8').replace(/\0.*$/, '').trim(), 8)) + +// the maximum encodable as a null-terminated octal, by field size +const MAXNUM = { + 12: 0o77777777777, + 8: 0o7777777, +} + +const encNumber = (buf, off, size, number) => + number === null ? false : + number > MAXNUM[size] || number < 0 + ? (large.encode(number, buf.slice(off, off + size)), true) + : (encSmallNumber(buf, off, size, number), false) + +const encSmallNumber = (buf, off, size, number) => + buf.write(octalString(number, size), off, size, 'ascii') + +const octalString = (number, size) => + padOctal(Math.floor(number).toString(8), size) + +const padOctal = (string, size) => + (string.length === size - 1 ? string + : new Array(size - string.length - 1).join('0') + string + ' ') + '\0' + +const encDate = (buf, off, size, date) => + date === null ? false : + encNumber(buf, off, size, date.getTime() / 1000) + +// enough to fill the longest string we've got +const NULLS = new Array(156).join('\0') +// pad with nulls, return true if it's longer or non-ascii +const encString = (buf, off, size, string) => + string === null ? false : + (buf.write(string + NULLS, off, size, 'utf8'), + string.length !== Buffer.byteLength(string) || string.length > size) + +module.exports = Header + + +/***/ }), + +/***/ 60686: +/***/ ((module) => { + +"use strict"; + + +// turn tar(1) style args like `C` into the more verbose things like `cwd` + +const argmap = new Map([ + ['C', 'cwd'], + ['f', 'file'], + ['z', 'gzip'], + ['P', 'preservePaths'], + ['U', 'unlink'], + ['strip-components', 'strip'], + ['stripComponents', 'strip'], + ['keep-newer', 'newer'], + ['keepNewer', 'newer'], + ['keep-newer-files', 'newer'], + ['keepNewerFiles', 'newer'], + ['k', 'keep'], + ['keep-existing', 'keep'], + ['keepExisting', 'keep'], + ['m', 'noMtime'], + ['no-mtime', 'noMtime'], + ['p', 'preserveOwner'], + ['L', 'follow'], + ['h', 'follow'], +]) + +module.exports = opt => opt ? Object.keys(opt).map(k => [ + argmap.has(k) ? argmap.get(k) : k, opt[k], +]).reduce((set, kv) => (set[kv[0]] = kv[1], set), Object.create(null)) : {} + + +/***/ }), + +/***/ 93548: +/***/ ((module) => { + +"use strict"; + +// Tar can encode large and negative numbers using a leading byte of +// 0xff for negative, and 0x80 for positive. + +const encode = (num, buf) => { + if (!Number.isSafeInteger(num)) + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('cannot encode number outside of javascript safe integer range') + else if (num < 0) + encodeNegative(num, buf) + else + encodePositive(num, buf) + return buf +} + +const encodePositive = (num, buf) => { + buf[0] = 0x80 + + for (var i = buf.length; i > 1; i--) { + buf[i - 1] = num & 0xff + num = Math.floor(num / 0x100) + } +} + +const encodeNegative = (num, buf) => { + buf[0] = 0xff + var flipped = false + num = num * -1 + for (var i = buf.length; i > 1; i--) { + var byte = num & 0xff + num = Math.floor(num / 0x100) + if (flipped) + buf[i - 1] = onesComp(byte) + else if (byte === 0) + buf[i - 1] = 0 + else { + flipped = true + buf[i - 1] = twosComp(byte) + } + } +} + +const parse = (buf) => { + const pre = buf[0] + const value = pre === 0x80 ? pos(buf.slice(1, buf.length)) + : pre === 0xff ? twos(buf) + : null + if (value === null) + throw Error('invalid base256 encoding') + + if (!Number.isSafeInteger(value)) + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('parsed number outside of javascript safe integer range') + + return value +} + +const twos = (buf) => { + var len = buf.length + var sum = 0 + var flipped = false + for (var i = len - 1; i > -1; i--) { + var byte = buf[i] + var f + if (flipped) + f = onesComp(byte) + else if (byte === 0) + f = byte + else { + flipped = true + f = twosComp(byte) + } + if (f !== 0) + sum -= f * Math.pow(256, len - i - 1) + } + return sum +} + +const pos = (buf) => { + var len = buf.length + var sum = 0 + for (var i = len - 1; i > -1; i--) { + var byte = buf[i] + if (byte !== 0) + sum += byte * Math.pow(256, len - i - 1) + } + return sum +} + +const onesComp = byte => (0xff ^ byte) & 0xff + +const twosComp = byte => ((0xff ^ byte) + 1) & 0xff + +module.exports = { + encode, + parse, +} + + +/***/ }), + +/***/ 35010: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// XXX: This shares a lot in common with extract.js +// maybe some DRY opportunity here? + +// tar -t +const hlo = __nccwpck_require__(60686) +const Parser = __nccwpck_require__(26433) +const fs = __nccwpck_require__(57147) +const fsm = __nccwpck_require__(99612) +const path = __nccwpck_require__(71017) +const stripSlash = __nccwpck_require__(25905) + +module.exports = (opt_, files, cb) => { + if (typeof opt_ === 'function') + cb = opt_, files = null, opt_ = {} + else if (Array.isArray(opt_)) + files = opt_, opt_ = {} + + if (typeof files === 'function') + cb = files, files = null + + if (!files) + files = [] + else + files = Array.from(files) + + const opt = hlo(opt_) + + if (opt.sync && typeof cb === 'function') + throw new TypeError('callback not supported for sync tar functions') + + if (!opt.file && typeof cb === 'function') + throw new TypeError('callback only supported with file option') + + if (files.length) + filesFilter(opt, files) + + if (!opt.noResume) + onentryFunction(opt) + + return opt.file && opt.sync ? listFileSync(opt) + : opt.file ? listFile(opt, cb) + : list(opt) +} + +const onentryFunction = opt => { + const onentry = opt.onentry + opt.onentry = onentry ? e => { + onentry(e) + e.resume() + } : e => e.resume() +} + +// construct a filter that limits the file entries listed +// include child entries if a dir is included +const filesFilter = (opt, files) => { + const map = new Map(files.map(f => [stripSlash(f), true])) + const filter = opt.filter + + const mapHas = (file, r) => { + const root = r || path.parse(file).root || '.' + const ret = file === root ? false + : map.has(file) ? map.get(file) + : mapHas(path.dirname(file), root) + + map.set(file, ret) + return ret + } + + opt.filter = filter + ? (file, entry) => filter(file, entry) && mapHas(stripSlash(file)) + : file => mapHas(stripSlash(file)) +} + +const listFileSync = opt => { + const p = list(opt) + const file = opt.file + let threw = true + let fd + try { + const stat = fs.statSync(file) + const readSize = opt.maxReadSize || 16 * 1024 * 1024 + if (stat.size < readSize) + p.end(fs.readFileSync(file)) + else { + let pos = 0 + const buf = Buffer.allocUnsafe(readSize) + fd = fs.openSync(file, 'r') + while (pos < stat.size) { + const bytesRead = fs.readSync(fd, buf, 0, readSize, pos) + pos += bytesRead + p.write(buf.slice(0, bytesRead)) + } + p.end() + } + threw = false + } finally { + if (threw && fd) { + try { + fs.closeSync(fd) + } catch (er) {} + } + } +} + +const listFile = (opt, cb) => { + const parse = new Parser(opt) + const readSize = opt.maxReadSize || 16 * 1024 * 1024 + + const file = opt.file + const p = new Promise((resolve, reject) => { + parse.on('error', reject) + parse.on('end', resolve) + + fs.stat(file, (er, stat) => { + if (er) + reject(er) + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }) + stream.on('error', reject) + stream.pipe(parse) + } + }) + }) + return cb ? p.then(cb, cb) : p +} + +const list = opt => new Parser(opt) + + +/***/ }), + +/***/ 35577: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +// wrapper around mkdirp for tar's needs. + +// TODO: This should probably be a class, not functionally +// passing around state in a gazillion args. + +const mkdirp = __nccwpck_require__(66647) +const fs = __nccwpck_require__(57147) +const path = __nccwpck_require__(71017) +const chownr = __nccwpck_require__(34891) +const normPath = __nccwpck_require__(45802) + +class SymlinkError extends Error { + constructor (symlink, path) { + super('Cannot extract through symbolic link') + this.path = path + this.symlink = symlink + } + + get name () { + return 'SylinkError' + } +} + +class CwdError extends Error { + constructor (path, code) { + super(code + ': Cannot cd into \'' + path + '\'') + this.path = path + this.code = code + } + + get name () { + return 'CwdError' + } +} + +const cGet = (cache, key) => cache.get(normPath(key)) +const cSet = (cache, key, val) => cache.set(normPath(key), val) + +const checkCwd = (dir, cb) => { + fs.stat(dir, (er, st) => { + if (er || !st.isDirectory()) + er = new CwdError(dir, er && er.code || 'ENOTDIR') + cb(er) + }) +} + +module.exports = (dir, opt, cb) => { + dir = normPath(dir) + + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + const umask = opt.umask + const mode = opt.mode | 0o0700 + const needChmod = (mode & umask) !== 0 + + const uid = opt.uid + const gid = opt.gid + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid) + + const preserve = opt.preserve + const unlink = opt.unlink + const cache = opt.cache + const cwd = normPath(opt.cwd) + + const done = (er, created) => { + if (er) + cb(er) + else { + cSet(cache, dir, true) + if (created && doChown) + chownr(created, uid, gid, er => done(er)) + else if (needChmod) + fs.chmod(dir, mode, cb) + else + cb() + } + } + + if (cache && cGet(cache, dir) === true) + return done() + + if (dir === cwd) + return checkCwd(dir, done) + + if (preserve) + return mkdirp(dir, {mode}).then(made => done(null, made), done) + + const sub = normPath(path.relative(cwd, dir)) + const parts = sub.split('/') + mkdir_(cwd, parts, mode, cache, unlink, cwd, null, done) +} + +const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => { + if (!parts.length) + return cb(null, created) + const p = parts.shift() + const part = normPath(path.resolve(base + '/' + p)) + if (cGet(cache, part)) + return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb) + fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)) +} + +const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => er => { + if (er) { + fs.lstat(part, (statEr, st) => { + if (statEr) { + statEr.path = statEr.path && normPath(statEr.path) + cb(statEr) + } else if (st.isDirectory()) + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb) + else if (unlink) { + fs.unlink(part, er => { + if (er) + return cb(er) + fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)) + }) + } else if (st.isSymbolicLink()) + return cb(new SymlinkError(part, part + '/' + parts.join('/'))) + else + cb(er) + }) + } else { + created = created || part + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb) + } +} + +const checkCwdSync = dir => { + let ok = false + let code = 'ENOTDIR' + try { + ok = fs.statSync(dir).isDirectory() + } catch (er) { + code = er.code + } finally { + if (!ok) + throw new CwdError(dir, code) + } +} + +module.exports.sync = (dir, opt) => { + dir = normPath(dir) + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + const umask = opt.umask + const mode = opt.mode | 0o0700 + const needChmod = (mode & umask) !== 0 + + const uid = opt.uid + const gid = opt.gid + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid) + + const preserve = opt.preserve + const unlink = opt.unlink + const cache = opt.cache + const cwd = normPath(opt.cwd) + + const done = (created) => { + cSet(cache, dir, true) + if (created && doChown) + chownr.sync(created, uid, gid) + if (needChmod) + fs.chmodSync(dir, mode) + } + + if (cache && cGet(cache, dir) === true) + return done() + + if (dir === cwd) { + checkCwdSync(cwd) + return done() + } + + if (preserve) + return done(mkdirp.sync(dir, mode)) + + const sub = normPath(path.relative(cwd, dir)) + const parts = sub.split('/') + let created = null + for (let p = parts.shift(), part = cwd; + p && (part += '/' + p); + p = parts.shift()) { + part = normPath(path.resolve(part)) + if (cGet(cache, part)) + continue + + try { + fs.mkdirSync(part, mode) + created = created || part + cSet(cache, part, true) + } catch (er) { + const st = fs.lstatSync(part) + if (st.isDirectory()) { + cSet(cache, part, true) + continue + } else if (unlink) { + fs.unlinkSync(part) + fs.mkdirSync(part, mode) + created = created || part + cSet(cache, part, true) + continue + } else if (st.isSymbolicLink()) + return new SymlinkError(part, part + '/' + parts.join('/')) + } + } + + return done(created) +} + + +/***/ }), + +/***/ 28700: +/***/ ((module) => { + +"use strict"; + +module.exports = (mode, isDir, portable) => { + mode &= 0o7777 + + // in portable mode, use the minimum reasonable umask + // if this system creates files with 0o664 by default + // (as some linux distros do), then we'll write the + // archive with 0o644 instead. Also, don't ever create + // a file that is not readable/writable by the owner. + if (portable) + mode = (mode | 0o600) & ~0o22 + + // if dirs are readable, then they should be listable + if (isDir) { + if (mode & 0o400) + mode |= 0o100 + if (mode & 0o40) + mode |= 0o10 + if (mode & 0o4) + mode |= 0o1 + } + return mode +} + + +/***/ }), + +/***/ 87923: +/***/ ((module) => { + +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +const normalizeCache = Object.create(null) +const {hasOwnProperty} = Object.prototype +module.exports = s => { + if (!hasOwnProperty.call(normalizeCache, s)) + normalizeCache[s] = s.normalize('NFKD') + return normalizeCache[s] +} + + +/***/ }), + +/***/ 45802: +/***/ ((module) => { + +// on windows, either \ or / are valid directory separators. +// on unix, \ is a valid character in filenames. +// so, on windows, and only on windows, we replace all \ chars with /, +// so that we can use / as our one and only directory separator char. + +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform +module.exports = platform !== 'win32' ? p => p + : p => p && p.replace(/\\/g, '/') + + +/***/ }), + +/***/ 58833: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// A readable tar stream creator +// Technically, this is a transform stream that you write paths into, +// and tar format comes out of. +// The `add()` method is like `write()` but returns this, +// and end() return `this` as well, so you can +// do `new Pack(opt).add('files').add('dir').end().pipe(output) +// You could also do something like: +// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar')) + +class PackJob { + constructor (path, absolute) { + this.path = path || './' + this.absolute = absolute + this.entry = null + this.stat = null + this.readdir = null + this.pending = false + this.ignore = false + this.piped = false + } +} + +const MiniPass = __nccwpck_require__(27948) +const zlib = __nccwpck_require__(96097) +const ReadEntry = __nccwpck_require__(75461) +const WriteEntry = __nccwpck_require__(85002) +const WriteEntrySync = WriteEntry.Sync +const WriteEntryTar = WriteEntry.Tar +const Yallist = __nccwpck_require__(56128) +const EOF = Buffer.alloc(1024) +const ONSTAT = Symbol('onStat') +const ENDED = Symbol('ended') +const QUEUE = Symbol('queue') +const CURRENT = Symbol('current') +const PROCESS = Symbol('process') +const PROCESSING = Symbol('processing') +const PROCESSJOB = Symbol('processJob') +const JOBS = Symbol('jobs') +const JOBDONE = Symbol('jobDone') +const ADDFSENTRY = Symbol('addFSEntry') +const ADDTARENTRY = Symbol('addTarEntry') +const STAT = Symbol('stat') +const READDIR = Symbol('readdir') +const ONREADDIR = Symbol('onreaddir') +const PIPE = Symbol('pipe') +const ENTRY = Symbol('entry') +const ENTRYOPT = Symbol('entryOpt') +const WRITEENTRYCLASS = Symbol('writeEntryClass') +const WRITE = Symbol('write') +const ONDRAIN = Symbol('ondrain') + +const fs = __nccwpck_require__(57147) +const path = __nccwpck_require__(71017) +const warner = __nccwpck_require__(29363) +const normPath = __nccwpck_require__(45802) + +const Pack = warner(class Pack extends MiniPass { + constructor (opt) { + super(opt) + opt = opt || Object.create(null) + this.opt = opt + this.file = opt.file || '' + this.cwd = opt.cwd || process.cwd() + this.maxReadSize = opt.maxReadSize + this.preservePaths = !!opt.preservePaths + this.strict = !!opt.strict + this.noPax = !!opt.noPax + this.prefix = normPath(opt.prefix || '') + this.linkCache = opt.linkCache || new Map() + this.statCache = opt.statCache || new Map() + this.readdirCache = opt.readdirCache || new Map() + + this[WRITEENTRYCLASS] = WriteEntry + if (typeof opt.onwarn === 'function') + this.on('warn', opt.onwarn) + + this.portable = !!opt.portable + this.zip = null + if (opt.gzip) { + if (typeof opt.gzip !== 'object') + opt.gzip = {} + if (this.portable) + opt.gzip.portable = true + this.zip = new zlib.Gzip(opt.gzip) + this.zip.on('data', chunk => super.write(chunk)) + this.zip.on('end', _ => super.end()) + this.zip.on('drain', _ => this[ONDRAIN]()) + this.on('resume', _ => this.zip.resume()) + } else + this.on('drain', this[ONDRAIN]) + + this.noDirRecurse = !!opt.noDirRecurse + this.follow = !!opt.follow + this.noMtime = !!opt.noMtime + this.mtime = opt.mtime || null + + this.filter = typeof opt.filter === 'function' ? opt.filter : _ => true + + this[QUEUE] = new Yallist() + this[JOBS] = 0 + this.jobs = +opt.jobs || 4 + this[PROCESSING] = false + this[ENDED] = false + } + + [WRITE] (chunk) { + return super.write(chunk) + } + + add (path) { + this.write(path) + return this + } + + end (path) { + if (path) + this.write(path) + this[ENDED] = true + this[PROCESS]() + return this + } + + write (path) { + if (this[ENDED]) + throw new Error('write after end') + + if (path instanceof ReadEntry) + this[ADDTARENTRY](path) + else + this[ADDFSENTRY](path) + return this.flowing + } + + [ADDTARENTRY] (p) { + const absolute = normPath(path.resolve(this.cwd, p.path)) + // in this case, we don't have to wait for the stat + if (!this.filter(p.path, p)) + p.resume() + else { + const job = new PackJob(p.path, absolute, false) + job.entry = new WriteEntryTar(p, this[ENTRYOPT](job)) + job.entry.on('end', _ => this[JOBDONE](job)) + this[JOBS] += 1 + this[QUEUE].push(job) + } + + this[PROCESS]() + } + + [ADDFSENTRY] (p) { + const absolute = normPath(path.resolve(this.cwd, p)) + this[QUEUE].push(new PackJob(p, absolute)) + this[PROCESS]() + } + + [STAT] (job) { + job.pending = true + this[JOBS] += 1 + const stat = this.follow ? 'stat' : 'lstat' + fs[stat](job.absolute, (er, stat) => { + job.pending = false + this[JOBS] -= 1 + if (er) + this.emit('error', er) + else + this[ONSTAT](job, stat) + }) + } + + [ONSTAT] (job, stat) { + this.statCache.set(job.absolute, stat) + job.stat = stat + + // now we have the stat, we can filter it. + if (!this.filter(job.path, stat)) + job.ignore = true + + this[PROCESS]() + } + + [READDIR] (job) { + job.pending = true + this[JOBS] += 1 + fs.readdir(job.absolute, (er, entries) => { + job.pending = false + this[JOBS] -= 1 + if (er) + return this.emit('error', er) + this[ONREADDIR](job, entries) + }) + } + + [ONREADDIR] (job, entries) { + this.readdirCache.set(job.absolute, entries) + job.readdir = entries + this[PROCESS]() + } + + [PROCESS] () { + if (this[PROCESSING]) + return + + this[PROCESSING] = true + for (let w = this[QUEUE].head; + w !== null && this[JOBS] < this.jobs; + w = w.next) { + this[PROCESSJOB](w.value) + if (w.value.ignore) { + const p = w.next + this[QUEUE].removeNode(w) + w.next = p + } + } + + this[PROCESSING] = false + + if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) { + if (this.zip) + this.zip.end(EOF) + else { + super.write(EOF) + super.end() + } + } + } + + get [CURRENT] () { + return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value + } + + [JOBDONE] (job) { + this[QUEUE].shift() + this[JOBS] -= 1 + this[PROCESS]() + } + + [PROCESSJOB] (job) { + if (job.pending) + return + + if (job.entry) { + if (job === this[CURRENT] && !job.piped) + this[PIPE](job) + return + } + + if (!job.stat) { + if (this.statCache.has(job.absolute)) + this[ONSTAT](job, this.statCache.get(job.absolute)) + else + this[STAT](job) + } + if (!job.stat) + return + + // filtered out! + if (job.ignore) + return + + if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) { + if (this.readdirCache.has(job.absolute)) + this[ONREADDIR](job, this.readdirCache.get(job.absolute)) + else + this[READDIR](job) + if (!job.readdir) + return + } + + // we know it doesn't have an entry, because that got checked above + job.entry = this[ENTRY](job) + if (!job.entry) { + job.ignore = true + return + } + + if (job === this[CURRENT] && !job.piped) + this[PIPE](job) + } + + [ENTRYOPT] (job) { + return { + onwarn: (code, msg, data) => this.warn(code, msg, data), + noPax: this.noPax, + cwd: this.cwd, + absolute: job.absolute, + preservePaths: this.preservePaths, + maxReadSize: this.maxReadSize, + strict: this.strict, + portable: this.portable, + linkCache: this.linkCache, + statCache: this.statCache, + noMtime: this.noMtime, + mtime: this.mtime, + prefix: this.prefix, + } + } + + [ENTRY] (job) { + this[JOBS] += 1 + try { + return new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)) + .on('end', () => this[JOBDONE](job)) + .on('error', er => this.emit('error', er)) + } catch (er) { + this.emit('error', er) + } + } + + [ONDRAIN] () { + if (this[CURRENT] && this[CURRENT].entry) + this[CURRENT].entry.resume() + } + + // like .pipe() but using super, because our write() is special + [PIPE] (job) { + job.piped = true + + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path + const base = p === './' ? '' : p.replace(/\/*$/, '/') + this[ADDFSENTRY](base + entry) + }) + } + + const source = job.entry + const zip = this.zip + + if (zip) { + source.on('data', chunk => { + if (!zip.write(chunk)) + source.pause() + }) + } else { + source.on('data', chunk => { + if (!super.write(chunk)) + source.pause() + }) + } + } + + pause () { + if (this.zip) + this.zip.pause() + return super.pause() + } +}) + +class PackSync extends Pack { + constructor (opt) { + super(opt) + this[WRITEENTRYCLASS] = WriteEntrySync + } + + // pause/resume are no-ops in sync streams. + pause () {} + resume () {} + + [STAT] (job) { + const stat = this.follow ? 'statSync' : 'lstatSync' + this[ONSTAT](job, fs[stat](job.absolute)) + } + + [READDIR] (job, stat) { + this[ONREADDIR](job, fs.readdirSync(job.absolute)) + } + + // gotta get it all in this tick + [PIPE] (job) { + const source = job.entry + const zip = this.zip + + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path + const base = p === './' ? '' : p.replace(/\/*$/, '/') + this[ADDFSENTRY](base + entry) + }) + } + + if (zip) { + source.on('data', chunk => { + zip.write(chunk) + }) + } else { + source.on('data', chunk => { + super[WRITE](chunk) + }) + } + } +} + +Pack.Sync = PackSync + +module.exports = Pack + + +/***/ }), + +/***/ 26433: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// this[BUFFER] is the remainder of a chunk if we're waiting for +// the full 512 bytes of a header to come in. We will Buffer.concat() +// it to the next write(), which is a mem copy, but a small one. +// +// this[QUEUE] is a Yallist of entries that haven't been emitted +// yet this can only get filled up if the user keeps write()ing after +// a write() returns false, or does a write() with more than one entry +// +// We don't buffer chunks, we always parse them and either create an +// entry, or push it into the active entry. The ReadEntry class knows +// to throw data away if .ignore=true +// +// Shift entry off the buffer when it emits 'end', and emit 'entry' for +// the next one in the list. +// +// At any time, we're pushing body chunks into the entry at WRITEENTRY, +// and waiting for 'end' on the entry at READENTRY +// +// ignored entries get .resume() called on them straight away + +const warner = __nccwpck_require__(29363) +const Header = __nccwpck_require__(18362) +const EE = __nccwpck_require__(82361) +const Yallist = __nccwpck_require__(56128) +const maxMetaEntrySize = 1024 * 1024 +const Entry = __nccwpck_require__(75461) +const Pax = __nccwpck_require__(29386) +const zlib = __nccwpck_require__(96097) + +const gzipHeader = Buffer.from([0x1f, 0x8b]) +const STATE = Symbol('state') +const WRITEENTRY = Symbol('writeEntry') +const READENTRY = Symbol('readEntry') +const NEXTENTRY = Symbol('nextEntry') +const PROCESSENTRY = Symbol('processEntry') +const EX = Symbol('extendedHeader') +const GEX = Symbol('globalExtendedHeader') +const META = Symbol('meta') +const EMITMETA = Symbol('emitMeta') +const BUFFER = Symbol('buffer') +const QUEUE = Symbol('queue') +const ENDED = Symbol('ended') +const EMITTEDEND = Symbol('emittedEnd') +const EMIT = Symbol('emit') +const UNZIP = Symbol('unzip') +const CONSUMECHUNK = Symbol('consumeChunk') +const CONSUMECHUNKSUB = Symbol('consumeChunkSub') +const CONSUMEBODY = Symbol('consumeBody') +const CONSUMEMETA = Symbol('consumeMeta') +const CONSUMEHEADER = Symbol('consumeHeader') +const CONSUMING = Symbol('consuming') +const BUFFERCONCAT = Symbol('bufferConcat') +const MAYBEEND = Symbol('maybeEnd') +const WRITING = Symbol('writing') +const ABORTED = Symbol('aborted') +const DONE = Symbol('onDone') +const SAW_VALID_ENTRY = Symbol('sawValidEntry') +const SAW_NULL_BLOCK = Symbol('sawNullBlock') +const SAW_EOF = Symbol('sawEOF') + +const noop = _ => true + +module.exports = warner(class Parser extends EE { + constructor (opt) { + opt = opt || {} + super(opt) + + this.file = opt.file || '' + + // set to boolean false when an entry starts. 1024 bytes of \0 + // is technically a valid tarball, albeit a boring one. + this[SAW_VALID_ENTRY] = null + + // these BADARCHIVE errors can't be detected early. listen on DONE. + this.on(DONE, _ => { + if (this[STATE] === 'begin' || this[SAW_VALID_ENTRY] === false) { + // either less than 1 block of data, or all entries were invalid. + // Either way, probably not even a tarball. + this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format') + } + }) + + if (opt.ondone) + this.on(DONE, opt.ondone) + else { + this.on(DONE, _ => { + this.emit('prefinish') + this.emit('finish') + this.emit('end') + this.emit('close') + }) + } + + this.strict = !!opt.strict + this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize + this.filter = typeof opt.filter === 'function' ? opt.filter : noop + + // have to set this so that streams are ok piping into it + this.writable = true + this.readable = false + + this[QUEUE] = new Yallist() + this[BUFFER] = null + this[READENTRY] = null + this[WRITEENTRY] = null + this[STATE] = 'begin' + this[META] = '' + this[EX] = null + this[GEX] = null + this[ENDED] = false + this[UNZIP] = null + this[ABORTED] = false + this[SAW_NULL_BLOCK] = false + this[SAW_EOF] = false + if (typeof opt.onwarn === 'function') + this.on('warn', opt.onwarn) + if (typeof opt.onentry === 'function') + this.on('entry', opt.onentry) + } + + [CONSUMEHEADER] (chunk, position) { + if (this[SAW_VALID_ENTRY] === null) + this[SAW_VALID_ENTRY] = false + let header + try { + header = new Header(chunk, position, this[EX], this[GEX]) + } catch (er) { + return this.warn('TAR_ENTRY_INVALID', er) + } + + if (header.nullBlock) { + if (this[SAW_NULL_BLOCK]) { + this[SAW_EOF] = true + // ending an archive with no entries. pointless, but legal. + if (this[STATE] === 'begin') + this[STATE] = 'header' + this[EMIT]('eof') + } else { + this[SAW_NULL_BLOCK] = true + this[EMIT]('nullBlock') + } + } else { + this[SAW_NULL_BLOCK] = false + if (!header.cksumValid) + this.warn('TAR_ENTRY_INVALID', 'checksum failure', {header}) + else if (!header.path) + this.warn('TAR_ENTRY_INVALID', 'path is required', {header}) + else { + const type = header.type + if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) + this.warn('TAR_ENTRY_INVALID', 'linkpath required', {header}) + else if (!/^(Symbolic)?Link$/.test(type) && header.linkpath) + this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', {header}) + else { + const entry = this[WRITEENTRY] = new Entry(header, this[EX], this[GEX]) + + // we do this for meta & ignored entries as well, because they + // are still valid tar, or else we wouldn't know to ignore them + if (!this[SAW_VALID_ENTRY]) { + if (entry.remain) { + // this might be the one! + const onend = () => { + if (!entry.invalid) + this[SAW_VALID_ENTRY] = true + } + entry.on('end', onend) + } else + this[SAW_VALID_ENTRY] = true + } + + if (entry.meta) { + if (entry.size > this.maxMetaEntrySize) { + entry.ignore = true + this[EMIT]('ignoredEntry', entry) + this[STATE] = 'ignore' + entry.resume() + } else if (entry.size > 0) { + this[META] = '' + entry.on('data', c => this[META] += c) + this[STATE] = 'meta' + } + } else { + this[EX] = null + entry.ignore = entry.ignore || !this.filter(entry.path, entry) + + if (entry.ignore) { + // probably valid, just not something we care about + this[EMIT]('ignoredEntry', entry) + this[STATE] = entry.remain ? 'ignore' : 'header' + entry.resume() + } else { + if (entry.remain) + this[STATE] = 'body' + else { + this[STATE] = 'header' + entry.end() + } + + if (!this[READENTRY]) { + this[QUEUE].push(entry) + this[NEXTENTRY]() + } else + this[QUEUE].push(entry) + } + } + } + } + } + } + + [PROCESSENTRY] (entry) { + let go = true + + if (!entry) { + this[READENTRY] = null + go = false + } else if (Array.isArray(entry)) + this.emit.apply(this, entry) + else { + this[READENTRY] = entry + this.emit('entry', entry) + if (!entry.emittedEnd) { + entry.on('end', _ => this[NEXTENTRY]()) + go = false + } + } + + return go + } + + [NEXTENTRY] () { + do {} while (this[PROCESSENTRY](this[QUEUE].shift())) + + if (!this[QUEUE].length) { + // At this point, there's nothing in the queue, but we may have an + // entry which is being consumed (readEntry). + // If we don't, then we definitely can handle more data. + // If we do, and either it's flowing, or it has never had any data + // written to it, then it needs more. + // The only other possibility is that it has returned false from a + // write() call, so we wait for the next drain to continue. + const re = this[READENTRY] + const drainNow = !re || re.flowing || re.size === re.remain + if (drainNow) { + if (!this[WRITING]) + this.emit('drain') + } else + re.once('drain', _ => this.emit('drain')) + } + } + + [CONSUMEBODY] (chunk, position) { + // write up to but no more than writeEntry.blockRemain + const entry = this[WRITEENTRY] + const br = entry.blockRemain + const c = (br >= chunk.length && position === 0) ? chunk + : chunk.slice(position, position + br) + + entry.write(c) + + if (!entry.blockRemain) { + this[STATE] = 'header' + this[WRITEENTRY] = null + entry.end() + } + + return c.length + } + + [CONSUMEMETA] (chunk, position) { + const entry = this[WRITEENTRY] + const ret = this[CONSUMEBODY](chunk, position) + + // if we finished, then the entry is reset + if (!this[WRITEENTRY]) + this[EMITMETA](entry) + + return ret + } + + [EMIT] (ev, data, extra) { + if (!this[QUEUE].length && !this[READENTRY]) + this.emit(ev, data, extra) + else + this[QUEUE].push([ev, data, extra]) + } + + [EMITMETA] (entry) { + this[EMIT]('meta', this[META]) + switch (entry.type) { + case 'ExtendedHeader': + case 'OldExtendedHeader': + this[EX] = Pax.parse(this[META], this[EX], false) + break + + case 'GlobalExtendedHeader': + this[GEX] = Pax.parse(this[META], this[GEX], true) + break + + case 'NextFileHasLongPath': + case 'OldGnuLongPath': + this[EX] = this[EX] || Object.create(null) + this[EX].path = this[META].replace(/\0.*/, '') + break + + case 'NextFileHasLongLinkpath': + this[EX] = this[EX] || Object.create(null) + this[EX].linkpath = this[META].replace(/\0.*/, '') + break + + /* istanbul ignore next */ + default: throw new Error('unknown meta: ' + entry.type) + } + } + + abort (error) { + this[ABORTED] = true + this.emit('abort', error) + // always throws, even in non-strict mode + this.warn('TAR_ABORT', error, { recoverable: false }) + } + + write (chunk) { + if (this[ABORTED]) + return + + // first write, might be gzipped + if (this[UNZIP] === null && chunk) { + if (this[BUFFER]) { + chunk = Buffer.concat([this[BUFFER], chunk]) + this[BUFFER] = null + } + if (chunk.length < gzipHeader.length) { + this[BUFFER] = chunk + return true + } + for (let i = 0; this[UNZIP] === null && i < gzipHeader.length; i++) { + if (chunk[i] !== gzipHeader[i]) + this[UNZIP] = false + } + if (this[UNZIP] === null) { + const ended = this[ENDED] + this[ENDED] = false + this[UNZIP] = new zlib.Unzip() + this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk)) + this[UNZIP].on('error', er => this.abort(er)) + this[UNZIP].on('end', _ => { + this[ENDED] = true + this[CONSUMECHUNK]() + }) + this[WRITING] = true + const ret = this[UNZIP][ended ? 'end' : 'write'](chunk) + this[WRITING] = false + return ret + } + } + + this[WRITING] = true + if (this[UNZIP]) + this[UNZIP].write(chunk) + else + this[CONSUMECHUNK](chunk) + this[WRITING] = false + + // return false if there's a queue, or if the current entry isn't flowing + const ret = + this[QUEUE].length ? false : + this[READENTRY] ? this[READENTRY].flowing : + true + + // if we have no queue, then that means a clogged READENTRY + if (!ret && !this[QUEUE].length) + this[READENTRY].once('drain', _ => this.emit('drain')) + + return ret + } + + [BUFFERCONCAT] (c) { + if (c && !this[ABORTED]) + this[BUFFER] = this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c + } + + [MAYBEEND] () { + if (this[ENDED] && + !this[EMITTEDEND] && + !this[ABORTED] && + !this[CONSUMING]) { + this[EMITTEDEND] = true + const entry = this[WRITEENTRY] + if (entry && entry.blockRemain) { + // truncated, likely a damaged file + const have = this[BUFFER] ? this[BUFFER].length : 0 + this.warn('TAR_BAD_ARCHIVE', `Truncated input (needed ${ + entry.blockRemain} more bytes, only ${have} available)`, {entry}) + if (this[BUFFER]) + entry.write(this[BUFFER]) + entry.end() + } + this[EMIT](DONE) + } + } + + [CONSUMECHUNK] (chunk) { + if (this[CONSUMING]) + this[BUFFERCONCAT](chunk) + else if (!chunk && !this[BUFFER]) + this[MAYBEEND]() + else { + this[CONSUMING] = true + if (this[BUFFER]) { + this[BUFFERCONCAT](chunk) + const c = this[BUFFER] + this[BUFFER] = null + this[CONSUMECHUNKSUB](c) + } else + this[CONSUMECHUNKSUB](chunk) + + while (this[BUFFER] && + this[BUFFER].length >= 512 && + !this[ABORTED] && + !this[SAW_EOF]) { + const c = this[BUFFER] + this[BUFFER] = null + this[CONSUMECHUNKSUB](c) + } + this[CONSUMING] = false + } + + if (!this[BUFFER] || this[ENDED]) + this[MAYBEEND]() + } + + [CONSUMECHUNKSUB] (chunk) { + // we know that we are in CONSUMING mode, so anything written goes into + // the buffer. Advance the position and put any remainder in the buffer. + let position = 0 + const length = chunk.length + while (position + 512 <= length && !this[ABORTED] && !this[SAW_EOF]) { + switch (this[STATE]) { + case 'begin': + case 'header': + this[CONSUMEHEADER](chunk, position) + position += 512 + break + + case 'ignore': + case 'body': + position += this[CONSUMEBODY](chunk, position) + break + + case 'meta': + position += this[CONSUMEMETA](chunk, position) + break + + /* istanbul ignore next */ + default: + throw new Error('invalid state: ' + this[STATE]) + } + } + + if (position < length) { + if (this[BUFFER]) + this[BUFFER] = Buffer.concat([chunk.slice(position), this[BUFFER]]) + else + this[BUFFER] = chunk.slice(position) + } + } + + end (chunk) { + if (!this[ABORTED]) { + if (this[UNZIP]) + this[UNZIP].end(chunk) + else { + this[ENDED] = true + this.write(chunk) + } + } + } +}) + + +/***/ }), + +/***/ 92458: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// A path exclusive reservation system +// reserve([list, of, paths], fn) +// When the fn is first in line for all its paths, it +// is called with a cb that clears the reservation. +// +// Used by async unpack to avoid clobbering paths in use, +// while still allowing maximal safe parallelization. + +const assert = __nccwpck_require__(39491) +const normalize = __nccwpck_require__(87923) +const stripSlashes = __nccwpck_require__(25905) +const { join } = __nccwpck_require__(71017) + +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform +const isWindows = platform === 'win32' + +module.exports = () => { + // path => [function or Set] + // A Set object means a directory reservation + // A fn is a direct reservation on that path + const queues = new Map() + + // fn => {paths:[path,...], dirs:[path, ...]} + const reservations = new Map() + + // return a set of parent dirs for a given path + // '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d'] + const getDirs = path => { + const dirs = path.split('/').slice(0, -1).reduce((set, path) => { + if (set.length) + path = join(set[set.length - 1], path) + set.push(path || '/') + return set + }, []) + return dirs + } + + // functions currently running + const running = new Set() + + // return the queues for each path the function cares about + // fn => {paths, dirs} + const getQueues = fn => { + const res = reservations.get(fn) + /* istanbul ignore if - unpossible */ + if (!res) + throw new Error('function does not have any path reservations') + return { + paths: res.paths.map(path => queues.get(path)), + dirs: [...res.dirs].map(path => queues.get(path)), + } + } + + // check if fn is first in line for all its paths, and is + // included in the first set for all its dir queues + const check = fn => { + const {paths, dirs} = getQueues(fn) + return paths.every(q => q[0] === fn) && + dirs.every(q => q[0] instanceof Set && q[0].has(fn)) + } + + // run the function if it's first in line and not already running + const run = fn => { + if (running.has(fn) || !check(fn)) + return false + running.add(fn) + fn(() => clear(fn)) + return true + } + + const clear = fn => { + if (!running.has(fn)) + return false + + const { paths, dirs } = reservations.get(fn) + const next = new Set() + + paths.forEach(path => { + const q = queues.get(path) + assert.equal(q[0], fn) + if (q.length === 1) + queues.delete(path) + else { + q.shift() + if (typeof q[0] === 'function') + next.add(q[0]) + else + q[0].forEach(fn => next.add(fn)) + } + }) + + dirs.forEach(dir => { + const q = queues.get(dir) + assert(q[0] instanceof Set) + if (q[0].size === 1 && q.length === 1) + queues.delete(dir) + else if (q[0].size === 1) { + q.shift() + + // must be a function or else the Set would've been reused + next.add(q[0]) + } else + q[0].delete(fn) + }) + running.delete(fn) + + next.forEach(fn => run(fn)) + return true + } + + const reserve = (paths, fn) => { + // collide on matches across case and unicode normalization + // On windows, thanks to the magic of 8.3 shortnames, it is fundamentally + // impossible to determine whether two paths refer to the same thing on + // disk, without asking the kernel for a shortname. + // So, we just pretend that every path matches every other path here, + // effectively removing all parallelization on windows. + paths = isWindows ? ['win32 parallelization disabled'] : paths.map(p => { + // don't need normPath, because we skip this entirely for windows + return normalize(stripSlashes(join(p))).toLowerCase() + }) + + const dirs = new Set( + paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)) + ) + reservations.set(fn, {dirs, paths}) + paths.forEach(path => { + const q = queues.get(path) + if (!q) + queues.set(path, [fn]) + else + q.push(fn) + }) + dirs.forEach(dir => { + const q = queues.get(dir) + if (!q) + queues.set(dir, [new Set([fn])]) + else if (q[q.length - 1] instanceof Set) + q[q.length - 1].add(fn) + else + q.push(new Set([fn])) + }) + + return run(fn) + } + + return { check, reserve } +} + + +/***/ }), + +/***/ 29386: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const Header = __nccwpck_require__(18362) +const path = __nccwpck_require__(71017) + +class Pax { + constructor (obj, global) { + this.atime = obj.atime || null + this.charset = obj.charset || null + this.comment = obj.comment || null + this.ctime = obj.ctime || null + this.gid = obj.gid || null + this.gname = obj.gname || null + this.linkpath = obj.linkpath || null + this.mtime = obj.mtime || null + this.path = obj.path || null + this.size = obj.size || null + this.uid = obj.uid || null + this.uname = obj.uname || null + this.dev = obj.dev || null + this.ino = obj.ino || null + this.nlink = obj.nlink || null + this.global = global || false + } + + encode () { + const body = this.encodeBody() + if (body === '') + return null + + const bodyLen = Buffer.byteLength(body) + // round up to 512 bytes + // add 512 for header + const bufLen = 512 * Math.ceil(1 + bodyLen / 512) + const buf = Buffer.allocUnsafe(bufLen) + + // 0-fill the header section, it might not hit every field + for (let i = 0; i < 512; i++) + buf[i] = 0 + + new Header({ + // XXX split the path + // then the path should be PaxHeader + basename, but less than 99, + // prepend with the dirname + path: ('PaxHeader/' + path.basename(this.path)).slice(0, 99), + mode: this.mode || 0o644, + uid: this.uid || null, + gid: this.gid || null, + size: bodyLen, + mtime: this.mtime || null, + type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader', + linkpath: '', + uname: this.uname || '', + gname: this.gname || '', + devmaj: 0, + devmin: 0, + atime: this.atime || null, + ctime: this.ctime || null, + }).encode(buf) + + buf.write(body, 512, bodyLen, 'utf8') + + // null pad after the body + for (let i = bodyLen + 512; i < buf.length; i++) + buf[i] = 0 + + return buf + } + + encodeBody () { + return ( + this.encodeField('path') + + this.encodeField('ctime') + + this.encodeField('atime') + + this.encodeField('dev') + + this.encodeField('ino') + + this.encodeField('nlink') + + this.encodeField('charset') + + this.encodeField('comment') + + this.encodeField('gid') + + this.encodeField('gname') + + this.encodeField('linkpath') + + this.encodeField('mtime') + + this.encodeField('size') + + this.encodeField('uid') + + this.encodeField('uname') + ) + } + + encodeField (field) { + if (this[field] === null || this[field] === undefined) + return '' + const v = this[field] instanceof Date ? this[field].getTime() / 1000 + : this[field] + const s = ' ' + + (field === 'dev' || field === 'ino' || field === 'nlink' + ? 'SCHILY.' : '') + + field + '=' + v + '\n' + const byteLen = Buffer.byteLength(s) + // the digits includes the length of the digits in ascii base-10 + // so if it's 9 characters, then adding 1 for the 9 makes it 10 + // which makes it 11 chars. + let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1 + if (byteLen + digits >= Math.pow(10, digits)) + digits += 1 + const len = digits + byteLen + return len + s + } +} + +Pax.parse = (string, ex, g) => new Pax(merge(parseKV(string), ex), g) + +const merge = (a, b) => + b ? Object.keys(a).reduce((s, k) => (s[k] = a[k], s), b) : a + +const parseKV = string => + string + .replace(/\n$/, '') + .split('\n') + .reduce(parseKVLine, Object.create(null)) + +const parseKVLine = (set, line) => { + const n = parseInt(line, 10) + + // XXX Values with \n in them will fail this. + // Refactor to not be a naive line-by-line parse. + if (n !== Buffer.byteLength(line) + 1) + return set + + line = line.substr((n + ' ').length) + const kv = line.split('=') + const k = kv.shift().replace(/^SCHILY\.(dev|ino|nlink)/, '$1') + if (!k) + return set + + const v = kv.join('=') + set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) + ? new Date(v * 1000) + : /^[0-9]+$/.test(v) ? +v + : v + return set +} + +module.exports = Pax + + +/***/ }), + +/***/ 75461: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const MiniPass = __nccwpck_require__(27948) +const normPath = __nccwpck_require__(45802) + +const SLURP = Symbol('slurp') +module.exports = class ReadEntry extends MiniPass { + constructor (header, ex, gex) { + super() + // read entries always start life paused. this is to avoid the + // situation where Minipass's auto-ending empty streams results + // in an entry ending before we're ready for it. + this.pause() + this.extended = ex + this.globalExtended = gex + this.header = header + this.startBlockSize = 512 * Math.ceil(header.size / 512) + this.blockRemain = this.startBlockSize + this.remain = header.size + this.type = header.type + this.meta = false + this.ignore = false + switch (this.type) { + case 'File': + case 'OldFile': + case 'Link': + case 'SymbolicLink': + case 'CharacterDevice': + case 'BlockDevice': + case 'Directory': + case 'FIFO': + case 'ContiguousFile': + case 'GNUDumpDir': + break + + case 'NextFileHasLongLinkpath': + case 'NextFileHasLongPath': + case 'OldGnuLongPath': + case 'GlobalExtendedHeader': + case 'ExtendedHeader': + case 'OldExtendedHeader': + this.meta = true + break + + // NOTE: gnutar and bsdtar treat unrecognized types as 'File' + // it may be worth doing the same, but with a warning. + default: + this.ignore = true + } + + this.path = normPath(header.path) + this.mode = header.mode + if (this.mode) + this.mode = this.mode & 0o7777 + this.uid = header.uid + this.gid = header.gid + this.uname = header.uname + this.gname = header.gname + this.size = header.size + this.mtime = header.mtime + this.atime = header.atime + this.ctime = header.ctime + this.linkpath = normPath(header.linkpath) + this.uname = header.uname + this.gname = header.gname + + if (ex) + this[SLURP](ex) + if (gex) + this[SLURP](gex, true) + } + + write (data) { + const writeLen = data.length + if (writeLen > this.blockRemain) + throw new Error('writing more to entry than is appropriate') + + const r = this.remain + const br = this.blockRemain + this.remain = Math.max(0, r - writeLen) + this.blockRemain = Math.max(0, br - writeLen) + if (this.ignore) + return true + + if (r >= writeLen) + return super.write(data) + + // r < writeLen + return super.write(data.slice(0, r)) + } + + [SLURP] (ex, global) { + for (const k in ex) { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. + if (ex[k] !== null && ex[k] !== undefined && + !(global && k === 'path')) + this[k] = k === 'path' || k === 'linkpath' ? normPath(ex[k]) : ex[k] + } + } +} + + +/***/ }), + +/***/ 70348: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// tar -r +const hlo = __nccwpck_require__(60686) +const Pack = __nccwpck_require__(58833) +const fs = __nccwpck_require__(57147) +const fsm = __nccwpck_require__(99612) +const t = __nccwpck_require__(35010) +const path = __nccwpck_require__(71017) + +// starting at the head of the file, read a Header +// If the checksum is invalid, that's our position to start writing +// If it is, jump forward by the specified size (round up to 512) +// and try again. +// Write the new Pack stream starting there. + +const Header = __nccwpck_require__(18362) + +module.exports = (opt_, files, cb) => { + const opt = hlo(opt_) + + if (!opt.file) + throw new TypeError('file is required') + + if (opt.gzip) + throw new TypeError('cannot append to compressed archives') + + if (!files || !Array.isArray(files) || !files.length) + throw new TypeError('no files or directories specified') + + files = Array.from(files) + + return opt.sync ? replaceSync(opt, files) + : replace(opt, files, cb) +} + +const replaceSync = (opt, files) => { + const p = new Pack.Sync(opt) + + let threw = true + let fd + let position + + try { + try { + fd = fs.openSync(opt.file, 'r+') + } catch (er) { + if (er.code === 'ENOENT') + fd = fs.openSync(opt.file, 'w+') + else + throw er + } + + const st = fs.fstatSync(fd) + const headBuf = Buffer.alloc(512) + + POSITION: for (position = 0; position < st.size; position += 512) { + for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) { + bytes = fs.readSync( + fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos + ) + + if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b) + throw new Error('cannot append to compressed archives') + + if (!bytes) + break POSITION + } + + const h = new Header(headBuf) + if (!h.cksumValid) + break + const entryBlockSize = 512 * Math.ceil(h.size / 512) + if (position + entryBlockSize + 512 > st.size) + break + // the 512 for the header we just parsed will be added as well + // also jump ahead all the blocks for the body + position += entryBlockSize + if (opt.mtimeCache) + opt.mtimeCache.set(h.path, h.mtime) + } + threw = false + + streamSync(opt, p, position, fd, files) + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } + } +} + +const streamSync = (opt, p, position, fd, files) => { + const stream = new fsm.WriteStreamSync(opt.file, { + fd: fd, + start: position, + }) + p.pipe(stream) + addFilesSync(p, files) +} + +const replace = (opt, files, cb) => { + files = Array.from(files) + const p = new Pack(opt) + + const getPos = (fd, size, cb_) => { + const cb = (er, pos) => { + if (er) + fs.close(fd, _ => cb_(er)) + else + cb_(null, pos) + } + + let position = 0 + if (size === 0) + return cb(null, 0) + + let bufPos = 0 + const headBuf = Buffer.alloc(512) + const onread = (er, bytes) => { + if (er) + return cb(er) + bufPos += bytes + if (bufPos < 512 && bytes) { + return fs.read( + fd, headBuf, bufPos, headBuf.length - bufPos, + position + bufPos, onread + ) + } + + if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b) + return cb(new Error('cannot append to compressed archives')) + + // truncated header + if (bufPos < 512) + return cb(null, position) + + const h = new Header(headBuf) + if (!h.cksumValid) + return cb(null, position) + + const entryBlockSize = 512 * Math.ceil(h.size / 512) + if (position + entryBlockSize + 512 > size) + return cb(null, position) + + position += entryBlockSize + 512 + if (position >= size) + return cb(null, position) + + if (opt.mtimeCache) + opt.mtimeCache.set(h.path, h.mtime) + bufPos = 0 + fs.read(fd, headBuf, 0, 512, position, onread) + } + fs.read(fd, headBuf, 0, 512, position, onread) + } + + const promise = new Promise((resolve, reject) => { + p.on('error', reject) + let flag = 'r+' + const onopen = (er, fd) => { + if (er && er.code === 'ENOENT' && flag === 'r+') { + flag = 'w+' + return fs.open(opt.file, flag, onopen) + } + + if (er) + return reject(er) + + fs.fstat(fd, (er, st) => { + if (er) + return fs.close(fd, () => reject(er)) + + getPos(fd, st.size, (er, position) => { + if (er) + return reject(er) + const stream = new fsm.WriteStream(opt.file, { + fd: fd, + start: position, + }) + p.pipe(stream) + stream.on('error', reject) + stream.on('close', resolve) + addFilesAsync(p, files) + }) + }) + } + fs.open(opt.file, flag, onopen) + }) + + return cb ? promise.then(cb, cb) : promise +} + +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + t({ + file: path.resolve(p.cwd, file.substr(1)), + sync: true, + noResume: true, + onentry: entry => p.add(entry), + }) + } else + p.add(file) + }) + p.end() +} + +const addFilesAsync = (p, files) => { + while (files.length) { + const file = files.shift() + if (file.charAt(0) === '@') { + return t({ + file: path.resolve(p.cwd, file.substr(1)), + noResume: true, + onentry: entry => p.add(entry), + }).then(_ => addFilesAsync(p, files)) + } else + p.add(file) + } + p.end() +} + + +/***/ }), + +/***/ 48596: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// unix absolute paths are also absolute on win32, so we use this for both +const { isAbsolute, parse } = (__nccwpck_require__(71017).win32) + +// returns [root, stripped] +// Note that windows will think that //x/y/z/a has a "root" of //x/y, and in +// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip / +// explicitly if it's the first character. +// drive-specific relative paths on Windows get their root stripped off even +// though they are not absolute, so `c:../foo` becomes ['c:', '../foo'] +module.exports = path => { + let r = '' + + let parsed = parse(path) + while (isAbsolute(path) || parsed.root) { + // windows will think that //x/y/z has a "root" of //x/y/ + // but strip the //?/C:/ off of //?/C:/path + const root = path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ? '/' + : parsed.root + path = path.substr(root.length) + r += root + parsed = parse(path) + } + return [r, path] +} + + +/***/ }), + +/***/ 25905: +/***/ ((module) => { + +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +module.exports = str => { + let i = str.length - 1 + let slashesStart = -1 + while (i > -1 && str.charAt(i) === '/') { + slashesStart = i + i-- + } + return slashesStart === -1 ? str : str.slice(0, slashesStart) +} + + +/***/ }), + +/***/ 44821: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// map types from key to human-friendly name +exports.name = new Map([ + ['0', 'File'], + // same as File + ['', 'OldFile'], + ['1', 'Link'], + ['2', 'SymbolicLink'], + // Devices and FIFOs aren't fully supported + // they are parsed, but skipped when unpacking + ['3', 'CharacterDevice'], + ['4', 'BlockDevice'], + ['5', 'Directory'], + ['6', 'FIFO'], + // same as File + ['7', 'ContiguousFile'], + // pax headers + ['g', 'GlobalExtendedHeader'], + ['x', 'ExtendedHeader'], + // vendor-specific stuff + // skip + ['A', 'SolarisACL'], + // like 5, but with data, which should be skipped + ['D', 'GNUDumpDir'], + // metadata only, skip + ['I', 'Inode'], + // data = link path of next file + ['K', 'NextFileHasLongLinkpath'], + // data = path of next file + ['L', 'NextFileHasLongPath'], + // skip + ['M', 'ContinuationFile'], + // like L + ['N', 'OldGnuLongPath'], + // skip + ['S', 'SparseFile'], + // skip + ['V', 'TapeVolumeHeader'], + // like x + ['X', 'OldExtendedHeader'], +]) + +// map the other direction +exports.code = new Map(Array.from(exports.name).map(kv => [kv[1], kv[0]])) + + +/***/ }), + +/***/ 52781: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet. +// but the path reservations are required to avoid race conditions where +// parallelized unpack ops may mess with one another, due to dependencies +// (like a Link depending on its target) or destructive operations (like +// clobbering an fs object to create one of a different type.) + +const assert = __nccwpck_require__(39491) +const Parser = __nccwpck_require__(26433) +const fs = __nccwpck_require__(57147) +const fsm = __nccwpck_require__(99612) +const path = __nccwpck_require__(71017) +const mkdir = __nccwpck_require__(35577) +const wc = __nccwpck_require__(79020) +const pathReservations = __nccwpck_require__(92458) +const stripAbsolutePath = __nccwpck_require__(48596) +const normPath = __nccwpck_require__(45802) +const stripSlash = __nccwpck_require__(25905) +const normalize = __nccwpck_require__(87923) + +const ONENTRY = Symbol('onEntry') +const CHECKFS = Symbol('checkFs') +const CHECKFS2 = Symbol('checkFs2') +const PRUNECACHE = Symbol('pruneCache') +const ISREUSABLE = Symbol('isReusable') +const MAKEFS = Symbol('makeFs') +const FILE = Symbol('file') +const DIRECTORY = Symbol('directory') +const LINK = Symbol('link') +const SYMLINK = Symbol('symlink') +const HARDLINK = Symbol('hardlink') +const UNSUPPORTED = Symbol('unsupported') +const CHECKPATH = Symbol('checkPath') +const MKDIR = Symbol('mkdir') +const ONERROR = Symbol('onError') +const PENDING = Symbol('pending') +const PEND = Symbol('pend') +const UNPEND = Symbol('unpend') +const ENDED = Symbol('ended') +const MAYBECLOSE = Symbol('maybeClose') +const SKIP = Symbol('skip') +const DOCHOWN = Symbol('doChown') +const UID = Symbol('uid') +const GID = Symbol('gid') +const CHECKED_CWD = Symbol('checkedCwd') +const crypto = __nccwpck_require__(6113) +const getFlag = __nccwpck_require__(94156) +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform +const isWindows = platform === 'win32' + +// Unlinks on Windows are not atomic. +// +// This means that if you have a file entry, followed by another +// file entry with an identical name, and you cannot re-use the file +// (because it's a hardlink, or because unlink:true is set, or it's +// Windows, which does not have useful nlink values), then the unlink +// will be committed to the disk AFTER the new file has been written +// over the old one, deleting the new file. +// +// To work around this, on Windows systems, we rename the file and then +// delete the renamed file. It's a sloppy kludge, but frankly, I do not +// know of a better way to do this, given windows' non-atomic unlink +// semantics. +// +// See: https://github.com/npm/node-tar/issues/183 +/* istanbul ignore next */ +const unlinkFile = (path, cb) => { + if (!isWindows) + return fs.unlink(path, cb) + + const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex') + fs.rename(path, name, er => { + if (er) + return cb(er) + fs.unlink(name, cb) + }) +} + +/* istanbul ignore next */ +const unlinkFileSync = path => { + if (!isWindows) + return fs.unlinkSync(path) + + const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex') + fs.renameSync(path, name) + fs.unlinkSync(name) +} + +// this.gid, entry.gid, this.processUid +const uint32 = (a, b, c) => + a === a >>> 0 ? a + : b === b >>> 0 ? b + : c + +// clear the cache if it's a case-insensitive unicode-squashing match. +// we can't know if the current file system is case-sensitive or supports +// unicode fully, so we check for similarity on the maximally compatible +// representation. Err on the side of pruning, since all it's doing is +// preventing lstats, and it's not the end of the world if we get a false +// positive. +// Note that on windows, we always drop the entire cache whenever a +// symbolic link is encountered, because 8.3 filenames are impossible +// to reason about, and collisions are hazards rather than just failures. +const cacheKeyNormalize = path => normalize(stripSlash(normPath(path))) + .toLowerCase() + +const pruneCache = (cache, abs) => { + abs = cacheKeyNormalize(abs) + for (const path of cache.keys()) { + const pnorm = cacheKeyNormalize(path) + if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) + cache.delete(path) + } +} + +const dropCache = cache => { + for (const key of cache.keys()) + cache.delete(key) +} + +class Unpack extends Parser { + constructor (opt) { + if (!opt) + opt = {} + + opt.ondone = _ => { + this[ENDED] = true + this[MAYBECLOSE]() + } + + super(opt) + + this[CHECKED_CWD] = false + + this.reservations = pathReservations() + + this.transform = typeof opt.transform === 'function' ? opt.transform : null + + this.writable = true + this.readable = false + + this[PENDING] = 0 + this[ENDED] = false + + this.dirCache = opt.dirCache || new Map() + + if (typeof opt.uid === 'number' || typeof opt.gid === 'number') { + // need both or neither + if (typeof opt.uid !== 'number' || typeof opt.gid !== 'number') + throw new TypeError('cannot set owner without number uid and gid') + if (opt.preserveOwner) { + throw new TypeError( + 'cannot preserve owner in archive and also set owner explicitly') + } + this.uid = opt.uid + this.gid = opt.gid + this.setOwner = true + } else { + this.uid = null + this.gid = null + this.setOwner = false + } + + // default true for root + if (opt.preserveOwner === undefined && typeof opt.uid !== 'number') + this.preserveOwner = process.getuid && process.getuid() === 0 + else + this.preserveOwner = !!opt.preserveOwner + + this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? + process.getuid() : null + this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? + process.getgid() : null + + // mostly just for testing, but useful in some cases. + // Forcibly trigger a chown on every entry, no matter what + this.forceChown = opt.forceChown === true + + // turn > this[ONENTRY](entry)) + } + + // a bad or damaged archive is a warning for Parser, but an error + // when extracting. Mark those errors as unrecoverable, because + // the Unpack contract cannot be met. + warn (code, msg, data = {}) { + if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') + data.recoverable = false + return super.warn(code, msg, data) + } + + [MAYBECLOSE] () { + if (this[ENDED] && this[PENDING] === 0) { + this.emit('prefinish') + this.emit('finish') + this.emit('end') + this.emit('close') + } + } + + [CHECKPATH] (entry) { + if (this.strip) { + const parts = normPath(entry.path).split('/') + if (parts.length < this.strip) + return false + entry.path = parts.slice(this.strip).join('/') + + if (entry.type === 'Link') { + const linkparts = normPath(entry.linkpath).split('/') + if (linkparts.length >= this.strip) + entry.linkpath = linkparts.slice(this.strip).join('/') + else + return false + } + } + + if (!this.preservePaths) { + const p = normPath(entry.path) + const parts = p.split('/') + if (parts.includes('..') || isWindows && /^[a-z]:\.\.$/i.test(parts[0])) { + this.warn('TAR_ENTRY_ERROR', `path contains '..'`, { + entry, + path: p, + }) + return false + } + + // strip off the root + const [root, stripped] = stripAbsolutePath(p) + if (root) { + entry.path = stripped + this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute path`, { + entry, + path: p, + }) + } + } + + if (path.isAbsolute(entry.path)) + entry.absolute = normPath(path.resolve(entry.path)) + else + entry.absolute = normPath(path.resolve(this.cwd, entry.path)) + + // if we somehow ended up with a path that escapes the cwd, and we are + // not in preservePaths mode, then something is fishy! This should have + // been prevented above, so ignore this for coverage. + /* istanbul ignore if - defense in depth */ + if (!this.preservePaths && + entry.absolute.indexOf(this.cwd + '/') !== 0 && + entry.absolute !== this.cwd) { + this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', { + entry, + path: normPath(entry.path), + resolvedPath: entry.absolute, + cwd: this.cwd, + }) + return false + } + + // an archive can set properties on the extraction directory, but it + // may not replace the cwd with a different kind of thing entirely. + if (entry.absolute === this.cwd && + entry.type !== 'Directory' && + entry.type !== 'GNUDumpDir') + return false + + // only encode : chars that aren't drive letter indicators + if (this.win32) { + const { root: aRoot } = path.win32.parse(entry.absolute) + entry.absolute = aRoot + wc.encode(entry.absolute.substr(aRoot.length)) + const { root: pRoot } = path.win32.parse(entry.path) + entry.path = pRoot + wc.encode(entry.path.substr(pRoot.length)) + } + + return true + } + + [ONENTRY] (entry) { + if (!this[CHECKPATH](entry)) + return entry.resume() + + assert.equal(typeof entry.absolute, 'string') + + switch (entry.type) { + case 'Directory': + case 'GNUDumpDir': + if (entry.mode) + entry.mode = entry.mode | 0o700 + + case 'File': + case 'OldFile': + case 'ContiguousFile': + case 'Link': + case 'SymbolicLink': + return this[CHECKFS](entry) + + case 'CharacterDevice': + case 'BlockDevice': + case 'FIFO': + default: + return this[UNSUPPORTED](entry) + } + } + + [ONERROR] (er, entry) { + // Cwd has to exist, or else nothing works. That's serious. + // Other errors are warnings, which raise the error in strict + // mode, but otherwise continue on. + if (er.name === 'CwdError') + this.emit('error', er) + else { + this.warn('TAR_ENTRY_ERROR', er, {entry}) + this[UNPEND]() + entry.resume() + } + } + + [MKDIR] (dir, mode, cb) { + mkdir(normPath(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + noChmod: this.noChmod, + }, cb) + } + + [DOCHOWN] (entry) { + // in preserve owner mode, chown if the entry doesn't match process + // in set owner mode, chown if setting doesn't match process + return this.forceChown || + this.preserveOwner && + (typeof entry.uid === 'number' && entry.uid !== this.processUid || + typeof entry.gid === 'number' && entry.gid !== this.processGid) + || + (typeof this.uid === 'number' && this.uid !== this.processUid || + typeof this.gid === 'number' && this.gid !== this.processGid) + } + + [UID] (entry) { + return uint32(this.uid, entry.uid, this.processUid) + } + + [GID] (entry) { + return uint32(this.gid, entry.gid, this.processGid) + } + + [FILE] (entry, fullyDone) { + const mode = entry.mode & 0o7777 || this.fmode + const stream = new fsm.WriteStream(entry.absolute, { + flags: getFlag(entry.size), + mode: mode, + autoClose: false, + }) + stream.on('error', er => { + if (stream.fd) + fs.close(stream.fd, () => {}) + + // flush all the data out so that we aren't left hanging + // if the error wasn't actually fatal. otherwise the parse + // is blocked, and we never proceed. + stream.write = () => true + this[ONERROR](er, entry) + fullyDone() + }) + + let actions = 1 + const done = er => { + if (er) { + /* istanbul ignore else - we should always have a fd by now */ + if (stream.fd) + fs.close(stream.fd, () => {}) + + this[ONERROR](er, entry) + fullyDone() + return + } + + if (--actions === 0) { + fs.close(stream.fd, er => { + if (er) + this[ONERROR](er, entry) + else + this[UNPEND]() + fullyDone() + }) + } + } + + stream.on('finish', _ => { + // if futimes fails, try utimes + // if utimes fails, fail with the original error + // same for fchown/chown + const abs = entry.absolute + const fd = stream.fd + + if (entry.mtime && !this.noMtime) { + actions++ + const atime = entry.atime || new Date() + const mtime = entry.mtime + fs.futimes(fd, atime, mtime, er => + er ? fs.utimes(abs, atime, mtime, er2 => done(er2 && er)) + : done()) + } + + if (this[DOCHOWN](entry)) { + actions++ + const uid = this[UID](entry) + const gid = this[GID](entry) + fs.fchown(fd, uid, gid, er => + er ? fs.chown(abs, uid, gid, er2 => done(er2 && er)) + : done()) + } + + done() + }) + + const tx = this.transform ? this.transform(entry) || entry : entry + if (tx !== entry) { + tx.on('error', er => { + this[ONERROR](er, entry) + fullyDone() + }) + entry.pipe(tx) + } + tx.pipe(stream) + } + + [DIRECTORY] (entry, fullyDone) { + const mode = entry.mode & 0o7777 || this.dmode + this[MKDIR](entry.absolute, mode, er => { + if (er) { + this[ONERROR](er, entry) + fullyDone() + return + } + + let actions = 1 + const done = _ => { + if (--actions === 0) { + fullyDone() + this[UNPEND]() + entry.resume() + } + } + + if (entry.mtime && !this.noMtime) { + actions++ + fs.utimes(entry.absolute, entry.atime || new Date(), entry.mtime, done) + } + + if (this[DOCHOWN](entry)) { + actions++ + fs.chown(entry.absolute, this[UID](entry), this[GID](entry), done) + } + + done() + }) + } + + [UNSUPPORTED] (entry) { + entry.unsupported = true + this.warn('TAR_ENTRY_UNSUPPORTED', + `unsupported entry type: ${entry.type}`, {entry}) + entry.resume() + } + + [SYMLINK] (entry, done) { + this[LINK](entry, entry.linkpath, 'symlink', done) + } + + [HARDLINK] (entry, done) { + const linkpath = normPath(path.resolve(this.cwd, entry.linkpath)) + this[LINK](entry, linkpath, 'link', done) + } + + [PEND] () { + this[PENDING]++ + } + + [UNPEND] () { + this[PENDING]-- + this[MAYBECLOSE]() + } + + [SKIP] (entry) { + this[UNPEND]() + entry.resume() + } + + // Check if we can reuse an existing filesystem entry safely and + // overwrite it, rather than unlinking and recreating + // Windows doesn't report a useful nlink, so we just never reuse entries + [ISREUSABLE] (entry, st) { + return entry.type === 'File' && + !this.unlink && + st.isFile() && + st.nlink <= 1 && + !isWindows + } + + // check if a thing is there, and if so, try to clobber it + [CHECKFS] (entry) { + this[PEND]() + const paths = [entry.path] + if (entry.linkpath) + paths.push(entry.linkpath) + this.reservations.reserve(paths, done => this[CHECKFS2](entry, done)) + } + + [PRUNECACHE] (entry) { + // if we are not creating a directory, and the path is in the dirCache, + // then that means we are about to delete the directory we created + // previously, and it is no longer going to be a directory, and neither + // is any of its children. + // If a symbolic link is encountered, all bets are off. There is no + // reasonable way to sanitize the cache in such a way we will be able to + // avoid having filesystem collisions. If this happens with a non-symlink + // entry, it'll just fail to unpack, but a symlink to a directory, using an + // 8.3 shortname or certain unicode attacks, can evade detection and lead + // to arbitrary writes to anywhere on the system. + if (entry.type === 'SymbolicLink') + dropCache(this.dirCache) + else if (entry.type !== 'Directory') + pruneCache(this.dirCache, entry.absolute) + } + + [CHECKFS2] (entry, fullyDone) { + this[PRUNECACHE](entry) + + const done = er => { + this[PRUNECACHE](entry) + fullyDone(er) + } + + const checkCwd = () => { + this[MKDIR](this.cwd, this.dmode, er => { + if (er) { + this[ONERROR](er, entry) + done() + return + } + this[CHECKED_CWD] = true + start() + }) + } + + const start = () => { + if (entry.absolute !== this.cwd) { + const parent = normPath(path.dirname(entry.absolute)) + if (parent !== this.cwd) { + return this[MKDIR](parent, this.dmode, er => { + if (er) { + this[ONERROR](er, entry) + done() + return + } + afterMakeParent() + }) + } + } + afterMakeParent() + } + + const afterMakeParent = () => { + fs.lstat(entry.absolute, (lstatEr, st) => { + if (st && (this.keep || this.newer && st.mtime > entry.mtime)) { + this[SKIP](entry) + done() + return + } + if (lstatEr || this[ISREUSABLE](entry, st)) + return this[MAKEFS](null, entry, done) + + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = !this.noChmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode + const afterChmod = er => this[MAKEFS](er, entry, done) + if (!needChmod) + return afterChmod() + return fs.chmod(entry.absolute, entry.mode, afterChmod) + } + // Not a dir entry, have to remove it. + // NB: the only way to end up with an entry that is the cwd + // itself, in such a way that == does not detect, is a + // tricky windows absolute path with UNC or 8.3 parts (and + // preservePaths:true, or else it will have been stripped). + // In that case, the user has opted out of path protections + // explicitly, so if they blow away the cwd, c'est la vie. + if (entry.absolute !== this.cwd) { + return fs.rmdir(entry.absolute, er => + this[MAKEFS](er, entry, done)) + } + } + + // not a dir, and not reusable + // don't remove if the cwd, we want that error + if (entry.absolute === this.cwd) + return this[MAKEFS](null, entry, done) + + unlinkFile(entry.absolute, er => + this[MAKEFS](er, entry, done)) + }) + } + + if (this[CHECKED_CWD]) + start() + else + checkCwd() + } + + [MAKEFS] (er, entry, done) { + if (er) { + this[ONERROR](er, entry) + done() + return + } + + switch (entry.type) { + case 'File': + case 'OldFile': + case 'ContiguousFile': + return this[FILE](entry, done) + + case 'Link': + return this[HARDLINK](entry, done) + + case 'SymbolicLink': + return this[SYMLINK](entry, done) + + case 'Directory': + case 'GNUDumpDir': + return this[DIRECTORY](entry, done) + } + } + + [LINK] (entry, linkpath, link, done) { + // XXX: get the type ('symlink' or 'junction') for windows + fs[link](linkpath, entry.absolute, er => { + if (er) + this[ONERROR](er, entry) + else { + this[UNPEND]() + entry.resume() + } + done() + }) + } +} + +const callSync = fn => { + try { + return [null, fn()] + } catch (er) { + return [er, null] + } +} +class UnpackSync extends Unpack { + [MAKEFS] (er, entry) { + return super[MAKEFS](er, entry, () => {}) + } + + [CHECKFS] (entry) { + this[PRUNECACHE](entry) + + if (!this[CHECKED_CWD]) { + const er = this[MKDIR](this.cwd, this.dmode) + if (er) + return this[ONERROR](er, entry) + this[CHECKED_CWD] = true + } + + // don't bother to make the parent if the current entry is the cwd, + // we've already checked it. + if (entry.absolute !== this.cwd) { + const parent = normPath(path.dirname(entry.absolute)) + if (parent !== this.cwd) { + const mkParent = this[MKDIR](parent, this.dmode) + if (mkParent) + return this[ONERROR](mkParent, entry) + } + } + + const [lstatEr, st] = callSync(() => fs.lstatSync(entry.absolute)) + if (st && (this.keep || this.newer && st.mtime > entry.mtime)) + return this[SKIP](entry) + + if (lstatEr || this[ISREUSABLE](entry, st)) + return this[MAKEFS](null, entry) + + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = !this.noChmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode + const [er] = needChmod ? callSync(() => { + fs.chmodSync(entry.absolute, entry.mode) + }) : [] + return this[MAKEFS](er, entry) + } + // not a dir entry, have to remove it + const [er] = callSync(() => fs.rmdirSync(entry.absolute)) + this[MAKEFS](er, entry) + } + + // not a dir, and not reusable. + // don't remove if it's the cwd, since we want that error. + const [er] = entry.absolute === this.cwd ? [] + : callSync(() => unlinkFileSync(entry.absolute)) + this[MAKEFS](er, entry) + } + + [FILE] (entry, done) { + const mode = entry.mode & 0o7777 || this.fmode + + const oner = er => { + let closeError + try { + fs.closeSync(fd) + } catch (e) { + closeError = e + } + if (er || closeError) + this[ONERROR](er || closeError, entry) + done() + } + + let fd + try { + fd = fs.openSync(entry.absolute, getFlag(entry.size), mode) + } catch (er) { + return oner(er) + } + const tx = this.transform ? this.transform(entry) || entry : entry + if (tx !== entry) { + tx.on('error', er => this[ONERROR](er, entry)) + entry.pipe(tx) + } + + tx.on('data', chunk => { + try { + fs.writeSync(fd, chunk, 0, chunk.length) + } catch (er) { + oner(er) + } + }) + + tx.on('end', _ => { + let er = null + // try both, falling futimes back to utimes + // if either fails, handle the first error + if (entry.mtime && !this.noMtime) { + const atime = entry.atime || new Date() + const mtime = entry.mtime + try { + fs.futimesSync(fd, atime, mtime) + } catch (futimeser) { + try { + fs.utimesSync(entry.absolute, atime, mtime) + } catch (utimeser) { + er = futimeser + } + } + } + + if (this[DOCHOWN](entry)) { + const uid = this[UID](entry) + const gid = this[GID](entry) + + try { + fs.fchownSync(fd, uid, gid) + } catch (fchowner) { + try { + fs.chownSync(entry.absolute, uid, gid) + } catch (chowner) { + er = er || fchowner + } + } + } + + oner(er) + }) + } + + [DIRECTORY] (entry, done) { + const mode = entry.mode & 0o7777 || this.dmode + const er = this[MKDIR](entry.absolute, mode) + if (er) { + this[ONERROR](er, entry) + done() + return + } + if (entry.mtime && !this.noMtime) { + try { + fs.utimesSync(entry.absolute, entry.atime || new Date(), entry.mtime) + } catch (er) {} + } + if (this[DOCHOWN](entry)) { + try { + fs.chownSync(entry.absolute, this[UID](entry), this[GID](entry)) + } catch (er) {} + } + done() + entry.resume() + } + + [MKDIR] (dir, mode) { + try { + return mkdir.sync(normPath(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + }) + } catch (er) { + return er + } + } + + [LINK] (entry, linkpath, link, done) { + try { + fs[link + 'Sync'](linkpath, entry.absolute) + done() + entry.resume() + } catch (er) { + return this[ONERROR](er, entry) + } + } +} + +Unpack.Sync = UnpackSync +module.exports = Unpack + + +/***/ }), + +/***/ 62786: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// tar -u + +const hlo = __nccwpck_require__(60686) +const r = __nccwpck_require__(70348) +// just call tar.r with the filter and mtimeCache + +module.exports = (opt_, files, cb) => { + const opt = hlo(opt_) + + if (!opt.file) + throw new TypeError('file is required') + + if (opt.gzip) + throw new TypeError('cannot append to compressed archives') + + if (!files || !Array.isArray(files) || !files.length) + throw new TypeError('no files or directories specified') + + files = Array.from(files) + + mtimeFilter(opt) + return r(opt, files, cb) +} + +const mtimeFilter = opt => { + const filter = opt.filter + + if (!opt.mtimeCache) + opt.mtimeCache = new Map() + + opt.filter = filter ? (path, stat) => + filter(path, stat) && !(opt.mtimeCache.get(path) > stat.mtime) + : (path, stat) => !(opt.mtimeCache.get(path) > stat.mtime) +} + + +/***/ }), + +/***/ 29363: +/***/ ((module) => { + +"use strict"; + +module.exports = Base => class extends Base { + warn (code, message, data = {}) { + if (this.file) + data.file = this.file + if (this.cwd) + data.cwd = this.cwd + data.code = message instanceof Error && message.code || code + data.tarCode = code + if (!this.strict && data.recoverable !== false) { + if (message instanceof Error) { + data = Object.assign(message, data) + message = message.message + } + this.emit('warn', data.tarCode, message, data) + } else if (message instanceof Error) + this.emit('error', Object.assign(message, data)) + else + this.emit('error', Object.assign(new Error(`${code}: ${message}`), data)) + } +} + + +/***/ }), + +/***/ 79020: +/***/ ((module) => { + +"use strict"; + + +// When writing files on Windows, translate the characters to their +// 0xf000 higher-encoded versions. + +const raw = [ + '|', + '<', + '>', + '?', + ':', +] + +const win = raw.map(char => + String.fromCharCode(0xf000 + char.charCodeAt(0))) + +const toWin = new Map(raw.map((char, i) => [char, win[i]])) +const toRaw = new Map(win.map((char, i) => [char, raw[i]])) + +module.exports = { + encode: s => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s), + decode: s => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s), +} + + +/***/ }), + +/***/ 85002: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const MiniPass = __nccwpck_require__(27948) +const Pax = __nccwpck_require__(29386) +const Header = __nccwpck_require__(18362) +const fs = __nccwpck_require__(57147) +const path = __nccwpck_require__(71017) +const normPath = __nccwpck_require__(45802) +const stripSlash = __nccwpck_require__(25905) + +const prefixPath = (path, prefix) => { + if (!prefix) + return normPath(path) + path = normPath(path).replace(/^\.(\/|$)/, '') + return stripSlash(prefix) + '/' + path +} + +const maxReadSize = 16 * 1024 * 1024 +const PROCESS = Symbol('process') +const FILE = Symbol('file') +const DIRECTORY = Symbol('directory') +const SYMLINK = Symbol('symlink') +const HARDLINK = Symbol('hardlink') +const HEADER = Symbol('header') +const READ = Symbol('read') +const LSTAT = Symbol('lstat') +const ONLSTAT = Symbol('onlstat') +const ONREAD = Symbol('onread') +const ONREADLINK = Symbol('onreadlink') +const OPENFILE = Symbol('openfile') +const ONOPENFILE = Symbol('onopenfile') +const CLOSE = Symbol('close') +const MODE = Symbol('mode') +const AWAITDRAIN = Symbol('awaitDrain') +const ONDRAIN = Symbol('ondrain') +const PREFIX = Symbol('prefix') +const HAD_ERROR = Symbol('hadError') +const warner = __nccwpck_require__(29363) +const winchars = __nccwpck_require__(79020) +const stripAbsolutePath = __nccwpck_require__(48596) + +const modeFix = __nccwpck_require__(28700) + +const WriteEntry = warner(class WriteEntry extends MiniPass { + constructor (p, opt) { + opt = opt || {} + super(opt) + if (typeof p !== 'string') + throw new TypeError('path is required') + this.path = normPath(p) + // suppress atime, ctime, uid, gid, uname, gname + this.portable = !!opt.portable + // until node has builtin pwnam functions, this'll have to do + this.myuid = process.getuid && process.getuid() || 0 + this.myuser = process.env.USER || '' + this.maxReadSize = opt.maxReadSize || maxReadSize + this.linkCache = opt.linkCache || new Map() + this.statCache = opt.statCache || new Map() + this.preservePaths = !!opt.preservePaths + this.cwd = normPath(opt.cwd || process.cwd()) + this.strict = !!opt.strict + this.noPax = !!opt.noPax + this.noMtime = !!opt.noMtime + this.mtime = opt.mtime || null + this.prefix = opt.prefix ? normPath(opt.prefix) : null + + this.fd = null + this.blockLen = null + this.blockRemain = null + this.buf = null + this.offset = null + this.length = null + this.pos = null + this.remain = null + + if (typeof opt.onwarn === 'function') + this.on('warn', opt.onwarn) + + let pathWarn = false + if (!this.preservePaths) { + const [root, stripped] = stripAbsolutePath(this.path) + if (root) { + this.path = stripped + pathWarn = root + } + } + + this.win32 = !!opt.win32 || process.platform === 'win32' + if (this.win32) { + // force the \ to / normalization, since we might not *actually* + // be on windows, but want \ to be considered a path separator. + this.path = winchars.decode(this.path.replace(/\\/g, '/')) + p = p.replace(/\\/g, '/') + } + + this.absolute = normPath(opt.absolute || path.resolve(this.cwd, p)) + + if (this.path === '') + this.path = './' + + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }) + } + + if (this.statCache.has(this.absolute)) + this[ONLSTAT](this.statCache.get(this.absolute)) + else + this[LSTAT]() + } + + emit (ev, ...data) { + if (ev === 'error') + this[HAD_ERROR] = true + return super.emit(ev, ...data) + } + + [LSTAT] () { + fs.lstat(this.absolute, (er, stat) => { + if (er) + return this.emit('error', er) + this[ONLSTAT](stat) + }) + } + + [ONLSTAT] (stat) { + this.statCache.set(this.absolute, stat) + this.stat = stat + if (!stat.isFile()) + stat.size = 0 + this.type = getType(stat) + this.emit('stat', stat) + this[PROCESS]() + } + + [PROCESS] () { + switch (this.type) { + case 'File': return this[FILE]() + case 'Directory': return this[DIRECTORY]() + case 'SymbolicLink': return this[SYMLINK]() + // unsupported types are ignored. + default: return this.end() + } + } + + [MODE] (mode) { + return modeFix(mode, this.type === 'Directory', this.portable) + } + + [PREFIX] (path) { + return prefixPath(path, this.prefix) + } + + [HEADER] () { + if (this.type === 'Directory' && this.portable) + this.noMtime = true + + this.header = new Header({ + path: this[PREFIX](this.path), + // only apply the prefix to hard links. + linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this[MODE](this.stat.mode), + uid: this.portable ? null : this.stat.uid, + gid: this.portable ? null : this.stat.gid, + size: this.stat.size, + mtime: this.noMtime ? null : this.mtime || this.stat.mtime, + type: this.type, + uname: this.portable ? null : + this.stat.uid === this.myuid ? this.myuser : '', + atime: this.portable ? null : this.stat.atime, + ctime: this.portable ? null : this.stat.ctime, + }) + + if (this.header.encode() && !this.noPax) { + super.write(new Pax({ + atime: this.portable ? null : this.header.atime, + ctime: this.portable ? null : this.header.ctime, + gid: this.portable ? null : this.header.gid, + mtime: this.noMtime ? null : this.mtime || this.header.mtime, + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath) + : this.linkpath, + size: this.header.size, + uid: this.portable ? null : this.header.uid, + uname: this.portable ? null : this.header.uname, + dev: this.portable ? null : this.stat.dev, + ino: this.portable ? null : this.stat.ino, + nlink: this.portable ? null : this.stat.nlink, + }).encode()) + } + super.write(this.header.block) + } + + [DIRECTORY] () { + if (this.path.substr(-1) !== '/') + this.path += '/' + this.stat.size = 0 + this[HEADER]() + this.end() + } + + [SYMLINK] () { + fs.readlink(this.absolute, (er, linkpath) => { + if (er) + return this.emit('error', er) + this[ONREADLINK](linkpath) + }) + } + + [ONREADLINK] (linkpath) { + this.linkpath = normPath(linkpath) + this[HEADER]() + this.end() + } + + [HARDLINK] (linkpath) { + this.type = 'Link' + this.linkpath = normPath(path.relative(this.cwd, linkpath)) + this.stat.size = 0 + this[HEADER]() + this.end() + } + + [FILE] () { + if (this.stat.nlink > 1) { + const linkKey = this.stat.dev + ':' + this.stat.ino + if (this.linkCache.has(linkKey)) { + const linkpath = this.linkCache.get(linkKey) + if (linkpath.indexOf(this.cwd) === 0) + return this[HARDLINK](linkpath) + } + this.linkCache.set(linkKey, this.absolute) + } + + this[HEADER]() + if (this.stat.size === 0) + return this.end() + + this[OPENFILE]() + } + + [OPENFILE] () { + fs.open(this.absolute, 'r', (er, fd) => { + if (er) + return this.emit('error', er) + this[ONOPENFILE](fd) + }) + } + + [ONOPENFILE] (fd) { + this.fd = fd + if (this[HAD_ERROR]) + return this[CLOSE]() + + this.blockLen = 512 * Math.ceil(this.stat.size / 512) + this.blockRemain = this.blockLen + const bufLen = Math.min(this.blockLen, this.maxReadSize) + this.buf = Buffer.allocUnsafe(bufLen) + this.offset = 0 + this.pos = 0 + this.remain = this.stat.size + this.length = this.buf.length + this[READ]() + } + + [READ] () { + const { fd, buf, offset, length, pos } = this + fs.read(fd, buf, offset, length, pos, (er, bytesRead) => { + if (er) { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + return this[CLOSE](() => this.emit('error', er)) + } + this[ONREAD](bytesRead) + }) + } + + [CLOSE] (cb) { + fs.close(this.fd, cb) + } + + [ONREAD] (bytesRead) { + if (bytesRead <= 0 && this.remain > 0) { + const er = new Error('encountered unexpected EOF') + er.path = this.absolute + er.syscall = 'read' + er.code = 'EOF' + return this[CLOSE](() => this.emit('error', er)) + } + + if (bytesRead > this.remain) { + const er = new Error('did not encounter expected EOF') + er.path = this.absolute + er.syscall = 'read' + er.code = 'EOF' + return this[CLOSE](() => this.emit('error', er)) + } + + // null out the rest of the buffer, if we could fit the block padding + // at the end of this loop, we've incremented bytesRead and this.remain + // to be incremented up to the blockRemain level, as if we had expected + // to get a null-padded file, and read it until the end. then we will + // decrement both remain and blockRemain by bytesRead, and know that we + // reached the expected EOF, without any null buffer to append. + if (bytesRead === this.remain) { + for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) { + this.buf[i + this.offset] = 0 + bytesRead++ + this.remain++ + } + } + + const writeBuf = this.offset === 0 && bytesRead === this.buf.length ? + this.buf : this.buf.slice(this.offset, this.offset + bytesRead) + + const flushed = this.write(writeBuf) + if (!flushed) + this[AWAITDRAIN](() => this[ONDRAIN]()) + else + this[ONDRAIN]() + } + + [AWAITDRAIN] (cb) { + this.once('drain', cb) + } + + write (writeBuf) { + if (this.blockRemain < writeBuf.length) { + const er = new Error('writing more data than expected') + er.path = this.absolute + return this.emit('error', er) + } + this.remain -= writeBuf.length + this.blockRemain -= writeBuf.length + this.pos += writeBuf.length + this.offset += writeBuf.length + return super.write(writeBuf) + } + + [ONDRAIN] () { + if (!this.remain) { + if (this.blockRemain) + super.write(Buffer.alloc(this.blockRemain)) + return this[CLOSE](er => er ? this.emit('error', er) : this.end()) + } + + if (this.offset >= this.length) { + // if we only have a smaller bit left to read, alloc a smaller buffer + // otherwise, keep it the same length it was before. + this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)) + this.offset = 0 + } + this.length = this.buf.length - this.offset + this[READ]() + } +}) + +class WriteEntrySync extends WriteEntry { + [LSTAT] () { + this[ONLSTAT](fs.lstatSync(this.absolute)) + } + + [SYMLINK] () { + this[ONREADLINK](fs.readlinkSync(this.absolute)) + } + + [OPENFILE] () { + this[ONOPENFILE](fs.openSync(this.absolute, 'r')) + } + + [READ] () { + let threw = true + try { + const { fd, buf, offset, length, pos } = this + const bytesRead = fs.readSync(fd, buf, offset, length, pos) + this[ONREAD](bytesRead) + threw = false + } finally { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + if (threw) { + try { + this[CLOSE](() => {}) + } catch (er) {} + } + } + } + + [AWAITDRAIN] (cb) { + cb() + } + + [CLOSE] (cb) { + fs.closeSync(this.fd) + cb() + } +} + +const WriteEntryTar = warner(class WriteEntryTar extends MiniPass { + constructor (readEntry, opt) { + opt = opt || {} + super(opt) + this.preservePaths = !!opt.preservePaths + this.portable = !!opt.portable + this.strict = !!opt.strict + this.noPax = !!opt.noPax + this.noMtime = !!opt.noMtime + + this.readEntry = readEntry + this.type = readEntry.type + if (this.type === 'Directory' && this.portable) + this.noMtime = true + + this.prefix = opt.prefix || null + + this.path = normPath(readEntry.path) + this.mode = this[MODE](readEntry.mode) + this.uid = this.portable ? null : readEntry.uid + this.gid = this.portable ? null : readEntry.gid + this.uname = this.portable ? null : readEntry.uname + this.gname = this.portable ? null : readEntry.gname + this.size = readEntry.size + this.mtime = this.noMtime ? null : opt.mtime || readEntry.mtime + this.atime = this.portable ? null : readEntry.atime + this.ctime = this.portable ? null : readEntry.ctime + this.linkpath = normPath(readEntry.linkpath) + + if (typeof opt.onwarn === 'function') + this.on('warn', opt.onwarn) + + let pathWarn = false + if (!this.preservePaths) { + const [root, stripped] = stripAbsolutePath(this.path) + if (root) { + this.path = stripped + pathWarn = root + } + } + + this.remain = readEntry.size + this.blockRemain = readEntry.startBlockSize + + this.header = new Header({ + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this.mode, + uid: this.portable ? null : this.uid, + gid: this.portable ? null : this.gid, + size: this.size, + mtime: this.noMtime ? null : this.mtime, + type: this.type, + uname: this.portable ? null : this.uname, + atime: this.portable ? null : this.atime, + ctime: this.portable ? null : this.ctime, + }) + + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }) + } + + if (this.header.encode() && !this.noPax) { + super.write(new Pax({ + atime: this.portable ? null : this.atime, + ctime: this.portable ? null : this.ctime, + gid: this.portable ? null : this.gid, + mtime: this.noMtime ? null : this.mtime, + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath) + : this.linkpath, + size: this.size, + uid: this.portable ? null : this.uid, + uname: this.portable ? null : this.uname, + dev: this.portable ? null : this.readEntry.dev, + ino: this.portable ? null : this.readEntry.ino, + nlink: this.portable ? null : this.readEntry.nlink, + }).encode()) + } + + super.write(this.header.block) + readEntry.pipe(this) + } + + [PREFIX] (path) { + return prefixPath(path, this.prefix) + } + + [MODE] (mode) { + return modeFix(mode, this.type === 'Directory', this.portable) + } + + write (data) { + const writeLen = data.length + if (writeLen > this.blockRemain) + throw new Error('writing more to entry than is appropriate') + this.blockRemain -= writeLen + return super.write(data) + } + + end () { + if (this.blockRemain) + super.write(Buffer.alloc(this.blockRemain)) + return super.end() + } +}) + +WriteEntry.Sync = WriteEntrySync +WriteEntry.Tar = WriteEntryTar + +const getType = stat => + stat.isFile() ? 'File' + : stat.isDirectory() ? 'Directory' + : stat.isSymbolicLink() ? 'SymbolicLink' + : 'Unsupported' + +module.exports = WriteEntry + + +/***/ }), + +/***/ 66647: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const optsArg = __nccwpck_require__(13037) +const pathArg = __nccwpck_require__(87959) + +const {mkdirpNative, mkdirpNativeSync} = __nccwpck_require__(40644) +const {mkdirpManual, mkdirpManualSync} = __nccwpck_require__(4871) +const {useNative, useNativeSync} = __nccwpck_require__(26600) + + +const mkdirp = (path, opts) => { + path = pathArg(path) + opts = optsArg(opts) + return useNative(opts) + ? mkdirpNative(path, opts) + : mkdirpManual(path, opts) +} + +const mkdirpSync = (path, opts) => { + path = pathArg(path) + opts = optsArg(opts) + return useNativeSync(opts) + ? mkdirpNativeSync(path, opts) + : mkdirpManualSync(path, opts) +} + +mkdirp.sync = mkdirpSync +mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts)) +mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts)) +mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts)) +mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts)) + +module.exports = mkdirp + + +/***/ }), + +/***/ 23295: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const {dirname} = __nccwpck_require__(71017) + +const findMade = (opts, parent, path = undefined) => { + // we never want the 'made' return value to be a root directory + if (path === parent) + return Promise.resolve() + + return opts.statAsync(parent).then( + st => st.isDirectory() ? path : undefined, // will fail later + er => er.code === 'ENOENT' + ? findMade(opts, dirname(parent), parent) + : undefined + ) +} + +const findMadeSync = (opts, parent, path = undefined) => { + if (path === parent) + return undefined + + try { + return opts.statSync(parent).isDirectory() ? path : undefined + } catch (er) { + return er.code === 'ENOENT' + ? findMadeSync(opts, dirname(parent), parent) + : undefined + } +} + +module.exports = {findMade, findMadeSync} + + +/***/ }), + +/***/ 4871: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const {dirname} = __nccwpck_require__(71017) + +const mkdirpManual = (path, opts, made) => { + opts.recursive = false + const parent = dirname(path) + if (parent === path) { + return opts.mkdirAsync(path, opts).catch(er => { + // swallowed by recursive implementation on posix systems + // any other error is a failure + if (er.code !== 'EISDIR') + throw er + }) + } + + return opts.mkdirAsync(path, opts).then(() => made || path, er => { + if (er.code === 'ENOENT') + return mkdirpManual(parent, opts) + .then(made => mkdirpManual(path, opts, made)) + if (er.code !== 'EEXIST' && er.code !== 'EROFS') + throw er + return opts.statAsync(path).then(st => { + if (st.isDirectory()) + return made + else + throw er + }, () => { throw er }) + }) +} + +const mkdirpManualSync = (path, opts, made) => { + const parent = dirname(path) + opts.recursive = false + + if (parent === path) { + try { + return opts.mkdirSync(path, opts) + } catch (er) { + // swallowed by recursive implementation on posix systems + // any other error is a failure + if (er.code !== 'EISDIR') + throw er + else + return + } + } + + try { + opts.mkdirSync(path, opts) + return made || path + } catch (er) { + if (er.code === 'ENOENT') + return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made)) + if (er.code !== 'EEXIST' && er.code !== 'EROFS') + throw er + try { + if (!opts.statSync(path).isDirectory()) + throw er + } catch (_) { + throw er + } + } +} + +module.exports = {mkdirpManual, mkdirpManualSync} + + +/***/ }), + +/***/ 40644: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const {dirname} = __nccwpck_require__(71017) +const {findMade, findMadeSync} = __nccwpck_require__(23295) +const {mkdirpManual, mkdirpManualSync} = __nccwpck_require__(4871) + +const mkdirpNative = (path, opts) => { + opts.recursive = true + const parent = dirname(path) + if (parent === path) + return opts.mkdirAsync(path, opts) + + return findMade(opts, path).then(made => + opts.mkdirAsync(path, opts).then(() => made) + .catch(er => { + if (er.code === 'ENOENT') + return mkdirpManual(path, opts) + else + throw er + })) +} + +const mkdirpNativeSync = (path, opts) => { + opts.recursive = true + const parent = dirname(path) + if (parent === path) + return opts.mkdirSync(path, opts) + + const made = findMadeSync(opts, path) + try { + opts.mkdirSync(path, opts) + return made + } catch (er) { + if (er.code === 'ENOENT') + return mkdirpManualSync(path, opts) + else + throw er + } +} + +module.exports = {mkdirpNative, mkdirpNativeSync} + + +/***/ }), + +/***/ 13037: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { promisify } = __nccwpck_require__(73837) +const fs = __nccwpck_require__(57147) +const optsArg = opts => { + if (!opts) + opts = { mode: 0o777, fs } + else if (typeof opts === 'object') + opts = { mode: 0o777, fs, ...opts } + else if (typeof opts === 'number') + opts = { mode: opts, fs } + else if (typeof opts === 'string') + opts = { mode: parseInt(opts, 8), fs } + else + throw new TypeError('invalid options argument') + + opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir + opts.mkdirAsync = promisify(opts.mkdir) + opts.stat = opts.stat || opts.fs.stat || fs.stat + opts.statAsync = promisify(opts.stat) + opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync + opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync + return opts +} +module.exports = optsArg + + +/***/ }), + +/***/ 87959: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform +const { resolve, parse } = __nccwpck_require__(71017) +const pathArg = path => { + if (/\0/.test(path)) { + // simulate same failure that node raises + throw Object.assign( + new TypeError('path must be a string without null bytes'), + { + path, + code: 'ERR_INVALID_ARG_VALUE', + } + ) + } + + path = resolve(path) + if (platform === 'win32') { + const badWinChars = /[*|"<>?:]/ + const {root} = parse(path) + if (badWinChars.test(path.substr(root.length))) { + throw Object.assign(new Error('Illegal characters in path.'), { + path, + code: 'EINVAL', + }) + } + } + + return path +} +module.exports = pathArg + + +/***/ }), + +/***/ 26600: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const fs = __nccwpck_require__(57147) + +const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version +const versArr = version.replace(/^v/, '').split('.') +const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12 + +const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir +const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync + +module.exports = {useNative, useNativeSync} + + +/***/ }), + +/***/ 3286: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { promisify } = __nccwpck_require__(73837); +const tmp = __nccwpck_require__(8100); + +// file +module.exports.fileSync = tmp.fileSync; +const fileWithOptions = promisify((options, cb) => + tmp.file(options, (err, path, fd, cleanup) => + err ? cb(err) : cb(undefined, { path, fd, cleanup: promisify(cleanup) }) + ) +); +module.exports.file = async (options) => fileWithOptions(options); + +module.exports.withFile = async function withFile(fn, options) { + const { path, fd, cleanup } = await module.exports.file(options); + try { + return await fn({ path, fd }); + } finally { + await cleanup(); + } +}; + + +// directory +module.exports.dirSync = tmp.dirSync; +const dirWithOptions = promisify((options, cb) => + tmp.dir(options, (err, path, cleanup) => + err ? cb(err) : cb(undefined, { path, cleanup: promisify(cleanup) }) + ) +); +module.exports.dir = async (options) => dirWithOptions(options); + +module.exports.withDir = async function withDir(fn, options) { + const { path, cleanup } = await module.exports.dir(options); + try { + return await fn({ path }); + } finally { + await cleanup(); + } +}; + + +// name generation +module.exports.tmpNameSync = tmp.tmpNameSync; +module.exports.tmpName = promisify(tmp.tmpName); + +module.exports.tmpdir = tmp.tmpdir; + +module.exports.setGracefulCleanup = tmp.setGracefulCleanup; + + +/***/ }), + +/***/ 8100: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Tmp + * + * Copyright (c) 2011-2017 KARASZI Istvan + * + * MIT Licensed + */ + +/* + * Module dependencies. + */ +const fs = __nccwpck_require__(57147); +const os = __nccwpck_require__(22037); +const path = __nccwpck_require__(71017); +const crypto = __nccwpck_require__(6113); +const _c = { fs: fs.constants, os: os.constants }; +const rimraf = __nccwpck_require__(14672); + +/* + * The working inner variables. + */ +const + // the random characters to choose from + RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', + + TEMPLATE_PATTERN = /XXXXXX/, + + DEFAULT_TRIES = 3, + + CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR), + + // constants are off on the windows platform and will not match the actual errno codes + IS_WIN32 = os.platform() === 'win32', + EBADF = _c.EBADF || _c.os.errno.EBADF, + ENOENT = _c.ENOENT || _c.os.errno.ENOENT, + + DIR_MODE = 0o700 /* 448 */, + FILE_MODE = 0o600 /* 384 */, + + EXIT = 'exit', + + // this will hold the objects need to be removed on exit + _removeObjects = [], + + // API change in fs.rmdirSync leads to error when passing in a second parameter, e.g. the callback + FN_RMDIR_SYNC = fs.rmdirSync.bind(fs), + FN_RIMRAF_SYNC = rimraf.sync; + +let + _gracefulCleanup = false; + +/** + * Gets a temporary file name. + * + * @param {(Options|tmpNameCallback)} options options or callback + * @param {?tmpNameCallback} callback the callback function + */ +function tmpName(options, callback) { + const + args = _parseArguments(options, callback), + opts = args[0], + cb = args[1]; + + try { + _assertAndSanitizeOptions(opts); + } catch (err) { + return cb(err); + } + + let tries = opts.tries; + (function _getUniqueName() { + try { + const name = _generateTmpName(opts); + + // check whether the path exists then retry if needed + fs.stat(name, function (err) { + /* istanbul ignore else */ + if (!err) { + /* istanbul ignore else */ + if (tries-- > 0) return _getUniqueName(); + + return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name)); + } + + cb(null, name); + }); + } catch (err) { + cb(err); + } + }()); +} + +/** + * Synchronous version of tmpName. + * + * @param {Object} options + * @returns {string} the generated random name + * @throws {Error} if the options are invalid or could not generate a filename + */ +function tmpNameSync(options) { + const + args = _parseArguments(options), + opts = args[0]; + + _assertAndSanitizeOptions(opts); + + let tries = opts.tries; + do { + const name = _generateTmpName(opts); + try { + fs.statSync(name); + } catch (e) { + return name; + } + } while (tries-- > 0); + + throw new Error('Could not get a unique tmp filename, max tries reached'); +} + +/** + * Creates and opens a temporary file. + * + * @param {(Options|null|undefined|fileCallback)} options the config options or the callback function or null or undefined + * @param {?fileCallback} callback + */ +function file(options, callback) { + const + args = _parseArguments(options, callback), + opts = args[0], + cb = args[1]; + + // gets a temporary filename + tmpName(opts, function _tmpNameCreated(err, name) { + /* istanbul ignore else */ + if (err) return cb(err); + + // create and open the file + fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) { + /* istanbu ignore else */ + if (err) return cb(err); + + if (opts.discardDescriptor) { + return fs.close(fd, function _discardCallback(possibleErr) { + // the chance of getting an error on close here is rather low and might occur in the most edgiest cases only + return cb(possibleErr, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts, false)); + }); + } else { + // detachDescriptor passes the descriptor whereas discardDescriptor closes it, either way, we no longer care + // about the descriptor + const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; + cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false)); + } + }); + }); +} + +/** + * Synchronous version of file. + * + * @param {Options} options + * @returns {FileSyncObject} object consists of name, fd and removeCallback + * @throws {Error} if cannot create a file + */ +function fileSync(options) { + const + args = _parseArguments(options), + opts = args[0]; + + const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; + const name = tmpNameSync(opts); + var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); + /* istanbul ignore else */ + if (opts.discardDescriptor) { + fs.closeSync(fd); + fd = undefined; + } + + return { + name: name, + fd: fd, + removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true) + }; +} + +/** + * Creates a temporary directory. + * + * @param {(Options|dirCallback)} options the options or the callback function + * @param {?dirCallback} callback + */ +function dir(options, callback) { + const + args = _parseArguments(options, callback), + opts = args[0], + cb = args[1]; + + // gets a temporary filename + tmpName(opts, function _tmpNameCreated(err, name) { + /* istanbul ignore else */ + if (err) return cb(err); + + // create the directory + fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) { + /* istanbul ignore else */ + if (err) return cb(err); + + cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); + }); + }); +} + +/** + * Synchronous version of dir. + * + * @param {Options} options + * @returns {DirSyncObject} object consists of name and removeCallback + * @throws {Error} if it cannot create a directory + */ +function dirSync(options) { + const + args = _parseArguments(options), + opts = args[0]; + + const name = tmpNameSync(opts); + fs.mkdirSync(name, opts.mode || DIR_MODE); + + return { + name: name, + removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) + }; +} + +/** + * Removes files asynchronously. + * + * @param {Object} fdPath + * @param {Function} next + * @private + */ +function _removeFileAsync(fdPath, next) { + const _handler = function (err) { + if (err && !_isENOENT(err)) { + // reraise any unanticipated error + return next(err); + } + next(); + }; + + if (0 <= fdPath[0]) + fs.close(fdPath[0], function () { + fs.unlink(fdPath[1], _handler); + }); + else fs.unlink(fdPath[1], _handler); +} + +/** + * Removes files synchronously. + * + * @param {Object} fdPath + * @private + */ +function _removeFileSync(fdPath) { + let rethrownException = null; + try { + if (0 <= fdPath[0]) fs.closeSync(fdPath[0]); + } catch (e) { + // reraise any unanticipated error + if (!_isEBADF(e) && !_isENOENT(e)) throw e; + } finally { + try { + fs.unlinkSync(fdPath[1]); + } + catch (e) { + // reraise any unanticipated error + if (!_isENOENT(e)) rethrownException = e; + } + } + if (rethrownException !== null) { + throw rethrownException; + } +} + +/** + * Prepares the callback for removal of the temporary file. + * + * Returns either a sync callback or a async callback depending on whether + * fileSync or file was called, which is expressed by the sync parameter. + * + * @param {string} name the path of the file + * @param {number} fd file descriptor + * @param {Object} opts + * @param {boolean} sync + * @returns {fileCallback | fileCallbackSync} + * @private + */ +function _prepareTmpFileRemoveCallback(name, fd, opts, sync) { + const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync); + const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync); + + if (!opts.keep) _removeObjects.unshift(removeCallbackSync); + + return sync ? removeCallbackSync : removeCallback; +} + +/** + * Prepares the callback for removal of the temporary directory. + * + * Returns either a sync callback or a async callback depending on whether + * tmpFileSync or tmpFile was called, which is expressed by the sync parameter. + * + * @param {string} name + * @param {Object} opts + * @param {boolean} sync + * @returns {Function} the callback + * @private + */ +function _prepareTmpDirRemoveCallback(name, opts, sync) { + const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs); + const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; + const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); + const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); + if (!opts.keep) _removeObjects.unshift(removeCallbackSync); + + return sync ? removeCallbackSync : removeCallback; +} + +/** + * Creates a guarded function wrapping the removeFunction call. + * + * The cleanup callback is save to be called multiple times. + * Subsequent invocations will be ignored. + * + * @param {Function} removeFunction + * @param {string} fileOrDirName + * @param {boolean} sync + * @param {cleanupCallbackSync?} cleanupCallbackSync + * @returns {cleanupCallback | cleanupCallbackSync} + * @private + */ +function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) { + let called = false; + + // if sync is true, the next parameter will be ignored + return function _cleanupCallback(next) { + + /* istanbul ignore else */ + if (!called) { + // remove cleanupCallback from cache + const toRemove = cleanupCallbackSync || _cleanupCallback; + const index = _removeObjects.indexOf(toRemove); + /* istanbul ignore else */ + if (index >= 0) _removeObjects.splice(index, 1); + + called = true; + if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) { + return removeFunction(fileOrDirName); + } else { + return removeFunction(fileOrDirName, next || function() {}); + } + } + }; +} + +/** + * The garbage collector. + * + * @private + */ +function _garbageCollector() { + /* istanbul ignore else */ + if (!_gracefulCleanup) return; + + // the function being called removes itself from _removeObjects, + // loop until _removeObjects is empty + while (_removeObjects.length) { + try { + _removeObjects[0](); + } catch (e) { + // already removed? + } + } +} + +/** + * Random name generator based on crypto. + * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript + * + * @param {number} howMany + * @returns {string} the generated random name + * @private + */ +function _randomChars(howMany) { + let + value = [], + rnd = null; + + // make sure that we do not fail because we ran out of entropy + try { + rnd = crypto.randomBytes(howMany); + } catch (e) { + rnd = crypto.pseudoRandomBytes(howMany); + } + + for (var i = 0; i < howMany; i++) { + value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); + } + + return value.join(''); +} + +/** + * Helper which determines whether a string s is blank, that is undefined, or empty or null. + * + * @private + * @param {string} s + * @returns {Boolean} true whether the string s is blank, false otherwise + */ +function _isBlank(s) { + return s === null || _isUndefined(s) || !s.trim(); +} + +/** + * Checks whether the `obj` parameter is defined or not. + * + * @param {Object} obj + * @returns {boolean} true if the object is undefined + * @private + */ +function _isUndefined(obj) { + return typeof obj === 'undefined'; +} + +/** + * Parses the function arguments. + * + * This function helps to have optional arguments. + * + * @param {(Options|null|undefined|Function)} options + * @param {?Function} callback + * @returns {Array} parsed arguments + * @private + */ +function _parseArguments(options, callback) { + /* istanbul ignore else */ + if (typeof options === 'function') { + return [{}, options]; + } + + /* istanbul ignore else */ + if (_isUndefined(options)) { + return [{}, callback]; + } + + // copy options so we do not leak the changes we make internally + const actualOptions = {}; + for (const key of Object.getOwnPropertyNames(options)) { + actualOptions[key] = options[key]; + } + + return [actualOptions, callback]; +} + +/** + * Generates a new temporary name. + * + * @param {Object} opts + * @returns {string} the new random name according to opts + * @private + */ +function _generateTmpName(opts) { + + const tmpDir = opts.tmpdir; + + /* istanbul ignore else */ + if (!_isUndefined(opts.name)) + return path.join(tmpDir, opts.dir, opts.name); + + /* istanbul ignore else */ + if (!_isUndefined(opts.template)) + return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + + // prefix and postfix + const name = [ + opts.prefix ? opts.prefix : 'tmp', + '-', + process.pid, + '-', + _randomChars(12), + opts.postfix ? '-' + opts.postfix : '' + ].join(''); + + return path.join(tmpDir, opts.dir, name); +} + +/** + * Asserts whether the specified options are valid, also sanitizes options and provides sane defaults for missing + * options. + * + * @param {Options} options + * @private + */ +function _assertAndSanitizeOptions(options) { + + options.tmpdir = _getTmpDir(options); + + const tmpDir = options.tmpdir; + + /* istanbul ignore else */ + if (!_isUndefined(options.name)) + _assertIsRelative(options.name, 'name', tmpDir); + /* istanbul ignore else */ + if (!_isUndefined(options.dir)) + _assertIsRelative(options.dir, 'dir', tmpDir); + /* istanbul ignore else */ + if (!_isUndefined(options.template)) { + _assertIsRelative(options.template, 'template', tmpDir); + if (!options.template.match(TEMPLATE_PATTERN)) + throw new Error(`Invalid template, found "${options.template}".`); + } + /* istanbul ignore else */ + if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0) + throw new Error(`Invalid tries, found "${options.tries}".`); + + // if a name was specified we will try once + options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1; + options.keep = !!options.keep; + options.detachDescriptor = !!options.detachDescriptor; + options.discardDescriptor = !!options.discardDescriptor; + options.unsafeCleanup = !!options.unsafeCleanup; + + // sanitize dir, also keep (multiple) blanks if the user, purportedly sane, requests us to + options.dir = _isUndefined(options.dir) ? '' : path.relative(tmpDir, _resolvePath(options.dir, tmpDir)); + options.template = _isUndefined(options.template) ? undefined : path.relative(tmpDir, _resolvePath(options.template, tmpDir)); + // sanitize further if template is relative to options.dir + options.template = _isBlank(options.template) ? undefined : path.relative(options.dir, options.template); + + // for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to + options.name = _isUndefined(options.name) ? undefined : _sanitizeName(options.name); + options.prefix = _isUndefined(options.prefix) ? '' : options.prefix; + options.postfix = _isUndefined(options.postfix) ? '' : options.postfix; +} + +/** + * Resolve the specified path name in respect to tmpDir. + * + * The specified name might include relative path components, e.g. ../ + * so we need to resolve in order to be sure that is is located inside tmpDir + * + * @param name + * @param tmpDir + * @returns {string} + * @private + */ +function _resolvePath(name, tmpDir) { + const sanitizedName = _sanitizeName(name); + if (sanitizedName.startsWith(tmpDir)) { + return path.resolve(sanitizedName); + } else { + return path.resolve(path.join(tmpDir, sanitizedName)); + } +} + +/** + * Sanitize the specified path name by removing all quote characters. + * + * @param name + * @returns {string} + * @private + */ +function _sanitizeName(name) { + if (_isBlank(name)) { + return name; + } + return name.replace(/["']/g, ''); +} + +/** + * Asserts whether specified name is relative to the specified tmpDir. + * + * @param {string} name + * @param {string} option + * @param {string} tmpDir + * @throws {Error} + * @private + */ +function _assertIsRelative(name, option, tmpDir) { + if (option === 'name') { + // assert that name is not absolute and does not contain a path + if (path.isAbsolute(name)) + throw new Error(`${option} option must not contain an absolute path, found "${name}".`); + // must not fail on valid . or .. or similar such constructs + let basename = path.basename(name); + if (basename === '..' || basename === '.' || basename !== name) + throw new Error(`${option} option must not contain a path, found "${name}".`); + } + else { // if (option === 'dir' || option === 'template') { + // assert that dir or template are relative to tmpDir + if (path.isAbsolute(name) && !name.startsWith(tmpDir)) { + throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`); + } + let resolvedPath = _resolvePath(name, tmpDir); + if (!resolvedPath.startsWith(tmpDir)) + throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`); + } +} + +/** + * Helper for testing against EBADF to compensate changes made to Node 7.x under Windows. + * + * @private + */ +function _isEBADF(error) { + return _isExpectedError(error, -EBADF, 'EBADF'); +} + +/** + * Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows. + * + * @private + */ +function _isENOENT(error) { + return _isExpectedError(error, -ENOENT, 'ENOENT'); +} + +/** + * Helper to determine whether the expected error code matches the actual code and errno, + * which will differ between the supported node versions. + * + * - Node >= 7.0: + * error.code {string} + * error.errno {number} any numerical value will be negated + * + * CAVEAT + * + * On windows, the errno for EBADF is -4083 but os.constants.errno.EBADF is different and we must assume that ENOENT + * is no different here. + * + * @param {SystemError} error + * @param {number} errno + * @param {string} code + * @private + */ +function _isExpectedError(error, errno, code) { + return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno; +} + +/** + * Sets the graceful cleanup. + * + * If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the + * temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary + * object removals. + */ +function setGracefulCleanup() { + _gracefulCleanup = true; +} + +/** + * Returns the currently configured tmp dir from os.tmpdir(). + * + * @private + * @param {?Options} options + * @returns {string} the currently configured tmp dir + */ +function _getTmpDir(options) { + return path.resolve(_sanitizeName(options && options.tmpdir || os.tmpdir())); +} + +// Install process exit listener +process.addListener(EXIT, _garbageCollector); + +/** + * Configuration options. + * + * @typedef {Object} Options + * @property {?boolean} keep the temporary object (file or dir) will not be garbage collected + * @property {?number} tries the number of tries before give up the name generation + * @property (?int) mode the access mode, defaults are 0o700 for directories and 0o600 for files + * @property {?string} template the "mkstemp" like filename template + * @property {?string} name fixed name relative to tmpdir or the specified dir option + * @property {?string} dir tmp directory relative to the root tmp directory in use + * @property {?string} prefix prefix for the generated name + * @property {?string} postfix postfix for the generated name + * @property {?string} tmpdir the root tmp directory which overrides the os tmpdir + * @property {?boolean} unsafeCleanup recursively removes the created temporary directory, even when it's not empty + * @property {?boolean} detachDescriptor detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection + * @property {?boolean} discardDescriptor discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection + */ + +/** + * @typedef {Object} FileSyncObject + * @property {string} name the name of the file + * @property {string} fd the file descriptor or -1 if the fd has been discarded + * @property {fileCallback} removeCallback the callback function to remove the file + */ + +/** + * @typedef {Object} DirSyncObject + * @property {string} name the name of the directory + * @property {fileCallback} removeCallback the callback function to remove the directory + */ + +/** + * @callback tmpNameCallback + * @param {?Error} err the error object if anything goes wrong + * @param {string} name the temporary file name + */ + +/** + * @callback fileCallback + * @param {?Error} err the error object if anything goes wrong + * @param {string} name the temporary file name + * @param {number} fd the file descriptor or -1 if the fd had been discarded + * @param {cleanupCallback} fn the cleanup callback function + */ + +/** + * @callback fileCallbackSync + * @param {?Error} err the error object if anything goes wrong + * @param {string} name the temporary file name + * @param {number} fd the file descriptor or -1 if the fd had been discarded + * @param {cleanupCallbackSync} fn the cleanup callback function + */ + +/** + * @callback dirCallback + * @param {?Error} err the error object if anything goes wrong + * @param {string} name the temporary file name + * @param {cleanupCallback} fn the cleanup callback function + */ + +/** + * @callback dirCallbackSync + * @param {?Error} err the error object if anything goes wrong + * @param {string} name the temporary file name + * @param {cleanupCallbackSync} fn the cleanup callback function + */ + +/** + * Removes the temporary created file or directory. + * + * @callback cleanupCallback + * @param {simpleCallback} [next] function to call whenever the tmp object needs to be removed + */ + +/** + * Removes the temporary created file or directory. + * + * @callback cleanupCallbackSync + */ + +/** + * Callback function for function composition. + * @see {@link https://github.com/raszi/node-tmp/issues/57|raszi/node-tmp#57} + * + * @callback simpleCallback + */ + +// exporting all the needed methods + +// evaluate _getTmpDir() lazily, mainly for simplifying testing but it also will +// allow users to reconfigure the temporary directory +Object.defineProperty(module.exports, "tmpdir", ({ + enumerable: true, + configurable: false, + get: function () { + return _getTmpDir(); + } +})); + +module.exports.dir = dir; +module.exports.dirSync = dirSync; + +module.exports.file = file; +module.exports.fileSync = fileSync; + +module.exports.tmpName = tmpName; +module.exports.tmpNameSync = tmpNameSync; + +module.exports.setGracefulCleanup = setGracefulCleanup; + + +/***/ }), + +/***/ 49109: +/***/ ((module) => { + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); + + +/***/ }), + +/***/ 76566: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var net = __nccwpck_require__(41808) + , tls = __nccwpck_require__(24404) + , http = __nccwpck_require__(13685) + , https = __nccwpck_require__(95687) + , events = __nccwpck_require__(82361) + , assert = __nccwpck_require__(39491) + , util = __nccwpck_require__(73837) + , Buffer = (__nccwpck_require__(63215).Buffer) + ; + +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) { + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i] + if (pending.host === host && pending.port === 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, options) { + var self = this + + // Legacy API: addRequest(req, host, port, path) + if (typeof options === 'string') { + options = { + host: options, + port: arguments[2], + path: arguments[3] + }; + } + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push({host: options.host, port: options.port, request: req}) + return + } + + // If we are under maxSockets create a new one. + self.createConnection({host: options.host, port: options.port, request: req}) +} + +TunnelingAgent.prototype.createConnection = function createConnection(pending) { + var self = this + + self.createSocket(pending, function(socket) { + socket.on('free', onFree) + socket.on('close', onCloseOrRemove) + socket.on('agentRemove', onCloseOrRemove) + pending.request.onSocket(socket) + + function onFree() { + self.emit('free', socket, pending.host, pending.port) + } + + 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 + } + ) + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {} + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + Buffer.from(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) { + assert.equal(head.length, 0) + debug('tunneling connection has established') + self.sockets[self.sockets.indexOf(placeholder)] = socket + cb(socket) + } else { + debug('tunneling socket could not be established, statusCode=%d', res.statusCode) + var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } + } + + 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.createConnection(pending) + } +} + +function createSecureSocket(options, cb) { + var self = this + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, mergeOptions({}, self.options, + { servername: options.host + , socket: socket + } + )) + self.sockets[self.sockets.indexOf(socket)] = secureSocket + cb(secureSocket) + }) +} + + +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 + + +/***/ }), + +/***/ 59595: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +(function(nacl) { +'use strict'; + +// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. +// Public domain. +// +// Implementation derived from TweetNaCl version 20140427. +// See for details: http://tweetnacl.cr.yp.to/ + +var gf = function(init) { + var i, r = new Float64Array(16); + if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; + return r; +}; + +// Pluggable, initialized in high-level API below. +var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; + +var _0 = new Uint8Array(16); +var _9 = new Uint8Array(32); _9[0] = 9; + +var gf0 = gf(), + gf1 = gf([1]), + _121665 = gf([0xdb41, 1]), + D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), + D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), + X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), + Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), + I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); + +function ts64(x, i, h, l) { + x[i] = (h >> 24) & 0xff; + x[i+1] = (h >> 16) & 0xff; + x[i+2] = (h >> 8) & 0xff; + x[i+3] = h & 0xff; + x[i+4] = (l >> 24) & 0xff; + x[i+5] = (l >> 16) & 0xff; + x[i+6] = (l >> 8) & 0xff; + x[i+7] = l & 0xff; +} + +function vn(x, xi, y, yi, n) { + var i,d = 0; + for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; + return (1 & ((d - 1) >>> 8)) - 1; +} + +function crypto_verify_16(x, xi, y, yi) { + return vn(x,xi,y,yi,16); +} + +function crypto_verify_32(x, xi, y, yi) { + return vn(x,xi,y,yi,32); +} + +function core_salsa20(o, p, k, c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + x0 = x0 + j0 | 0; + x1 = x1 + j1 | 0; + x2 = x2 + j2 | 0; + x3 = x3 + j3 | 0; + x4 = x4 + j4 | 0; + x5 = x5 + j5 | 0; + x6 = x6 + j6 | 0; + x7 = x7 + j7 | 0; + x8 = x8 + j8 | 0; + x9 = x9 + j9 | 0; + x10 = x10 + j10 | 0; + x11 = x11 + j11 | 0; + x12 = x12 + j12 | 0; + x13 = x13 + j13 | 0; + x14 = x14 + j14 | 0; + x15 = x15 + j15 | 0; + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x1 >>> 0 & 0xff; + o[ 5] = x1 >>> 8 & 0xff; + o[ 6] = x1 >>> 16 & 0xff; + o[ 7] = x1 >>> 24 & 0xff; + + o[ 8] = x2 >>> 0 & 0xff; + o[ 9] = x2 >>> 8 & 0xff; + o[10] = x2 >>> 16 & 0xff; + o[11] = x2 >>> 24 & 0xff; + + o[12] = x3 >>> 0 & 0xff; + o[13] = x3 >>> 8 & 0xff; + o[14] = x3 >>> 16 & 0xff; + o[15] = x3 >>> 24 & 0xff; + + o[16] = x4 >>> 0 & 0xff; + o[17] = x4 >>> 8 & 0xff; + o[18] = x4 >>> 16 & 0xff; + o[19] = x4 >>> 24 & 0xff; + + o[20] = x5 >>> 0 & 0xff; + o[21] = x5 >>> 8 & 0xff; + o[22] = x5 >>> 16 & 0xff; + o[23] = x5 >>> 24 & 0xff; + + o[24] = x6 >>> 0 & 0xff; + o[25] = x6 >>> 8 & 0xff; + o[26] = x6 >>> 16 & 0xff; + o[27] = x6 >>> 24 & 0xff; + + o[28] = x7 >>> 0 & 0xff; + o[29] = x7 >>> 8 & 0xff; + o[30] = x7 >>> 16 & 0xff; + o[31] = x7 >>> 24 & 0xff; + + o[32] = x8 >>> 0 & 0xff; + o[33] = x8 >>> 8 & 0xff; + o[34] = x8 >>> 16 & 0xff; + o[35] = x8 >>> 24 & 0xff; + + o[36] = x9 >>> 0 & 0xff; + o[37] = x9 >>> 8 & 0xff; + o[38] = x9 >>> 16 & 0xff; + o[39] = x9 >>> 24 & 0xff; + + o[40] = x10 >>> 0 & 0xff; + o[41] = x10 >>> 8 & 0xff; + o[42] = x10 >>> 16 & 0xff; + o[43] = x10 >>> 24 & 0xff; + + o[44] = x11 >>> 0 & 0xff; + o[45] = x11 >>> 8 & 0xff; + o[46] = x11 >>> 16 & 0xff; + o[47] = x11 >>> 24 & 0xff; + + o[48] = x12 >>> 0 & 0xff; + o[49] = x12 >>> 8 & 0xff; + o[50] = x12 >>> 16 & 0xff; + o[51] = x12 >>> 24 & 0xff; + + o[52] = x13 >>> 0 & 0xff; + o[53] = x13 >>> 8 & 0xff; + o[54] = x13 >>> 16 & 0xff; + o[55] = x13 >>> 24 & 0xff; + + o[56] = x14 >>> 0 & 0xff; + o[57] = x14 >>> 8 & 0xff; + o[58] = x14 >>> 16 & 0xff; + o[59] = x14 >>> 24 & 0xff; + + o[60] = x15 >>> 0 & 0xff; + o[61] = x15 >>> 8 & 0xff; + o[62] = x15 >>> 16 & 0xff; + o[63] = x15 >>> 24 & 0xff; +} + +function core_hsalsa20(o,p,k,c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x5 >>> 0 & 0xff; + o[ 5] = x5 >>> 8 & 0xff; + o[ 6] = x5 >>> 16 & 0xff; + o[ 7] = x5 >>> 24 & 0xff; + + o[ 8] = x10 >>> 0 & 0xff; + o[ 9] = x10 >>> 8 & 0xff; + o[10] = x10 >>> 16 & 0xff; + o[11] = x10 >>> 24 & 0xff; + + o[12] = x15 >>> 0 & 0xff; + o[13] = x15 >>> 8 & 0xff; + o[14] = x15 >>> 16 & 0xff; + o[15] = x15 >>> 24 & 0xff; + + o[16] = x6 >>> 0 & 0xff; + o[17] = x6 >>> 8 & 0xff; + o[18] = x6 >>> 16 & 0xff; + o[19] = x6 >>> 24 & 0xff; + + o[20] = x7 >>> 0 & 0xff; + o[21] = x7 >>> 8 & 0xff; + o[22] = x7 >>> 16 & 0xff; + o[23] = x7 >>> 24 & 0xff; + + o[24] = x8 >>> 0 & 0xff; + o[25] = x8 >>> 8 & 0xff; + o[26] = x8 >>> 16 & 0xff; + o[27] = x8 >>> 24 & 0xff; + + o[28] = x9 >>> 0 & 0xff; + o[29] = x9 >>> 8 & 0xff; + o[30] = x9 >>> 16 & 0xff; + o[31] = x9 >>> 24 & 0xff; +} + +function crypto_core_salsa20(out,inp,k,c) { + core_salsa20(out,inp,k,c); +} + +function crypto_core_hsalsa20(out,inp,k,c) { + core_hsalsa20(out,inp,k,c); +} + +var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + // "expand 32-byte k" + +function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + } + return 0; +} + +function crypto_stream_salsa20(c,cpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = x[i]; + } + return 0; +} + +function crypto_stream(c,cpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20(c,cpos,d,sn,s); +} + +function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); +} + +/* +* Port of Andrew Moon's Poly1305-donna-16. Public domain. +* https://github.com/floodyberry/poly1305-donna +*/ + +var poly1305 = function(key) { + this.buffer = new Uint8Array(16); + this.r = new Uint16Array(10); + this.h = new Uint16Array(10); + this.pad = new Uint16Array(8); + this.leftover = 0; + this.fin = 0; + + var t0, t1, t2, t3, t4, t5, t6, t7; + + t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; + t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; + t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; + this.r[5] = ((t4 >>> 1)) & 0x1ffe; + t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; + t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + this.r[9] = ((t7 >>> 5)) & 0x007f; + + this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; + this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; + this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; + this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; + this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; + this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; + this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; + this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; +}; + +poly1305.prototype.blocks = function(m, mpos, bytes) { + var hibit = this.fin ? 0 : (1 << 11); + var t0, t1, t2, t3, t4, t5, t6, t7, c; + var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; + + var h0 = this.h[0], + h1 = this.h[1], + h2 = this.h[2], + h3 = this.h[3], + h4 = this.h[4], + h5 = this.h[5], + h6 = this.h[6], + h7 = this.h[7], + h8 = this.h[8], + h9 = this.h[9]; + + var r0 = this.r[0], + r1 = this.r[1], + r2 = this.r[2], + r3 = this.r[3], + r4 = this.r[4], + r5 = this.r[5], + r6 = this.r[6], + r7 = this.r[7], + r8 = this.r[8], + r9 = this.r[9]; + + while (bytes >= 16) { + t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; + t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; + t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; + h5 += ((t4 >>> 1)) & 0x1fff; + t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; + t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + h9 += ((t7 >>> 5)) | hibit; + + c = 0; + + d0 = c; + d0 += h0 * r0; + d0 += h1 * (5 * r9); + d0 += h2 * (5 * r8); + d0 += h3 * (5 * r7); + d0 += h4 * (5 * r6); + c = (d0 >>> 13); d0 &= 0x1fff; + d0 += h5 * (5 * r5); + d0 += h6 * (5 * r4); + d0 += h7 * (5 * r3); + d0 += h8 * (5 * r2); + d0 += h9 * (5 * r1); + c += (d0 >>> 13); d0 &= 0x1fff; + + d1 = c; + d1 += h0 * r1; + d1 += h1 * r0; + d1 += h2 * (5 * r9); + d1 += h3 * (5 * r8); + d1 += h4 * (5 * r7); + c = (d1 >>> 13); d1 &= 0x1fff; + d1 += h5 * (5 * r6); + d1 += h6 * (5 * r5); + d1 += h7 * (5 * r4); + d1 += h8 * (5 * r3); + d1 += h9 * (5 * r2); + c += (d1 >>> 13); d1 &= 0x1fff; + + d2 = c; + d2 += h0 * r2; + d2 += h1 * r1; + d2 += h2 * r0; + d2 += h3 * (5 * r9); + d2 += h4 * (5 * r8); + c = (d2 >>> 13); d2 &= 0x1fff; + d2 += h5 * (5 * r7); + d2 += h6 * (5 * r6); + d2 += h7 * (5 * r5); + d2 += h8 * (5 * r4); + d2 += h9 * (5 * r3); + c += (d2 >>> 13); d2 &= 0x1fff; + + d3 = c; + d3 += h0 * r3; + d3 += h1 * r2; + d3 += h2 * r1; + d3 += h3 * r0; + d3 += h4 * (5 * r9); + c = (d3 >>> 13); d3 &= 0x1fff; + d3 += h5 * (5 * r8); + d3 += h6 * (5 * r7); + d3 += h7 * (5 * r6); + d3 += h8 * (5 * r5); + d3 += h9 * (5 * r4); + c += (d3 >>> 13); d3 &= 0x1fff; + + d4 = c; + d4 += h0 * r4; + d4 += h1 * r3; + d4 += h2 * r2; + d4 += h3 * r1; + d4 += h4 * r0; + c = (d4 >>> 13); d4 &= 0x1fff; + d4 += h5 * (5 * r9); + d4 += h6 * (5 * r8); + d4 += h7 * (5 * r7); + d4 += h8 * (5 * r6); + d4 += h9 * (5 * r5); + c += (d4 >>> 13); d4 &= 0x1fff; + + d5 = c; + d5 += h0 * r5; + d5 += h1 * r4; + d5 += h2 * r3; + d5 += h3 * r2; + d5 += h4 * r1; + c = (d5 >>> 13); d5 &= 0x1fff; + d5 += h5 * r0; + d5 += h6 * (5 * r9); + d5 += h7 * (5 * r8); + d5 += h8 * (5 * r7); + d5 += h9 * (5 * r6); + c += (d5 >>> 13); d5 &= 0x1fff; + + d6 = c; + d6 += h0 * r6; + d6 += h1 * r5; + d6 += h2 * r4; + d6 += h3 * r3; + d6 += h4 * r2; + c = (d6 >>> 13); d6 &= 0x1fff; + d6 += h5 * r1; + d6 += h6 * r0; + d6 += h7 * (5 * r9); + d6 += h8 * (5 * r8); + d6 += h9 * (5 * r7); + c += (d6 >>> 13); d6 &= 0x1fff; + + d7 = c; + d7 += h0 * r7; + d7 += h1 * r6; + d7 += h2 * r5; + d7 += h3 * r4; + d7 += h4 * r3; + c = (d7 >>> 13); d7 &= 0x1fff; + d7 += h5 * r2; + d7 += h6 * r1; + d7 += h7 * r0; + d7 += h8 * (5 * r9); + d7 += h9 * (5 * r8); + c += (d7 >>> 13); d7 &= 0x1fff; + + d8 = c; + d8 += h0 * r8; + d8 += h1 * r7; + d8 += h2 * r6; + d8 += h3 * r5; + d8 += h4 * r4; + c = (d8 >>> 13); d8 &= 0x1fff; + d8 += h5 * r3; + d8 += h6 * r2; + d8 += h7 * r1; + d8 += h8 * r0; + d8 += h9 * (5 * r9); + c += (d8 >>> 13); d8 &= 0x1fff; + + d9 = c; + d9 += h0 * r9; + d9 += h1 * r8; + d9 += h2 * r7; + d9 += h3 * r6; + d9 += h4 * r5; + c = (d9 >>> 13); d9 &= 0x1fff; + d9 += h5 * r4; + d9 += h6 * r3; + d9 += h7 * r2; + d9 += h8 * r1; + d9 += h9 * r0; + c += (d9 >>> 13); d9 &= 0x1fff; + + c = (((c << 2) + c)) | 0; + c = (c + d0) | 0; + d0 = c & 0x1fff; + c = (c >>> 13); + d1 += c; + + h0 = d0; + h1 = d1; + h2 = d2; + h3 = d3; + h4 = d4; + h5 = d5; + h6 = d6; + h7 = d7; + h8 = d8; + h9 = d9; + + mpos += 16; + bytes -= 16; + } + this.h[0] = h0; + this.h[1] = h1; + this.h[2] = h2; + this.h[3] = h3; + this.h[4] = h4; + this.h[5] = h5; + this.h[6] = h6; + this.h[7] = h7; + this.h[8] = h8; + this.h[9] = h9; +}; + +poly1305.prototype.finish = function(mac, macpos) { + var g = new Uint16Array(10); + var c, mask, f, i; + + if (this.leftover) { + i = this.leftover; + this.buffer[i++] = 1; + for (; i < 16; i++) this.buffer[i] = 0; + this.fin = 1; + this.blocks(this.buffer, 0, 16); + } + + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + for (i = 2; i < 10; i++) { + this.h[i] += c; + c = this.h[i] >>> 13; + this.h[i] &= 0x1fff; + } + this.h[0] += (c * 5); + c = this.h[0] >>> 13; + this.h[0] &= 0x1fff; + this.h[1] += c; + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + this.h[2] += c; + + g[0] = this.h[0] + 5; + c = g[0] >>> 13; + g[0] &= 0x1fff; + for (i = 1; i < 10; i++) { + g[i] = this.h[i] + c; + c = g[i] >>> 13; + g[i] &= 0x1fff; + } + g[9] -= (1 << 13); + + mask = (c ^ 1) - 1; + for (i = 0; i < 10; i++) g[i] &= mask; + mask = ~mask; + for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; + + this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; + this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; + this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; + this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; + this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; + this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; + this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; + this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; + + f = this.h[0] + this.pad[0]; + this.h[0] = f & 0xffff; + for (i = 1; i < 8; i++) { + f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; + this.h[i] = f & 0xffff; + } + + mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; + mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; + mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; + mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; + mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; + mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; + mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; + mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; + mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; + mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; + mac[macpos+10] = (this.h[5] >>> 0) & 0xff; + mac[macpos+11] = (this.h[5] >>> 8) & 0xff; + mac[macpos+12] = (this.h[6] >>> 0) & 0xff; + mac[macpos+13] = (this.h[6] >>> 8) & 0xff; + mac[macpos+14] = (this.h[7] >>> 0) & 0xff; + mac[macpos+15] = (this.h[7] >>> 8) & 0xff; +}; + +poly1305.prototype.update = function(m, mpos, bytes) { + var i, want; + + if (this.leftover) { + want = (16 - this.leftover); + if (want > bytes) + want = bytes; + for (i = 0; i < want; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + bytes -= want; + mpos += want; + this.leftover += want; + if (this.leftover < 16) + return; + this.blocks(this.buffer, 0, 16); + this.leftover = 0; + } + + if (bytes >= 16) { + want = bytes - (bytes % 16); + this.blocks(m, mpos, want); + mpos += want; + bytes -= want; + } + + if (bytes) { + for (i = 0; i < bytes; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + this.leftover += bytes; + } +}; + +function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s = new poly1305(k); + s.update(m, mpos, n); + s.finish(out, outpos); + return 0; +} + +function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x,0,m,mpos,n,k); + return crypto_verify_16(h,hpos,x,0); +} + +function crypto_secretbox(c,m,d,n,k) { + var i; + if (d < 32) return -1; + crypto_stream_xor(c,0,m,0,d,n,k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i = 0; i < 16; i++) c[i] = 0; + return 0; +} + +function crypto_secretbox_open(m,c,d,n,k) { + var i; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x,0,32,n,k); + if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; + crypto_stream_xor(m,0,c,0,d,n,k); + for (i = 0; i < 32; i++) m[i] = 0; + return 0; +} + +function set25519(r, a) { + var i; + for (i = 0; i < 16; i++) r[i] = a[i]|0; +} + +function car25519(o) { + var i, v, c = 1; + for (i = 0; i < 16; i++) { + v = o[i] + c + 65535; + c = Math.floor(v / 65536); + o[i] = v - c * 65536; + } + o[0] += c-1 + 37 * (c-1); +} + +function sel25519(p, q, b) { + var t, c = ~(b-1); + for (var i = 0; i < 16; i++) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} + +function pack25519(o, n) { + var i, j, b; + var m = gf(), t = gf(); + for (i = 0; i < 16; i++) t[i] = n[i]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; i++) { + m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); + m[i-1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); + b = (m[15]>>16) & 1; + m[14] &= 0xffff; + sel25519(t, m, 1-b); + } + for (i = 0; i < 16; i++) { + o[2*i] = t[i] & 0xff; + o[2*i+1] = t[i]>>8; + } +} + +function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); +} + +function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; +} + +function unpack25519(o, n) { + var i; + for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); + o[15] &= 0x7fff; +} + +function A(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; +} + +function Z(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; +} + +function M(o, a, b) { + var v, c, + t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, + t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, + t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, + t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, + b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7], + b8 = b[8], + b9 = b[9], + b10 = b[10], + b11 = b[11], + b12 = b[12], + b13 = b[13], + b14 = b[14], + b15 = b[15]; + + v = a[0]; + t0 += v * b0; + t1 += v * b1; + t2 += v * b2; + t3 += v * b3; + t4 += v * b4; + t5 += v * b5; + t6 += v * b6; + t7 += v * b7; + t8 += v * b8; + t9 += v * b9; + t10 += v * b10; + t11 += v * b11; + t12 += v * b12; + t13 += v * b13; + t14 += v * b14; + t15 += v * b15; + v = a[1]; + t1 += v * b0; + t2 += v * b1; + t3 += v * b2; + t4 += v * b3; + t5 += v * b4; + t6 += v * b5; + t7 += v * b6; + t8 += v * b7; + t9 += v * b8; + t10 += v * b9; + t11 += v * b10; + t12 += v * b11; + t13 += v * b12; + t14 += v * b13; + t15 += v * b14; + t16 += v * b15; + v = a[2]; + t2 += v * b0; + t3 += v * b1; + t4 += v * b2; + t5 += v * b3; + t6 += v * b4; + t7 += v * b5; + t8 += v * b6; + t9 += v * b7; + t10 += v * b8; + t11 += v * b9; + t12 += v * b10; + t13 += v * b11; + t14 += v * b12; + t15 += v * b13; + t16 += v * b14; + t17 += v * b15; + v = a[3]; + t3 += v * b0; + t4 += v * b1; + t5 += v * b2; + t6 += v * b3; + t7 += v * b4; + t8 += v * b5; + t9 += v * b6; + t10 += v * b7; + t11 += v * b8; + t12 += v * b9; + t13 += v * b10; + t14 += v * b11; + t15 += v * b12; + t16 += v * b13; + t17 += v * b14; + t18 += v * b15; + v = a[4]; + t4 += v * b0; + t5 += v * b1; + t6 += v * b2; + t7 += v * b3; + t8 += v * b4; + t9 += v * b5; + t10 += v * b6; + t11 += v * b7; + t12 += v * b8; + t13 += v * b9; + t14 += v * b10; + t15 += v * b11; + t16 += v * b12; + t17 += v * b13; + t18 += v * b14; + t19 += v * b15; + v = a[5]; + t5 += v * b0; + t6 += v * b1; + t7 += v * b2; + t8 += v * b3; + t9 += v * b4; + t10 += v * b5; + t11 += v * b6; + t12 += v * b7; + t13 += v * b8; + t14 += v * b9; + t15 += v * b10; + t16 += v * b11; + t17 += v * b12; + t18 += v * b13; + t19 += v * b14; + t20 += v * b15; + v = a[6]; + t6 += v * b0; + t7 += v * b1; + t8 += v * b2; + t9 += v * b3; + t10 += v * b4; + t11 += v * b5; + t12 += v * b6; + t13 += v * b7; + t14 += v * b8; + t15 += v * b9; + t16 += v * b10; + t17 += v * b11; + t18 += v * b12; + t19 += v * b13; + t20 += v * b14; + t21 += v * b15; + v = a[7]; + t7 += v * b0; + t8 += v * b1; + t9 += v * b2; + t10 += v * b3; + t11 += v * b4; + t12 += v * b5; + t13 += v * b6; + t14 += v * b7; + t15 += v * b8; + t16 += v * b9; + t17 += v * b10; + t18 += v * b11; + t19 += v * b12; + t20 += v * b13; + t21 += v * b14; + t22 += v * b15; + v = a[8]; + t8 += v * b0; + t9 += v * b1; + t10 += v * b2; + t11 += v * b3; + t12 += v * b4; + t13 += v * b5; + t14 += v * b6; + t15 += v * b7; + t16 += v * b8; + t17 += v * b9; + t18 += v * b10; + t19 += v * b11; + t20 += v * b12; + t21 += v * b13; + t22 += v * b14; + t23 += v * b15; + v = a[9]; + t9 += v * b0; + t10 += v * b1; + t11 += v * b2; + t12 += v * b3; + t13 += v * b4; + t14 += v * b5; + t15 += v * b6; + t16 += v * b7; + t17 += v * b8; + t18 += v * b9; + t19 += v * b10; + t20 += v * b11; + t21 += v * b12; + t22 += v * b13; + t23 += v * b14; + t24 += v * b15; + v = a[10]; + t10 += v * b0; + t11 += v * b1; + t12 += v * b2; + t13 += v * b3; + t14 += v * b4; + t15 += v * b5; + t16 += v * b6; + t17 += v * b7; + t18 += v * b8; + t19 += v * b9; + t20 += v * b10; + t21 += v * b11; + t22 += v * b12; + t23 += v * b13; + t24 += v * b14; + t25 += v * b15; + v = a[11]; + t11 += v * b0; + t12 += v * b1; + t13 += v * b2; + t14 += v * b3; + t15 += v * b4; + t16 += v * b5; + t17 += v * b6; + t18 += v * b7; + t19 += v * b8; + t20 += v * b9; + t21 += v * b10; + t22 += v * b11; + t23 += v * b12; + t24 += v * b13; + t25 += v * b14; + t26 += v * b15; + v = a[12]; + t12 += v * b0; + t13 += v * b1; + t14 += v * b2; + t15 += v * b3; + t16 += v * b4; + t17 += v * b5; + t18 += v * b6; + t19 += v * b7; + t20 += v * b8; + t21 += v * b9; + t22 += v * b10; + t23 += v * b11; + t24 += v * b12; + t25 += v * b13; + t26 += v * b14; + t27 += v * b15; + v = a[13]; + t13 += v * b0; + t14 += v * b1; + t15 += v * b2; + t16 += v * b3; + t17 += v * b4; + t18 += v * b5; + t19 += v * b6; + t20 += v * b7; + t21 += v * b8; + t22 += v * b9; + t23 += v * b10; + t24 += v * b11; + t25 += v * b12; + t26 += v * b13; + t27 += v * b14; + t28 += v * b15; + v = a[14]; + t14 += v * b0; + t15 += v * b1; + t16 += v * b2; + t17 += v * b3; + t18 += v * b4; + t19 += v * b5; + t20 += v * b6; + t21 += v * b7; + t22 += v * b8; + t23 += v * b9; + t24 += v * b10; + t25 += v * b11; + t26 += v * b12; + t27 += v * b13; + t28 += v * b14; + t29 += v * b15; + v = a[15]; + t15 += v * b0; + t16 += v * b1; + t17 += v * b2; + t18 += v * b3; + t19 += v * b4; + t20 += v * b5; + t21 += v * b6; + t22 += v * b7; + t23 += v * b8; + t24 += v * b9; + t25 += v * b10; + t26 += v * b11; + t27 += v * b12; + t28 += v * b13; + t29 += v * b14; + t30 += v * b15; + + t0 += 38 * t16; + t1 += 38 * t17; + t2 += 38 * t18; + t3 += 38 * t19; + t4 += 38 * t20; + t5 += 38 * t21; + t6 += 38 * t22; + t7 += 38 * t23; + t8 += 38 * t24; + t9 += 38 * t25; + t10 += 38 * t26; + t11 += 38 * t27; + t12 += 38 * t28; + t13 += 38 * t29; + t14 += 38 * t30; + // t15 left as is + + // first car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + // second car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + o[ 0] = t0; + o[ 1] = t1; + o[ 2] = t2; + o[ 3] = t3; + o[ 4] = t4; + o[ 5] = t5; + o[ 6] = t6; + o[ 7] = t7; + o[ 8] = t8; + o[ 9] = t9; + o[10] = t10; + o[11] = t11; + o[12] = t12; + o[13] = t13; + o[14] = t14; + o[15] = t15; +} + +function S(o, a) { + M(o, a, a); +} + +function inv25519(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if(a !== 2 && a !== 4) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function pow2523(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if(a !== 1) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function crypto_scalarmult(q, n, p) { + var z = new Uint8Array(32); + var x = new Float64Array(80), r, i; + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(); + for (i = 0; i < 31; i++) z[i] = n[i]; + z[31]=(n[31]&127)|64; + z[0]&=248; + unpack25519(x,p); + for (i = 0; i < 16; i++) { + b[i]=x[i]; + d[i]=a[i]=c[i]=0; + } + a[0]=d[0]=1; + for (i=254; i>=0; --i) { + r=(z[i>>>3]>>>(i&7))&1; + sel25519(a,b,r); + sel25519(c,d,r); + A(e,a,c); + Z(a,a,c); + A(c,b,d); + Z(b,b,d); + S(d,e); + S(f,a); + M(a,c,a); + M(c,b,e); + A(e,a,c); + Z(a,a,c); + S(b,a); + Z(c,d,f); + M(a,c,_121665); + A(a,a,d); + M(c,c,a); + M(a,d,f); + M(d,b,x); + S(b,e); + sel25519(a,b,r); + sel25519(c,d,r); + } + for (i = 0; i < 16; i++) { + x[i+16]=a[i]; + x[i+32]=c[i]; + x[i+48]=b[i]; + x[i+64]=d[i]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32,x32); + M(x16,x16,x32); + pack25519(q,x16); + return 0; +} + +function crypto_scalarmult_base(q, n) { + return crypto_scalarmult(q, n, _9); +} + +function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); +} + +function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); +} + +var crypto_box_afternm = crypto_secretbox; +var crypto_box_open_afternm = crypto_secretbox_open; + +function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); +} + +function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); +} + +var K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +]; + +function crypto_hashblocks_hl(hh, hl, m, n) { + var wh = new Int32Array(16), wl = new Int32Array(16), + bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, + bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, + th, tl, i, j, h, l, a, b, c, d; + + var ah0 = hh[0], + ah1 = hh[1], + ah2 = hh[2], + ah3 = hh[3], + ah4 = hh[4], + ah5 = hh[5], + ah6 = hh[6], + ah7 = hh[7], + + al0 = hl[0], + al1 = hl[1], + al2 = hl[2], + al3 = hl[3], + al4 = hl[4], + al5 = hl[5], + al6 = hl[6], + al7 = hl[7]; + + var pos = 0; + while (n >= 128) { + for (i = 0; i < 16; i++) { + j = 8 * i + pos; + wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; + wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; + } + for (i = 0; i < 80; i++) { + bh0 = ah0; + bh1 = ah1; + bh2 = ah2; + bh3 = ah3; + bh4 = ah4; + bh5 = ah5; + bh6 = ah6; + bh7 = ah7; + + bl0 = al0; + bl1 = al1; + bl2 = al2; + bl3 = al3; + bl4 = al4; + bl5 = al5; + bl6 = al6; + bl7 = al7; + + // add + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma1 + h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); + l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Ch + h = (ah4 & ah5) ^ (~ah4 & ah6); + l = (al4 & al5) ^ (~al4 & al6); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // K + h = K[i*2]; + l = K[i*2+1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // w + h = wh[i%16]; + l = wl[i%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + th = c & 0xffff | d << 16; + tl = a & 0xffff | b << 16; + + // add + h = th; + l = tl; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma0 + h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); + l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Maj + h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); + l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh7 = (c & 0xffff) | (d << 16); + bl7 = (a & 0xffff) | (b << 16); + + // add + h = bh3; + l = bl3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = th; + l = tl; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh3 = (c & 0xffff) | (d << 16); + bl3 = (a & 0xffff) | (b << 16); + + ah1 = bh0; + ah2 = bh1; + ah3 = bh2; + ah4 = bh3; + ah5 = bh4; + ah6 = bh5; + ah7 = bh6; + ah0 = bh7; + + al1 = bl0; + al2 = bl1; + al3 = bl2; + al4 = bl3; + al5 = bl4; + al6 = bl5; + al7 = bl6; + al0 = bl7; + + if (i%16 === 15) { + for (j = 0; j < 16; j++) { + // add + h = wh[j]; + l = wl[j]; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = wh[(j+9)%16]; + l = wl[(j+9)%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma0 + th = wh[(j+1)%16]; + tl = wl[(j+1)%16]; + h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); + l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma1 + th = wh[(j+14)%16]; + tl = wl[(j+14)%16]; + h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); + l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + wh[j] = (c & 0xffff) | (d << 16); + wl[j] = (a & 0xffff) | (b << 16); + } + } + } + + // add + h = ah0; + l = al0; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[0]; + l = hl[0]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[0] = ah0 = (c & 0xffff) | (d << 16); + hl[0] = al0 = (a & 0xffff) | (b << 16); + + h = ah1; + l = al1; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[1]; + l = hl[1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[1] = ah1 = (c & 0xffff) | (d << 16); + hl[1] = al1 = (a & 0xffff) | (b << 16); + + h = ah2; + l = al2; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[2]; + l = hl[2]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[2] = ah2 = (c & 0xffff) | (d << 16); + hl[2] = al2 = (a & 0xffff) | (b << 16); + + h = ah3; + l = al3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[3]; + l = hl[3]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[3] = ah3 = (c & 0xffff) | (d << 16); + hl[3] = al3 = (a & 0xffff) | (b << 16); + + h = ah4; + l = al4; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[4]; + l = hl[4]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[4] = ah4 = (c & 0xffff) | (d << 16); + hl[4] = al4 = (a & 0xffff) | (b << 16); + + h = ah5; + l = al5; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[5]; + l = hl[5]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[5] = ah5 = (c & 0xffff) | (d << 16); + hl[5] = al5 = (a & 0xffff) | (b << 16); + + h = ah6; + l = al6; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[6]; + l = hl[6]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[6] = ah6 = (c & 0xffff) | (d << 16); + hl[6] = al6 = (a & 0xffff) | (b << 16); + + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[7]; + l = hl[7]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[7] = ah7 = (c & 0xffff) | (d << 16); + hl[7] = al7 = (a & 0xffff) | (b << 16); + + pos += 128; + n -= 128; + } + + return n; +} + +function crypto_hash(out, m, n) { + var hh = new Int32Array(8), + hl = new Int32Array(8), + x = new Uint8Array(256), + i, b = n; + + hh[0] = 0x6a09e667; + hh[1] = 0xbb67ae85; + hh[2] = 0x3c6ef372; + hh[3] = 0xa54ff53a; + hh[4] = 0x510e527f; + hh[5] = 0x9b05688c; + hh[6] = 0x1f83d9ab; + hh[7] = 0x5be0cd19; + + hl[0] = 0xf3bcc908; + hl[1] = 0x84caa73b; + hl[2] = 0xfe94f82b; + hl[3] = 0x5f1d36f1; + hl[4] = 0xade682d1; + hl[5] = 0x2b3e6c1f; + hl[6] = 0xfb41bd6b; + hl[7] = 0x137e2179; + + crypto_hashblocks_hl(hh, hl, m, n); + n %= 128; + + for (i = 0; i < n; i++) x[i] = m[b-n+i]; + x[n] = 128; + + n = 256-128*(n<112?1:0); + x[n-9] = 0; + ts64(x, n-8, (b / 0x20000000) | 0, b << 3); + crypto_hashblocks_hl(hh, hl, x, n); + + for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); + + return 0; +} + +function add(p, q) { + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(), + g = gf(), h = gf(), t = gf(); + + Z(a, p[1], p[0]); + Z(t, q[1], q[0]); + M(a, a, t); + A(b, p[0], p[1]); + A(t, q[0], q[1]); + M(b, b, t); + M(c, p[3], q[3]); + M(c, c, D2); + M(d, p[2], q[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + + M(p[0], e, f); + M(p[1], h, g); + M(p[2], g, f); + M(p[3], e, h); +} + +function cswap(p, q, b) { + var i; + for (i = 0; i < 4; i++) { + sel25519(p[i], q[i], b); + } +} + +function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M(tx, p[0], zi); + M(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; +} + +function scalarmult(p, q, s) { + var b, i; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i = 255; i >= 0; --i) { + b = (s[(i/8)|0] >> (i&7)) & 1; + cswap(p, q, b); + add(q, p); + add(p, p); + cswap(p, q, b); + } +} + +function scalarbase(p, s) { + var q = [gf(), gf(), gf(), gf()]; + set25519(q[0], X); + set25519(q[1], Y); + set25519(q[2], gf1); + M(q[3], X, Y); + scalarmult(p, q, s); +} + +function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i; + + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + scalarbase(p, d); + pack(pk, p); + + for (i = 0; i < 32; i++) sk[i+32] = pk[i]; + return 0; +} + +var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); + +function modL(r, x) { + var carry, i, j, k; + for (i = 63; i >= 32; --i) { + carry = 0; + for (j = i - 32, k = i - 12; j < k; ++j) { + x[j] += carry - 16 * x[i] * L[j - (i - 32)]; + carry = (x[j] + 128) >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i = 0; i < 32; i++) { + x[i+1] += x[i] >> 8; + r[i] = x[i] & 255; + } +} + +function reduce(r) { + var x = new Float64Array(64), i; + for (i = 0; i < 64; i++) x[i] = r[i]; + for (i = 0; i < 64; i++) r[i] = 0; + modL(r, x); +} + +// Note: difference from C - smlen returned, not passed as argument. +function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + var smlen = n + 64; + for (i = 0; i < n; i++) sm[64 + i] = m[i]; + for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; + + crypto_hash(r, sm.subarray(32), n+32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + + for (i = 32; i < 64; i++) sm[i] = sk[i]; + crypto_hash(h, sm, n + 64); + reduce(h); + + for (i = 0; i < 64; i++) x[i] = 0; + for (i = 0; i < 32; i++) x[i] = r[i]; + for (i = 0; i < 32; i++) { + for (j = 0; j < 32; j++) { + x[i+j] += h[i] * d[j]; + } + } + + modL(sm.subarray(32), x); + return smlen; +} + +function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), + den = gf(), den2 = gf(), den4 = gf(), + den6 = gf(); + + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + + S(den2, den); + S(den4, den2); + M(den6, den4, den2); + M(t, den6, num); + M(t, t, den); + + pow2523(t, t); + M(t, t, num); + M(t, t, den); + M(t, t, den); + M(r[0], t, den); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) M(r[0], r[0], I); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) return -1; + + if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); + + M(r[3], r[0], r[1]); + return 0; +} + +function crypto_sign_open(m, sm, n, pk) { + var i, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], + q = [gf(), gf(), gf(), gf()]; + + mlen = -1; + if (n < 64) return -1; + + if (unpackneg(q, pk)) return -1; + + for (i = 0; i < n; i++) m[i] = sm[i]; + for (i = 0; i < 32; i++) m[i+32] = pk[i]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q, h); + + scalarbase(q, sm.subarray(32)); + add(p, q); + pack(t, p); + + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i = 0; i < n; i++) m[i] = 0; + return -1; + } + + for (i = 0; i < n; i++) m[i] = sm[i + 64]; + mlen = n; + return mlen; +} + +var crypto_secretbox_KEYBYTES = 32, + crypto_secretbox_NONCEBYTES = 24, + crypto_secretbox_ZEROBYTES = 32, + crypto_secretbox_BOXZEROBYTES = 16, + crypto_scalarmult_BYTES = 32, + crypto_scalarmult_SCALARBYTES = 32, + crypto_box_PUBLICKEYBYTES = 32, + crypto_box_SECRETKEYBYTES = 32, + crypto_box_BEFORENMBYTES = 32, + crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, + crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, + crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, + crypto_sign_BYTES = 64, + crypto_sign_PUBLICKEYBYTES = 32, + crypto_sign_SECRETKEYBYTES = 64, + crypto_sign_SEEDBYTES = 32, + crypto_hash_BYTES = 64; + +nacl.lowlevel = { + crypto_core_hsalsa20: crypto_core_hsalsa20, + crypto_stream_xor: crypto_stream_xor, + crypto_stream: crypto_stream, + crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, + crypto_stream_salsa20: crypto_stream_salsa20, + crypto_onetimeauth: crypto_onetimeauth, + crypto_onetimeauth_verify: crypto_onetimeauth_verify, + crypto_verify_16: crypto_verify_16, + crypto_verify_32: crypto_verify_32, + crypto_secretbox: crypto_secretbox, + crypto_secretbox_open: crypto_secretbox_open, + crypto_scalarmult: crypto_scalarmult, + crypto_scalarmult_base: crypto_scalarmult_base, + crypto_box_beforenm: crypto_box_beforenm, + crypto_box_afternm: crypto_box_afternm, + crypto_box: crypto_box, + crypto_box_open: crypto_box_open, + crypto_box_keypair: crypto_box_keypair, + crypto_hash: crypto_hash, + crypto_sign: crypto_sign, + crypto_sign_keypair: crypto_sign_keypair, + crypto_sign_open: crypto_sign_open, + + crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, + crypto_sign_BYTES: crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, + crypto_hash_BYTES: crypto_hash_BYTES +}; + +/* High-level API */ + +function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); +} + +function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); +} + +function checkArrayTypes() { + var t, i; + for (i = 0; i < arguments.length; i++) { + if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') + throw new TypeError('unexpected type ' + t + ', use Uint8Array'); + } +} + +function cleanup(arr) { + for (var i = 0; i < arr.length; i++) arr[i] = 0; +} + +// TODO: Completely remove this in v0.15. +if (!nacl.util) { + nacl.util = {}; + nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { + throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); + }; +} + +nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; +}; + +nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); +}; + +nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); +}; + +nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; +nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; +nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + +nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q, n, p); + return q; +}; + +nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q, n); + return q; +}; + +nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; +nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + +nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); +}; + +nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; +}; + +nacl.box.after = nacl.secretbox; + +nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); +}; + +nacl.box.open.after = nacl.secretbox.open; + +nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; +nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; +nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; +nacl.box.nonceLength = crypto_box_NONCEBYTES; +nacl.box.overheadLength = nacl.secretbox.overheadLength; + +nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; +}; + +nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i = 0; i < m.length; i++) m[i] = tmp[i]; + return m; +}; + +nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; + return sig; +}; + +nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error('bad signature size'); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i; + for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; + for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; + return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); +}; + +nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error('bad seed size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i = 0; i < 32; i++) sk[i] = seed[i]; + crypto_sign_keypair(pk, sk, true); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; +nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; +nacl.sign.seedLength = crypto_sign_SEEDBYTES; +nacl.sign.signatureLength = crypto_sign_BYTES; + +nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; +}; + +nacl.hash.hashLength = crypto_hash_BYTES; + +nacl.verify = function(x, y) { + checkArrayTypes(x, y); + // Zero length arguments are considered not equal. + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return (vn(x, 0, y, 0, x.length) === 0) ? true : false; +}; + +nacl.setPRNG = function(fn) { + randombytes = fn; +}; + +(function() { + // Initialize PRNG if environment provides CSPRNG. + // If not, methods calling randombytes will throw. + var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; + if (crypto && crypto.getRandomValues) { + // Browsers. + var QUOTA = 65536; + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + for (i = 0; i < n; i += QUOTA) { + crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); + } + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } else if (true) { + // Node.js. + crypto = __nccwpck_require__(6113); + if (crypto && crypto.randomBytes) { + nacl.setPRNG(function(x, n) { + var i, v = crypto.randomBytes(n); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } +})(); + +})( true && module.exports ? module.exports : (self.nacl = self.nacl || {})); + + +/***/ }), + +/***/ 92778: +/***/ (function(__unused_webpack_module, exports) { + +/** @license URI.js v4.4.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ +(function (global, factory) { + true ? factory(exports) : + 0; +}(this, (function (exports) { 'use strict'; + +function merge() { + for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { + sets[_key] = arguments[_key]; + } + + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } else { + return sets[0]; + } +} +function subexp(str) { + return "(?:" + str + ")"; +} +function typeOf(o) { + return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); +} +function toUpperCase(str) { + return str.toUpperCase(); +} +function toArray(obj) { + return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; +} +function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; +} + +function buildExps(isIRI) { + var ALPHA$$ = "[A-Za-z]", + CR$ = "[\\x0D]", + DIGIT$$ = "[0-9]", + DQUOTE$$ = "[\\x22]", + HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), + //case-insensitive + LF$$ = "[\\x0A]", + SP$$ = "[\\x20]", + PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), + //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", + SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", + RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), + UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", + //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", + //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), + SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), + USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), + DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), + DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), + //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), + H16$ = subexp(HEXDIG$$ + "{1,4}"), + LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), + IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), + // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), + // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), + //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), + //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), + //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), + //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), + //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), + //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), + //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), + ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), + //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), + //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), + //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), + IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), + //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), + HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), + PORT$ = subexp(DIGIT$$ + "*"), + AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), + PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), + SEGMENT$ = subexp(PCHAR$ + "*"), + SEGMENT_NZ$ = subexp(PCHAR$ + "+"), + SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), + PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), + PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), + //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), + //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), + //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", + PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), + FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), + HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), + RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), + ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), + GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", + SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +var URI_PROTOCOL = buildExps(false); + +var IRI_PROTOCOL = buildExps(true); + +var slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + + + + + + + + + + + + + +var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } +}; + +/** Highest positive signed 32-bit float value */ + +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' + +/** Regular expressions */ +var regexPunycode = /^xn--/; +var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error$1(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +var ucs2encode = function ucs2encode(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); +}; + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +var basicToDigit = function basicToDigit(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +var digitToBasic = function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +var adapt = function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +var decode = function decode(input) { + // Don't use UCS-2. + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (var j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error$1('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + var oldi = i; + for (var w = 1, k = base;; /* no condition */k += base) { + + if (index >= inputLength) { + error$1('invalid-input'); + } + + var digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1('overflow'); + } + + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + + if (digit < t) { + break; + } + + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1('overflow'); + } + + w *= baseMinusT; + } + + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error$1('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } + + return String.fromCodePoint.apply(String, output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +var encode = function encode(input) { + var output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + var inputLength = input.length; + + // Initialize the state. + var n = initialN; + var delta = 0; + var bias = initialBias; + + // Handle the basic code points. + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + + if (_currentValue2 < 0x80) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var basicLength = output.length; + var handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + + if (_currentValue < n && ++delta > maxInt) { + error$1('overflow'); + } + if (_currentValue == n) { + // Represent delta as a generalized variable-length integer. + var q = delta; + for (var k = base;; /* no condition */k += base) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + ++delta; + ++n; + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +var toUnicode = function toUnicode(input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +var toASCII = function toASCII(input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ +/** + * Copyright 2011 Gary Court. 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. + * + * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ +var SCHEMES = {}; +function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; +} +function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; +} +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; +} + +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; +} +function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + + var _matches = slicedToArray(matches, 2), + address = _matches[1]; + + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } +} +function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + + var _matches2 = slicedToArray(matches, 3), + address = _matches2[1], + zone = _matches2[2]; + + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), + _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), + last = _address$toLowerCase$2[0], + first = _address$toLowerCase$2[1]; + + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function (acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index: index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function (a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } +} +var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; +function parse(uriString) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; + //fix port number + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } else if (components.scheme === undefined) { + components.reference = "relative"; + } else if (components.fragment === undefined) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; +} + +function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : undefined; +} + +var RDS1 = /^\.\.?\//; +var RDS2 = /^\/\.(\/|$)/; +var RDS3 = /^\/\.\.(\/|$)/; +var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +function removeDotSegments(input) { + var output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); +} + +function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) {} + //TODO: normalize IPv6 address as per RFC 5952 + + //if host component is a domain name + else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + //convert IDN via punycode + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string +} + +function resolveComponents(base, relative) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var skipNormalization = arguments[3]; + + var target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; +} + +function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +} + +function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} + +function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} + +function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); +} + +function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); +} + +var handler = { + scheme: "http", + domainHost: true, + parse: function parse(components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize(components, options) { + var secure = String(components.scheme).toLowerCase() === "https"; + //normalize the default port + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; + +var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize +}; + +function isSecure(wsComponents) { + return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; +} +//RFC 6455 +var handler$2 = { + scheme: "ws", + domainHost: true, + parse: function parse(components, options) { + var wsComponents = components; + //indicate if the secure flag is set + wsComponents.secure = isSecure(wsComponents); + //construct resouce name + wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); + wsComponents.path = undefined; + wsComponents.query = undefined; + return wsComponents; + }, + serialize: function serialize(wsComponents, options) { + //normalize the default port + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = undefined; + } + //ensure scheme matches secure flag + if (typeof wsComponents.secure === 'boolean') { + wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; + wsComponents.secure = undefined; + } + //reconstruct path from resource name + if (wsComponents.resourceName) { + var _wsComponents$resourc = wsComponents.resourceName.split('?'), + _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), + path = _wsComponents$resourc2[0], + query = _wsComponents$resourc2[1]; + + wsComponents.path = path && path !== '/' ? path : undefined; + wsComponents.query = query; + wsComponents.resourceName = undefined; + } + //forbid fragment component + wsComponents.fragment = undefined; + return wsComponents; + } +}; + +var handler$3 = { + scheme: "wss", + domainHost: handler$2.domainHost, + parse: handler$2.parse, + serialize: handler$2.serialize +}; + +var O = {}; +var isIRI = true; +//RFC 3986 +var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +var UNRESERVED = new RegExp(UNRESERVED$$, "g"); +var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +var NOT_HFVALUE = NOT_HFNAME; +function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; +} +var handler$4 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; + +var URN_PARSE = /^([^\:]+)\:(.*)/; +//RFC 2141 +var handler$5 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } +}; + +var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +//RFC 4122 +var handler$6 = { + scheme: "urn:uuid", + parse: function parse(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize(uuidComponents, options) { + var urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } +}; + +SCHEMES[handler.scheme] = handler; +SCHEMES[handler$1.scheme] = handler$1; +SCHEMES[handler$2.scheme] = handler$2; +SCHEMES[handler$3.scheme] = handler$3; +SCHEMES[handler$4.scheme] = handler$4; +SCHEMES[handler$5.scheme] = handler$5; +SCHEMES[handler$6.scheme] = handler$6; + +exports.SCHEMES = SCHEMES; +exports.pctEncChar = pctEncChar; +exports.pctDecChars = pctDecChars; +exports.parse = parse; +exports.removeDotSegments = removeDotSegments; +exports.serialize = serialize; +exports.resolveComponents = resolveComponents; +exports.resolve = resolve; +exports.normalize = normalize; +exports.equal = equal; +exports.escapeComponent = escapeComponent; +exports.unescapeComponent = unescapeComponent; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=uri.all.js.map + + +/***/ }), + +/***/ 90919: +/***/ ((module) => { + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]]]).join(''); +} + +module.exports = bytesToUuid; + + +/***/ }), + +/***/ 97868: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = __nccwpck_require__(6113); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; + + +/***/ }), + +/***/ 13902: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var rng = __nccwpck_require__(97868); +var bytesToUuid = __nccwpck_require__(90919); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; + + +/***/ }), + +/***/ 32154: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * verror.js: richer JavaScript errors + */ + +var mod_assertplus = __nccwpck_require__(41706); +var mod_util = __nccwpck_require__(73837); + +var mod_extsprintf = __nccwpck_require__(40122); +var mod_isError = (__nccwpck_require__(2527)/* .isError */ .VZ); +var sprintf = mod_extsprintf.sprintf; + +/* + * Public interface + */ + +/* So you can 'var VError = require('verror')' */ +module.exports = VError; +/* For compatibility */ +VError.VError = VError; +/* Other exported classes */ +VError.SError = SError; +VError.WError = WError; +VError.MultiError = MultiError; + +/* + * Common function used to parse constructor arguments for VError, WError, and + * SError. Named arguments to this function: + * + * strict force strict interpretation of sprintf arguments, even + * if the options in "argv" don't say so + * + * argv error's constructor arguments, which are to be + * interpreted as described in README.md. For quick + * reference, "argv" has one of the following forms: + * + * [ sprintf_args... ] (argv[0] is a string) + * [ cause, sprintf_args... ] (argv[0] is an Error) + * [ options, sprintf_args... ] (argv[0] is an object) + * + * This function normalizes these forms, producing an object with the following + * properties: + * + * options equivalent to "options" in third form. This will never + * be a direct reference to what the caller passed in + * (i.e., it may be a shallow copy), so it can be freely + * modified. + * + * shortmessage result of sprintf(sprintf_args), taking options.strict + * into account as described in README.md. + */ +function parseConstructorArguments(args) +{ + var argv, options, sprintf_args, shortmessage, k; + + mod_assertplus.object(args, 'args'); + mod_assertplus.bool(args.strict, 'args.strict'); + mod_assertplus.array(args.argv, 'args.argv'); + argv = args.argv; + + /* + * First, figure out which form of invocation we've been given. + */ + if (argv.length === 0) { + options = {}; + sprintf_args = []; + } else if (mod_isError(argv[0])) { + options = { 'cause': argv[0] }; + sprintf_args = argv.slice(1); + } else if (typeof (argv[0]) === 'object') { + options = {}; + for (k in argv[0]) { + options[k] = argv[0][k]; + } + sprintf_args = argv.slice(1); + } else { + mod_assertplus.string(argv[0], + 'first argument to VError, SError, or WError ' + + 'constructor must be a string, object, or Error'); + options = {}; + sprintf_args = argv; + } + + /* + * Now construct the error's message. + * + * extsprintf (which we invoke here with our caller's arguments in order + * to construct this Error's message) is strict in its interpretation of + * values to be processed by the "%s" specifier. The value passed to + * extsprintf must actually be a string or something convertible to a + * String using .toString(). Passing other values (notably "null" and + * "undefined") is considered a programmer error. The assumption is + * that if you actually want to print the string "null" or "undefined", + * then that's easy to do that when you're calling extsprintf; on the + * other hand, if you did NOT want that (i.e., there's actually a bug + * where the program assumes some variable is non-null and tries to + * print it, which might happen when constructing a packet or file in + * some specific format), then it's better to stop immediately than + * produce bogus output. + * + * However, sometimes the bug is only in the code calling VError, and a + * programmer might prefer to have the error message contain "null" or + * "undefined" rather than have the bug in the error path crash the + * program (making the first bug harder to identify). For that reason, + * by default VError converts "null" or "undefined" arguments to their + * string representations and passes those to extsprintf. Programmers + * desiring the strict behavior can use the SError class or pass the + * "strict" option to the VError constructor. + */ + mod_assertplus.object(options); + if (!options.strict && !args.strict) { + sprintf_args = sprintf_args.map(function (a) { + return (a === null ? 'null' : + a === undefined ? 'undefined' : a); + }); + } + + if (sprintf_args.length === 0) { + shortmessage = ''; + } else { + shortmessage = sprintf.apply(null, sprintf_args); + } + + return ({ + 'options': options, + 'shortmessage': shortmessage + }); +} + +/* + * See README.md for reference documentation. + */ +function VError() +{ + var args, obj, parsed, cause, ctor, message, k; + + args = Array.prototype.slice.call(arguments, 0); + + /* + * This is a regrettable pattern, but JavaScript's built-in Error class + * is defined to work this way, so we allow the constructor to be called + * without "new". + */ + if (!(this instanceof VError)) { + obj = Object.create(VError.prototype); + VError.apply(obj, arguments); + return (obj); + } + + /* + * For convenience and backwards compatibility, we support several + * different calling forms. Normalize them here. + */ + parsed = parseConstructorArguments({ + 'argv': args, + 'strict': false + }); + + /* + * If we've been given a name, apply it now. + */ + if (parsed.options.name) { + mod_assertplus.string(parsed.options.name, + 'error\'s "name" must be a string'); + this.name = parsed.options.name; + } + + /* + * For debugging, we keep track of the original short message (attached + * this Error particularly) separately from the complete message (which + * includes the messages of our cause chain). + */ + this.jse_shortmsg = parsed.shortmessage; + message = parsed.shortmessage; + + /* + * If we've been given a cause, record a reference to it and update our + * message appropriately. + */ + cause = parsed.options.cause; + if (cause) { + mod_assertplus.ok(mod_isError(cause), 'cause is not an Error'); + this.jse_cause = cause; + + if (!parsed.options.skipCauseMessage) { + message += ': ' + cause.message; + } + } + + /* + * If we've been given an object with properties, shallow-copy that + * here. We don't want to use a deep copy in case there are non-plain + * objects here, but we don't want to use the original object in case + * the caller modifies it later. + */ + this.jse_info = {}; + if (parsed.options.info) { + for (k in parsed.options.info) { + this.jse_info[k] = parsed.options.info[k]; + } + } + + this.message = message; + Error.call(this, message); + + if (Error.captureStackTrace) { + ctor = parsed.options.constructorOpt || this.constructor; + Error.captureStackTrace(this, ctor); + } + + return (this); +} + +mod_util.inherits(VError, Error); +VError.prototype.name = 'VError'; + +VError.prototype.toString = function ve_toString() +{ + var str = (this.hasOwnProperty('name') && this.name || + this.constructor.name || this.constructor.prototype.name); + if (this.message) + str += ': ' + this.message; + + return (str); +}; + +/* + * This method is provided for compatibility. New callers should use + * VError.cause() instead. That method also uses the saner `null` return value + * when there is no cause. + */ +VError.prototype.cause = function ve_cause() +{ + var cause = VError.cause(this); + return (cause === null ? undefined : cause); +}; + +/* + * Static methods + * + * These class-level methods are provided so that callers can use them on + * instances of Errors that are not VErrors. New interfaces should be provided + * only using static methods to eliminate the class of programming mistake where + * people fail to check whether the Error object has the corresponding methods. + */ + +VError.cause = function (err) +{ + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + return (mod_isError(err.jse_cause) ? err.jse_cause : null); +}; + +VError.info = function (err) +{ + var rv, cause, k; + + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + cause = VError.cause(err); + if (cause !== null) { + rv = VError.info(cause); + } else { + rv = {}; + } + + if (typeof (err.jse_info) == 'object' && err.jse_info !== null) { + for (k in err.jse_info) { + rv[k] = err.jse_info[k]; + } + } + + return (rv); +}; + +VError.findCauseByName = function (err, name) +{ + var cause; + + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + mod_assertplus.string(name, 'name'); + mod_assertplus.ok(name.length > 0, 'name cannot be empty'); + + for (cause = err; cause !== null; cause = VError.cause(cause)) { + mod_assertplus.ok(mod_isError(cause)); + if (cause.name == name) { + return (cause); + } + } + + return (null); +}; + +VError.hasCauseWithName = function (err, name) +{ + return (VError.findCauseByName(err, name) !== null); +}; + +VError.fullStack = function (err) +{ + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + + var cause = VError.cause(err); + + if (cause) { + return (err.stack + '\ncaused by: ' + VError.fullStack(cause)); + } + + return (err.stack); +}; + +VError.errorFromList = function (errors) +{ + mod_assertplus.arrayOfObject(errors, 'errors'); + + if (errors.length === 0) { + return (null); + } + + errors.forEach(function (e) { + mod_assertplus.ok(mod_isError(e)); + }); + + if (errors.length == 1) { + return (errors[0]); + } + + return (new MultiError(errors)); +}; + +VError.errorForEach = function (err, func) +{ + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + mod_assertplus.func(func, 'func'); + + if (err instanceof MultiError) { + err.errors().forEach(function iterError(e) { func(e); }); + } else { + func(err); + } +}; + + +/* + * SError is like VError, but stricter about types. You cannot pass "null" or + * "undefined" as string arguments to the formatter. + */ +function SError() +{ + var args, obj, parsed, options; + + args = Array.prototype.slice.call(arguments, 0); + if (!(this instanceof SError)) { + obj = Object.create(SError.prototype); + SError.apply(obj, arguments); + return (obj); + } + + parsed = parseConstructorArguments({ + 'argv': args, + 'strict': true + }); + + options = parsed.options; + VError.call(this, options, '%s', parsed.shortmessage); + + return (this); +} + +/* + * We don't bother setting SError.prototype.name because once constructed, + * SErrors are just like VErrors. + */ +mod_util.inherits(SError, VError); + + +/* + * Represents a collection of errors for the purpose of consumers that generally + * only deal with one error. Callers can extract the individual errors + * contained in this object, but may also just treat it as a normal single + * error, in which case a summary message will be printed. + */ +function MultiError(errors) +{ + mod_assertplus.array(errors, 'list of errors'); + mod_assertplus.ok(errors.length > 0, 'must be at least one error'); + this.ase_errors = errors; + + VError.call(this, { + 'cause': errors[0] + }, 'first of %d error%s', errors.length, errors.length == 1 ? '' : 's'); +} + +mod_util.inherits(MultiError, VError); +MultiError.prototype.name = 'MultiError'; + +MultiError.prototype.errors = function me_errors() +{ + return (this.ase_errors.slice(0)); +}; + + +/* + * See README.md for reference details. + */ +function WError() +{ + var args, obj, parsed, options; + + args = Array.prototype.slice.call(arguments, 0); + if (!(this instanceof WError)) { + obj = Object.create(WError.prototype); + WError.apply(obj, args); + return (obj); + } + + parsed = parseConstructorArguments({ + 'argv': args, + 'strict': false + }); + + options = parsed.options; + options['skipCauseMessage'] = true; + VError.call(this, options, '%s', parsed.shortmessage); + + return (this); +} + +mod_util.inherits(WError, VError); +WError.prototype.name = 'WError'; + +WError.prototype.toString = function we_toString() +{ + var str = (this.hasOwnProperty('name') && this.name || + this.constructor.name || this.constructor.prototype.name); + if (this.message) + str += ': ' + this.message; + if (this.jse_cause && this.jse_cause.message) + str += '; caused by ' + this.jse_cause.toString(); + + return (str); +}; + +/* + * For purely historical reasons, WError's cause() function allows you to set + * the cause. + */ +WError.prototype.cause = function we_cause(c) +{ + if (mod_isError(c)) + this.jse_cause = c; + + return (this.jse_cause); +}; + + +/***/ }), + +/***/ 23985: +/***/ ((module) => { + +// 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 + } +} + + +/***/ }), + +/***/ 19807: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const WebSocket = __nccwpck_require__(71608); + +WebSocket.createWebSocketStream = __nccwpck_require__(9922); +WebSocket.Server = __nccwpck_require__(67691); +WebSocket.Receiver = __nccwpck_require__(63501); +WebSocket.Sender = __nccwpck_require__(90150); + +module.exports = WebSocket; + + +/***/ }), + +/***/ 67716: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { EMPTY_BUFFER } = __nccwpck_require__(17967); + +/** + * Merges an array of buffers into a new buffer. + * + * @param {Buffer[]} list The array of buffers to concat + * @param {Number} totalLength The total length of buffers in the list + * @return {Buffer} The resulting buffer + * @public + */ +function concat(list, totalLength) { + if (list.length === 0) return EMPTY_BUFFER; + if (list.length === 1) return list[0]; + + const target = Buffer.allocUnsafe(totalLength); + let offset = 0; + + for (let i = 0; i < list.length; i++) { + const buf = list[i]; + target.set(buf, offset); + offset += buf.length; + } + + if (offset < totalLength) return target.slice(0, offset); + + return target; +} + +/** + * Masks a buffer using the given mask. + * + * @param {Buffer} source The buffer to mask + * @param {Buffer} mask The mask to use + * @param {Buffer} output The buffer where to store the result + * @param {Number} offset The offset at which to start writing + * @param {Number} length The number of bytes to mask. + * @public + */ +function _mask(source, mask, output, offset, length) { + for (let i = 0; i < length; i++) { + output[offset + i] = source[i] ^ mask[i & 3]; + } +} + +/** + * Unmasks a buffer using the given mask. + * + * @param {Buffer} buffer The buffer to unmask + * @param {Buffer} mask The mask to use + * @public + */ +function _unmask(buffer, mask) { + // Required until https://github.com/nodejs/node/issues/9006 is resolved. + const length = buffer.length; + for (let i = 0; i < length; i++) { + buffer[i] ^= mask[i & 3]; + } +} + +/** + * Converts a buffer to an `ArrayBuffer`. + * + * @param {Buffer} buf The buffer to convert + * @return {ArrayBuffer} Converted buffer + * @public + */ +function toArrayBuffer(buf) { + if (buf.byteLength === buf.buffer.byteLength) { + return buf.buffer; + } + + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); +} + +/** + * Converts `data` to a `Buffer`. + * + * @param {*} data The data to convert + * @return {Buffer} The buffer + * @throws {TypeError} + * @public + */ +function toBuffer(data) { + toBuffer.readOnly = true; + + if (Buffer.isBuffer(data)) return data; + + let buf; + + if (data instanceof ArrayBuffer) { + buf = Buffer.from(data); + } else if (ArrayBuffer.isView(data)) { + buf = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + } else { + buf = Buffer.from(data); + toBuffer.readOnly = false; + } + + return buf; +} + +try { + const bufferUtil = __nccwpck_require__(64084); + const bu = bufferUtil.BufferUtil || bufferUtil; + + module.exports = { + concat, + mask(source, mask, output, offset, length) { + if (length < 48) _mask(source, mask, output, offset, length); + else bu.mask(source, mask, output, offset, length); + }, + toArrayBuffer, + toBuffer, + unmask(buffer, mask) { + if (buffer.length < 32) _unmask(buffer, mask); + else bu.unmask(buffer, mask); + } + }; +} catch (e) /* istanbul ignore next */ { + module.exports = { + concat, + mask: _mask, + toArrayBuffer, + toBuffer, + unmask: _unmask + }; +} + + +/***/ }), + +/***/ 17967: +/***/ ((module) => { + +"use strict"; + + +module.exports = { + BINARY_TYPES: ['nodebuffer', 'arraybuffer', 'fragments'], + GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11', + kStatusCode: Symbol('status-code'), + kWebSocket: Symbol('websocket'), + EMPTY_BUFFER: Buffer.alloc(0), + NOOP: () => {} +}; + + +/***/ }), + +/***/ 65679: +/***/ ((module) => { + +"use strict"; + + +/** + * Class representing an event. + * + * @private + */ +class Event { + /** + * Create a new `Event`. + * + * @param {String} type The name of the event + * @param {Object} target A reference to the target to which the event was + * dispatched + */ + constructor(type, target) { + this.target = target; + this.type = type; + } +} + +/** + * Class representing a message event. + * + * @extends Event + * @private + */ +class MessageEvent extends Event { + /** + * Create a new `MessageEvent`. + * + * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The received data + * @param {WebSocket} target A reference to the target to which the event was + * dispatched + */ + constructor(data, target) { + super('message', target); + + this.data = data; + } +} + +/** + * Class representing a close event. + * + * @extends Event + * @private + */ +class CloseEvent extends Event { + /** + * Create a new `CloseEvent`. + * + * @param {Number} code The status code explaining why the connection is being + * closed + * @param {String} reason A human-readable string explaining why the + * connection is closing + * @param {WebSocket} target A reference to the target to which the event was + * dispatched + */ + constructor(code, reason, target) { + super('close', target); + + this.wasClean = target._closeFrameReceived && target._closeFrameSent; + this.reason = reason; + this.code = code; + } +} + +/** + * Class representing an open event. + * + * @extends Event + * @private + */ +class OpenEvent extends Event { + /** + * Create a new `OpenEvent`. + * + * @param {WebSocket} target A reference to the target to which the event was + * dispatched + */ + constructor(target) { + super('open', target); + } +} + +/** + * Class representing an error event. + * + * @extends Event + * @private + */ +class ErrorEvent extends Event { + /** + * Create a new `ErrorEvent`. + * + * @param {Object} error The error that generated this event + * @param {WebSocket} target A reference to the target to which the event was + * dispatched + */ + constructor(error, target) { + super('error', target); + + this.message = error.message; + this.error = error; + } +} + +/** + * This provides methods for emulating the `EventTarget` interface. It's not + * meant to be used directly. + * + * @mixin + */ +const EventTarget = { + /** + * Register an event listener. + * + * @param {String} type A string representing the event type to listen for + * @param {Function} listener The listener to add + * @param {Object} [options] An options object specifies characteristics about + * the event listener + * @param {Boolean} [options.once=false] A `Boolean`` indicating that the + * listener should be invoked at most once after being added. If `true`, + * the listener would be automatically removed when invoked. + * @public + */ + addEventListener(type, listener, options) { + if (typeof listener !== 'function') return; + + function onMessage(data) { + listener.call(this, new MessageEvent(data, this)); + } + + function onClose(code, message) { + listener.call(this, new CloseEvent(code, message, this)); + } + + function onError(error) { + listener.call(this, new ErrorEvent(error, this)); + } + + function onOpen() { + listener.call(this, new OpenEvent(this)); + } + + const method = options && options.once ? 'once' : 'on'; + + if (type === 'message') { + onMessage._listener = listener; + this[method](type, onMessage); + } else if (type === 'close') { + onClose._listener = listener; + this[method](type, onClose); + } else if (type === 'error') { + onError._listener = listener; + this[method](type, onError); + } else if (type === 'open') { + onOpen._listener = listener; + this[method](type, onOpen); + } else { + this[method](type, listener); + } + }, + + /** + * Remove an event listener. + * + * @param {String} type A string representing the event type to remove + * @param {Function} listener The listener to remove + * @public + */ + removeEventListener(type, listener) { + const listeners = this.listeners(type); + + for (let i = 0; i < listeners.length; i++) { + if (listeners[i] === listener || listeners[i]._listener === listener) { + this.removeListener(type, listeners[i]); + } + } + } +}; + +module.exports = EventTarget; + + +/***/ }), + +/***/ 813: +/***/ ((module) => { + +"use strict"; + + +// +// Allowed token characters: +// +// '!', '#', '$', '%', '&', ''', '*', '+', '-', +// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~' +// +// tokenChars[32] === 0 // ' ' +// tokenChars[33] === 1 // '!' +// tokenChars[34] === 0 // '"' +// ... +// +// prettier-ignore +const tokenChars = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31 + 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63 + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127 +]; + +/** + * Adds an offer to the map of extension offers or a parameter to the map of + * parameters. + * + * @param {Object} dest The map of extension offers or parameters + * @param {String} name The extension or parameter name + * @param {(Object|Boolean|String)} elem The extension parameters or the + * parameter value + * @private + */ +function push(dest, name, elem) { + if (dest[name] === undefined) dest[name] = [elem]; + else dest[name].push(elem); +} + +/** + * Parses the `Sec-WebSocket-Extensions` header into an object. + * + * @param {String} header The field value of the header + * @return {Object} The parsed object + * @public + */ +function parse(header) { + const offers = Object.create(null); + + if (header === undefined || header === '') return offers; + + let params = Object.create(null); + let mustUnescape = false; + let isEscaping = false; + let inQuotes = false; + let extensionName; + let paramName; + let start = -1; + let end = -1; + let i = 0; + + for (; i < header.length; i++) { + const code = header.charCodeAt(i); + + if (extensionName === undefined) { + if (end === -1 && tokenChars[code] === 1) { + if (start === -1) start = i; + } else if (code === 0x20 /* ' ' */ || code === 0x09 /* '\t' */) { + if (end === -1 && start !== -1) end = i; + } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) { + if (start === -1) { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + + if (end === -1) end = i; + const name = header.slice(start, end); + if (code === 0x2c) { + push(offers, name, params); + params = Object.create(null); + } else { + extensionName = name; + } + + start = end = -1; + } else { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + } else if (paramName === undefined) { + if (end === -1 && tokenChars[code] === 1) { + if (start === -1) start = i; + } else if (code === 0x20 || code === 0x09) { + if (end === -1 && start !== -1) end = i; + } else if (code === 0x3b || code === 0x2c) { + if (start === -1) { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + + if (end === -1) end = i; + push(params, header.slice(start, end), true); + if (code === 0x2c) { + push(offers, extensionName, params); + params = Object.create(null); + extensionName = undefined; + } + + start = end = -1; + } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) { + paramName = header.slice(start, i); + start = end = -1; + } else { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + } else { + // + // The value of a quoted-string after unescaping must conform to the + // token ABNF, so only token characters are valid. + // Ref: https://tools.ietf.org/html/rfc6455#section-9.1 + // + if (isEscaping) { + if (tokenChars[code] !== 1) { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + if (start === -1) start = i; + else if (!mustUnescape) mustUnescape = true; + isEscaping = false; + } else if (inQuotes) { + if (tokenChars[code] === 1) { + if (start === -1) start = i; + } else if (code === 0x22 /* '"' */ && start !== -1) { + inQuotes = false; + end = i; + } else if (code === 0x5c /* '\' */) { + isEscaping = true; + } else { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) { + inQuotes = true; + } else if (end === -1 && tokenChars[code] === 1) { + if (start === -1) start = i; + } else if (start !== -1 && (code === 0x20 || code === 0x09)) { + if (end === -1) end = i; + } else if (code === 0x3b || code === 0x2c) { + if (start === -1) { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + + if (end === -1) end = i; + let value = header.slice(start, end); + if (mustUnescape) { + value = value.replace(/\\/g, ''); + mustUnescape = false; + } + push(params, paramName, value); + if (code === 0x2c) { + push(offers, extensionName, params); + params = Object.create(null); + extensionName = undefined; + } + + paramName = undefined; + start = end = -1; + } else { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + } + } + + if (start === -1 || inQuotes) { + throw new SyntaxError('Unexpected end of input'); + } + + if (end === -1) end = i; + const token = header.slice(start, end); + if (extensionName === undefined) { + push(offers, token, params); + } else { + if (paramName === undefined) { + push(params, token, true); + } else if (mustUnescape) { + push(params, paramName, token.replace(/\\/g, '')); + } else { + push(params, paramName, token); + } + push(offers, extensionName, params); + } + + return offers; +} + +/** + * Builds the `Sec-WebSocket-Extensions` header field value. + * + * @param {Object} extensions The map of extensions and parameters to format + * @return {String} A string representing the given object + * @public + */ +function format(extensions) { + return Object.keys(extensions) + .map((extension) => { + let configurations = extensions[extension]; + if (!Array.isArray(configurations)) configurations = [configurations]; + return configurations + .map((params) => { + return [extension] + .concat( + Object.keys(params).map((k) => { + let values = params[k]; + if (!Array.isArray(values)) values = [values]; + return values + .map((v) => (v === true ? k : `${k}=${v}`)) + .join('; '); + }) + ) + .join('; '); + }) + .join(', '); + }) + .join(', '); +} + +module.exports = { format, parse }; + + +/***/ }), + +/***/ 3527: +/***/ ((module) => { + +"use strict"; + + +const kDone = Symbol('kDone'); +const kRun = Symbol('kRun'); + +/** + * A very simple job queue with adjustable concurrency. Adapted from + * https://github.com/STRML/async-limiter + */ +class Limiter { + /** + * Creates a new `Limiter`. + * + * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed + * to run concurrently + */ + constructor(concurrency) { + this[kDone] = () => { + this.pending--; + this[kRun](); + }; + this.concurrency = concurrency || Infinity; + this.jobs = []; + this.pending = 0; + } + + /** + * Adds a job to the queue. + * + * @param {Function} job The job to run + * @public + */ + add(job) { + this.jobs.push(job); + this[kRun](); + } + + /** + * Removes a job from the queue and runs it if possible. + * + * @private + */ + [kRun]() { + if (this.pending === this.concurrency) return; + + if (this.jobs.length) { + const job = this.jobs.shift(); + + this.pending++; + job(this[kDone]); + } + } +} + +module.exports = Limiter; + + +/***/ }), + +/***/ 98841: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const zlib = __nccwpck_require__(59796); + +const bufferUtil = __nccwpck_require__(67716); +const Limiter = __nccwpck_require__(3527); +const { kStatusCode, NOOP } = __nccwpck_require__(17967); + +const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]); +const kPerMessageDeflate = Symbol('permessage-deflate'); +const kTotalLength = Symbol('total-length'); +const kCallback = Symbol('callback'); +const kBuffers = Symbol('buffers'); +const kError = Symbol('error'); + +// +// We limit zlib concurrency, which prevents severe memory fragmentation +// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913 +// and https://github.com/websockets/ws/issues/1202 +// +// Intentionally global; it's the global thread pool that's an issue. +// +let zlibLimiter; + +/** + * permessage-deflate implementation. + */ +class PerMessageDeflate { + /** + * Creates a PerMessageDeflate instance. + * + * @param {Object} [options] Configuration options + * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept + * disabling of server context takeover + * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/ + * acknowledge disabling of client context takeover + * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the + * use of a custom server window size + * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support + * for, or request, a custom client window size + * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on + * deflate + * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on + * inflate + * @param {Number} [options.threshold=1024] Size (in bytes) below which + * messages should not be compressed + * @param {Number} [options.concurrencyLimit=10] The number of concurrent + * calls to zlib + * @param {Boolean} [isServer=false] Create the instance in either server or + * client mode + * @param {Number} [maxPayload=0] The maximum allowed message length + */ + constructor(options, isServer, maxPayload) { + this._maxPayload = maxPayload | 0; + this._options = options || {}; + this._threshold = + this._options.threshold !== undefined ? this._options.threshold : 1024; + this._isServer = !!isServer; + this._deflate = null; + this._inflate = null; + + this.params = null; + + if (!zlibLimiter) { + const concurrency = + this._options.concurrencyLimit !== undefined + ? this._options.concurrencyLimit + : 10; + zlibLimiter = new Limiter(concurrency); + } + } + + /** + * @type {String} + */ + static get extensionName() { + return 'permessage-deflate'; + } + + /** + * Create an extension negotiation offer. + * + * @return {Object} Extension parameters + * @public + */ + offer() { + const params = {}; + + if (this._options.serverNoContextTakeover) { + params.server_no_context_takeover = true; + } + if (this._options.clientNoContextTakeover) { + params.client_no_context_takeover = true; + } + if (this._options.serverMaxWindowBits) { + params.server_max_window_bits = this._options.serverMaxWindowBits; + } + if (this._options.clientMaxWindowBits) { + params.client_max_window_bits = this._options.clientMaxWindowBits; + } else if (this._options.clientMaxWindowBits == null) { + params.client_max_window_bits = true; + } + + return params; + } + + /** + * Accept an extension negotiation offer/response. + * + * @param {Array} configurations The extension negotiation offers/reponse + * @return {Object} Accepted configuration + * @public + */ + accept(configurations) { + configurations = this.normalizeParams(configurations); + + this.params = this._isServer + ? this.acceptAsServer(configurations) + : this.acceptAsClient(configurations); + + return this.params; + } + + /** + * Releases all resources used by the extension. + * + * @public + */ + cleanup() { + if (this._inflate) { + this._inflate.close(); + this._inflate = null; + } + + if (this._deflate) { + const callback = this._deflate[kCallback]; + + this._deflate.close(); + this._deflate = null; + + if (callback) { + callback( + new Error( + 'The deflate stream was closed while data was being processed' + ) + ); + } + } + } + + /** + * Accept an extension negotiation offer. + * + * @param {Array} offers The extension negotiation offers + * @return {Object} Accepted configuration + * @private + */ + acceptAsServer(offers) { + const opts = this._options; + const accepted = offers.find((params) => { + if ( + (opts.serverNoContextTakeover === false && + params.server_no_context_takeover) || + (params.server_max_window_bits && + (opts.serverMaxWindowBits === false || + (typeof opts.serverMaxWindowBits === 'number' && + opts.serverMaxWindowBits > params.server_max_window_bits))) || + (typeof opts.clientMaxWindowBits === 'number' && + !params.client_max_window_bits) + ) { + return false; + } + + return true; + }); + + if (!accepted) { + throw new Error('None of the extension offers can be accepted'); + } + + if (opts.serverNoContextTakeover) { + accepted.server_no_context_takeover = true; + } + if (opts.clientNoContextTakeover) { + accepted.client_no_context_takeover = true; + } + if (typeof opts.serverMaxWindowBits === 'number') { + accepted.server_max_window_bits = opts.serverMaxWindowBits; + } + if (typeof opts.clientMaxWindowBits === 'number') { + accepted.client_max_window_bits = opts.clientMaxWindowBits; + } else if ( + accepted.client_max_window_bits === true || + opts.clientMaxWindowBits === false + ) { + delete accepted.client_max_window_bits; + } + + return accepted; + } + + /** + * Accept the extension negotiation response. + * + * @param {Array} response The extension negotiation response + * @return {Object} Accepted configuration + * @private + */ + acceptAsClient(response) { + const params = response[0]; + + if ( + this._options.clientNoContextTakeover === false && + params.client_no_context_takeover + ) { + throw new Error('Unexpected parameter "client_no_context_takeover"'); + } + + if (!params.client_max_window_bits) { + if (typeof this._options.clientMaxWindowBits === 'number') { + params.client_max_window_bits = this._options.clientMaxWindowBits; + } + } else if ( + this._options.clientMaxWindowBits === false || + (typeof this._options.clientMaxWindowBits === 'number' && + params.client_max_window_bits > this._options.clientMaxWindowBits) + ) { + throw new Error( + 'Unexpected or invalid parameter "client_max_window_bits"' + ); + } + + return params; + } + + /** + * Normalize parameters. + * + * @param {Array} configurations The extension negotiation offers/reponse + * @return {Array} The offers/response with normalized parameters + * @private + */ + normalizeParams(configurations) { + configurations.forEach((params) => { + Object.keys(params).forEach((key) => { + let value = params[key]; + + if (value.length > 1) { + throw new Error(`Parameter "${key}" must have only a single value`); + } + + value = value[0]; + + if (key === 'client_max_window_bits') { + if (value !== true) { + const num = +value; + if (!Number.isInteger(num) || num < 8 || num > 15) { + throw new TypeError( + `Invalid value for parameter "${key}": ${value}` + ); + } + value = num; + } else if (!this._isServer) { + throw new TypeError( + `Invalid value for parameter "${key}": ${value}` + ); + } + } else if (key === 'server_max_window_bits') { + const num = +value; + if (!Number.isInteger(num) || num < 8 || num > 15) { + throw new TypeError( + `Invalid value for parameter "${key}": ${value}` + ); + } + value = num; + } else if ( + key === 'client_no_context_takeover' || + key === 'server_no_context_takeover' + ) { + if (value !== true) { + throw new TypeError( + `Invalid value for parameter "${key}": ${value}` + ); + } + } else { + throw new Error(`Unknown parameter "${key}"`); + } + + params[key] = value; + }); + }); + + return configurations; + } + + /** + * Decompress data. Concurrency limited. + * + * @param {Buffer} data Compressed data + * @param {Boolean} fin Specifies whether or not this is the last fragment + * @param {Function} callback Callback + * @public + */ + decompress(data, fin, callback) { + zlibLimiter.add((done) => { + this._decompress(data, fin, (err, result) => { + done(); + callback(err, result); + }); + }); + } + + /** + * Compress data. Concurrency limited. + * + * @param {Buffer} data Data to compress + * @param {Boolean} fin Specifies whether or not this is the last fragment + * @param {Function} callback Callback + * @public + */ + compress(data, fin, callback) { + zlibLimiter.add((done) => { + this._compress(data, fin, (err, result) => { + done(); + callback(err, result); + }); + }); + } + + /** + * Decompress data. + * + * @param {Buffer} data Compressed data + * @param {Boolean} fin Specifies whether or not this is the last fragment + * @param {Function} callback Callback + * @private + */ + _decompress(data, fin, callback) { + const endpoint = this._isServer ? 'client' : 'server'; + + if (!this._inflate) { + const key = `${endpoint}_max_window_bits`; + const windowBits = + typeof this.params[key] !== 'number' + ? zlib.Z_DEFAULT_WINDOWBITS + : this.params[key]; + + this._inflate = zlib.createInflateRaw({ + ...this._options.zlibInflateOptions, + windowBits + }); + this._inflate[kPerMessageDeflate] = this; + this._inflate[kTotalLength] = 0; + this._inflate[kBuffers] = []; + this._inflate.on('error', inflateOnError); + this._inflate.on('data', inflateOnData); + } + + this._inflate[kCallback] = callback; + + this._inflate.write(data); + if (fin) this._inflate.write(TRAILER); + + this._inflate.flush(() => { + const err = this._inflate[kError]; + + if (err) { + this._inflate.close(); + this._inflate = null; + callback(err); + return; + } + + const data = bufferUtil.concat( + this._inflate[kBuffers], + this._inflate[kTotalLength] + ); + + if (this._inflate._readableState.endEmitted) { + this._inflate.close(); + this._inflate = null; + } else { + this._inflate[kTotalLength] = 0; + this._inflate[kBuffers] = []; + + if (fin && this.params[`${endpoint}_no_context_takeover`]) { + this._inflate.reset(); + } + } + + callback(null, data); + }); + } + + /** + * Compress data. + * + * @param {Buffer} data Data to compress + * @param {Boolean} fin Specifies whether or not this is the last fragment + * @param {Function} callback Callback + * @private + */ + _compress(data, fin, callback) { + const endpoint = this._isServer ? 'server' : 'client'; + + if (!this._deflate) { + const key = `${endpoint}_max_window_bits`; + const windowBits = + typeof this.params[key] !== 'number' + ? zlib.Z_DEFAULT_WINDOWBITS + : this.params[key]; + + this._deflate = zlib.createDeflateRaw({ + ...this._options.zlibDeflateOptions, + windowBits + }); + + this._deflate[kTotalLength] = 0; + this._deflate[kBuffers] = []; + + // + // An `'error'` event is emitted, only on Node.js < 10.0.0, if the + // `zlib.DeflateRaw` instance is closed while data is being processed. + // This can happen if `PerMessageDeflate#cleanup()` is called at the wrong + // time due to an abnormal WebSocket closure. + // + this._deflate.on('error', NOOP); + this._deflate.on('data', deflateOnData); + } + + this._deflate[kCallback] = callback; + + this._deflate.write(data); + this._deflate.flush(zlib.Z_SYNC_FLUSH, () => { + if (!this._deflate) { + // + // The deflate stream was closed while data was being processed. + // + return; + } + + let data = bufferUtil.concat( + this._deflate[kBuffers], + this._deflate[kTotalLength] + ); + + if (fin) data = data.slice(0, data.length - 4); + + // + // Ensure that the callback will not be called again in + // `PerMessageDeflate#cleanup()`. + // + this._deflate[kCallback] = null; + + this._deflate[kTotalLength] = 0; + this._deflate[kBuffers] = []; + + if (fin && this.params[`${endpoint}_no_context_takeover`]) { + this._deflate.reset(); + } + + callback(null, data); + }); + } +} + +module.exports = PerMessageDeflate; + +/** + * The listener of the `zlib.DeflateRaw` stream `'data'` event. + * + * @param {Buffer} chunk A chunk of data + * @private + */ +function deflateOnData(chunk) { + this[kBuffers].push(chunk); + this[kTotalLength] += chunk.length; +} + +/** + * The listener of the `zlib.InflateRaw` stream `'data'` event. + * + * @param {Buffer} chunk A chunk of data + * @private + */ +function inflateOnData(chunk) { + this[kTotalLength] += chunk.length; + + if ( + this[kPerMessageDeflate]._maxPayload < 1 || + this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload + ) { + this[kBuffers].push(chunk); + return; + } + + this[kError] = new RangeError('Max payload size exceeded'); + this[kError][kStatusCode] = 1009; + this.removeListener('data', inflateOnData); + this.reset(); +} + +/** + * The listener of the `zlib.InflateRaw` stream `'error'` event. + * + * @param {Error} err The emitted error + * @private + */ +function inflateOnError(err) { + // + // There is no need to call `Zlib#close()` as the handle is automatically + // closed when an error is emitted. + // + this[kPerMessageDeflate]._inflate = null; + err[kStatusCode] = 1007; + this[kCallback](err); +} + + +/***/ }), + +/***/ 63501: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { Writable } = __nccwpck_require__(12781); + +const PerMessageDeflate = __nccwpck_require__(98841); +const { + BINARY_TYPES, + EMPTY_BUFFER, + kStatusCode, + kWebSocket +} = __nccwpck_require__(17967); +const { concat, toArrayBuffer, unmask } = __nccwpck_require__(67716); +const { isValidStatusCode, isValidUTF8 } = __nccwpck_require__(10467); + +const GET_INFO = 0; +const GET_PAYLOAD_LENGTH_16 = 1; +const GET_PAYLOAD_LENGTH_64 = 2; +const GET_MASK = 3; +const GET_DATA = 4; +const INFLATING = 5; + +/** + * HyBi Receiver implementation. + * + * @extends stream.Writable + */ +class Receiver extends Writable { + /** + * Creates a Receiver instance. + * + * @param {String} [binaryType=nodebuffer] The type for binary data + * @param {Object} [extensions] An object containing the negotiated extensions + * @param {Boolean} [isServer=false] Specifies whether to operate in client or + * server mode + * @param {Number} [maxPayload=0] The maximum allowed message length + */ + constructor(binaryType, extensions, isServer, maxPayload) { + super(); + + this._binaryType = binaryType || BINARY_TYPES[0]; + this[kWebSocket] = undefined; + this._extensions = extensions || {}; + this._isServer = !!isServer; + this._maxPayload = maxPayload | 0; + + this._bufferedBytes = 0; + this._buffers = []; + + this._compressed = false; + this._payloadLength = 0; + this._mask = undefined; + this._fragmented = 0; + this._masked = false; + this._fin = false; + this._opcode = 0; + + this._totalPayloadLength = 0; + this._messageLength = 0; + this._fragments = []; + + this._state = GET_INFO; + this._loop = false; + } + + /** + * Implements `Writable.prototype._write()`. + * + * @param {Buffer} chunk The chunk of data to write + * @param {String} encoding The character encoding of `chunk` + * @param {Function} cb Callback + * @private + */ + _write(chunk, encoding, cb) { + if (this._opcode === 0x08 && this._state == GET_INFO) return cb(); + + this._bufferedBytes += chunk.length; + this._buffers.push(chunk); + this.startLoop(cb); + } + + /** + * Consumes `n` bytes from the buffered data. + * + * @param {Number} n The number of bytes to consume + * @return {Buffer} The consumed bytes + * @private + */ + consume(n) { + this._bufferedBytes -= n; + + if (n === this._buffers[0].length) return this._buffers.shift(); + + if (n < this._buffers[0].length) { + const buf = this._buffers[0]; + this._buffers[0] = buf.slice(n); + return buf.slice(0, n); + } + + const dst = Buffer.allocUnsafe(n); + + do { + const buf = this._buffers[0]; + const offset = dst.length - n; + + if (n >= buf.length) { + dst.set(this._buffers.shift(), offset); + } else { + dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset); + this._buffers[0] = buf.slice(n); + } + + n -= buf.length; + } while (n > 0); + + return dst; + } + + /** + * Starts the parsing loop. + * + * @param {Function} cb Callback + * @private + */ + startLoop(cb) { + let err; + this._loop = true; + + do { + switch (this._state) { + case GET_INFO: + err = this.getInfo(); + break; + case GET_PAYLOAD_LENGTH_16: + err = this.getPayloadLength16(); + break; + case GET_PAYLOAD_LENGTH_64: + err = this.getPayloadLength64(); + break; + case GET_MASK: + this.getMask(); + break; + case GET_DATA: + err = this.getData(cb); + break; + default: + // `INFLATING` + this._loop = false; + return; + } + } while (this._loop); + + cb(err); + } + + /** + * Reads the first two bytes of a frame. + * + * @return {(RangeError|undefined)} A possible error + * @private + */ + getInfo() { + if (this._bufferedBytes < 2) { + this._loop = false; + return; + } + + const buf = this.consume(2); + + if ((buf[0] & 0x30) !== 0x00) { + this._loop = false; + return error(RangeError, 'RSV2 and RSV3 must be clear', true, 1002); + } + + const compressed = (buf[0] & 0x40) === 0x40; + + if (compressed && !this._extensions[PerMessageDeflate.extensionName]) { + this._loop = false; + return error(RangeError, 'RSV1 must be clear', true, 1002); + } + + this._fin = (buf[0] & 0x80) === 0x80; + this._opcode = buf[0] & 0x0f; + this._payloadLength = buf[1] & 0x7f; + + if (this._opcode === 0x00) { + if (compressed) { + this._loop = false; + return error(RangeError, 'RSV1 must be clear', true, 1002); + } + + if (!this._fragmented) { + this._loop = false; + return error(RangeError, 'invalid opcode 0', true, 1002); + } + + this._opcode = this._fragmented; + } else if (this._opcode === 0x01 || this._opcode === 0x02) { + if (this._fragmented) { + this._loop = false; + return error(RangeError, `invalid opcode ${this._opcode}`, true, 1002); + } + + this._compressed = compressed; + } else if (this._opcode > 0x07 && this._opcode < 0x0b) { + if (!this._fin) { + this._loop = false; + return error(RangeError, 'FIN must be set', true, 1002); + } + + if (compressed) { + this._loop = false; + return error(RangeError, 'RSV1 must be clear', true, 1002); + } + + if (this._payloadLength > 0x7d) { + this._loop = false; + return error( + RangeError, + `invalid payload length ${this._payloadLength}`, + true, + 1002 + ); + } + } else { + this._loop = false; + return error(RangeError, `invalid opcode ${this._opcode}`, true, 1002); + } + + if (!this._fin && !this._fragmented) this._fragmented = this._opcode; + this._masked = (buf[1] & 0x80) === 0x80; + + if (this._isServer) { + if (!this._masked) { + this._loop = false; + return error(RangeError, 'MASK must be set', true, 1002); + } + } else if (this._masked) { + this._loop = false; + return error(RangeError, 'MASK must be clear', true, 1002); + } + + if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16; + else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64; + else return this.haveLength(); + } + + /** + * Gets extended payload length (7+16). + * + * @return {(RangeError|undefined)} A possible error + * @private + */ + getPayloadLength16() { + if (this._bufferedBytes < 2) { + this._loop = false; + return; + } + + this._payloadLength = this.consume(2).readUInt16BE(0); + return this.haveLength(); + } + + /** + * Gets extended payload length (7+64). + * + * @return {(RangeError|undefined)} A possible error + * @private + */ + getPayloadLength64() { + if (this._bufferedBytes < 8) { + this._loop = false; + return; + } + + const buf = this.consume(8); + const num = buf.readUInt32BE(0); + + // + // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned + // if payload length is greater than this number. + // + if (num > Math.pow(2, 53 - 32) - 1) { + this._loop = false; + return error( + RangeError, + 'Unsupported WebSocket frame: payload length > 2^53 - 1', + false, + 1009 + ); + } + + this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4); + return this.haveLength(); + } + + /** + * Payload length has been read. + * + * @return {(RangeError|undefined)} A possible error + * @private + */ + haveLength() { + if (this._payloadLength && this._opcode < 0x08) { + this._totalPayloadLength += this._payloadLength; + if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) { + this._loop = false; + return error(RangeError, 'Max payload size exceeded', false, 1009); + } + } + + if (this._masked) this._state = GET_MASK; + else this._state = GET_DATA; + } + + /** + * Reads mask bytes. + * + * @private + */ + getMask() { + if (this._bufferedBytes < 4) { + this._loop = false; + return; + } + + this._mask = this.consume(4); + this._state = GET_DATA; + } + + /** + * Reads data bytes. + * + * @param {Function} cb Callback + * @return {(Error|RangeError|undefined)} A possible error + * @private + */ + getData(cb) { + let data = EMPTY_BUFFER; + + if (this._payloadLength) { + if (this._bufferedBytes < this._payloadLength) { + this._loop = false; + return; + } + + data = this.consume(this._payloadLength); + if (this._masked) unmask(data, this._mask); + } + + if (this._opcode > 0x07) return this.controlMessage(data); + + if (this._compressed) { + this._state = INFLATING; + this.decompress(data, cb); + return; + } + + if (data.length) { + // + // This message is not compressed so its lenght is the sum of the payload + // length of all fragments. + // + this._messageLength = this._totalPayloadLength; + this._fragments.push(data); + } + + return this.dataMessage(); + } + + /** + * Decompresses data. + * + * @param {Buffer} data Compressed data + * @param {Function} cb Callback + * @private + */ + decompress(data, cb) { + const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; + + perMessageDeflate.decompress(data, this._fin, (err, buf) => { + if (err) return cb(err); + + if (buf.length) { + this._messageLength += buf.length; + if (this._messageLength > this._maxPayload && this._maxPayload > 0) { + return cb( + error(RangeError, 'Max payload size exceeded', false, 1009) + ); + } + + this._fragments.push(buf); + } + + const er = this.dataMessage(); + if (er) return cb(er); + + this.startLoop(cb); + }); + } + + /** + * Handles a data message. + * + * @return {(Error|undefined)} A possible error + * @private + */ + dataMessage() { + if (this._fin) { + const messageLength = this._messageLength; + const fragments = this._fragments; + + this._totalPayloadLength = 0; + this._messageLength = 0; + this._fragmented = 0; + this._fragments = []; + + if (this._opcode === 2) { + let data; + + if (this._binaryType === 'nodebuffer') { + data = concat(fragments, messageLength); + } else if (this._binaryType === 'arraybuffer') { + data = toArrayBuffer(concat(fragments, messageLength)); + } else { + data = fragments; + } + + this.emit('message', data); + } else { + const buf = concat(fragments, messageLength); + + if (!isValidUTF8(buf)) { + this._loop = false; + return error(Error, 'invalid UTF-8 sequence', true, 1007); + } + + this.emit('message', buf.toString()); + } + } + + this._state = GET_INFO; + } + + /** + * Handles a control message. + * + * @param {Buffer} data Data to handle + * @return {(Error|RangeError|undefined)} A possible error + * @private + */ + controlMessage(data) { + if (this._opcode === 0x08) { + this._loop = false; + + if (data.length === 0) { + this.emit('conclude', 1005, ''); + this.end(); + } else if (data.length === 1) { + return error(RangeError, 'invalid payload length 1', true, 1002); + } else { + const code = data.readUInt16BE(0); + + if (!isValidStatusCode(code)) { + return error(RangeError, `invalid status code ${code}`, true, 1002); + } + + const buf = data.slice(2); + + if (!isValidUTF8(buf)) { + return error(Error, 'invalid UTF-8 sequence', true, 1007); + } + + this.emit('conclude', code, buf.toString()); + this.end(); + } + } else if (this._opcode === 0x09) { + this.emit('ping', data); + } else { + this.emit('pong', data); + } + + this._state = GET_INFO; + } +} + +module.exports = Receiver; + +/** + * Builds an error object. + * + * @param {(Error|RangeError)} ErrorCtor The error constructor + * @param {String} message The error message + * @param {Boolean} prefix Specifies whether or not to add a default prefix to + * `message` + * @param {Number} statusCode The status code + * @return {(Error|RangeError)} The error + * @private + */ +function error(ErrorCtor, message, prefix, statusCode) { + const err = new ErrorCtor( + prefix ? `Invalid WebSocket frame: ${message}` : message + ); + + Error.captureStackTrace(err, error); + err[kStatusCode] = statusCode; + return err; +} + + +/***/ }), + +/***/ 90150: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { randomFillSync } = __nccwpck_require__(6113); + +const PerMessageDeflate = __nccwpck_require__(98841); +const { EMPTY_BUFFER } = __nccwpck_require__(17967); +const { isValidStatusCode } = __nccwpck_require__(10467); +const { mask: applyMask, toBuffer } = __nccwpck_require__(67716); + +const mask = Buffer.alloc(4); + +/** + * HyBi Sender implementation. + */ +class Sender { + /** + * Creates a Sender instance. + * + * @param {net.Socket} socket The connection socket + * @param {Object} [extensions] An object containing the negotiated extensions + */ + constructor(socket, extensions) { + this._extensions = extensions || {}; + this._socket = socket; + + this._firstFragment = true; + this._compress = false; + + this._bufferedBytes = 0; + this._deflating = false; + this._queue = []; + } + + /** + * Frames a piece of data according to the HyBi WebSocket protocol. + * + * @param {Buffer} data The data to frame + * @param {Object} options Options object + * @param {Number} options.opcode The opcode + * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be + * modified + * @param {Boolean} [options.fin=false] Specifies whether or not to set the + * FIN bit + * @param {Boolean} [options.mask=false] Specifies whether or not to mask + * `data` + * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the + * RSV1 bit + * @return {Buffer[]} The framed data as a list of `Buffer` instances + * @public + */ + static frame(data, options) { + const merge = options.mask && options.readOnly; + let offset = options.mask ? 6 : 2; + let payloadLength = data.length; + + if (data.length >= 65536) { + offset += 8; + payloadLength = 127; + } else if (data.length > 125) { + offset += 2; + payloadLength = 126; + } + + const target = Buffer.allocUnsafe(merge ? data.length + offset : offset); + + target[0] = options.fin ? options.opcode | 0x80 : options.opcode; + if (options.rsv1) target[0] |= 0x40; + + target[1] = payloadLength; + + if (payloadLength === 126) { + target.writeUInt16BE(data.length, 2); + } else if (payloadLength === 127) { + target.writeUInt32BE(0, 2); + target.writeUInt32BE(data.length, 6); + } + + if (!options.mask) return [target, data]; + + randomFillSync(mask, 0, 4); + + target[1] |= 0x80; + target[offset - 4] = mask[0]; + target[offset - 3] = mask[1]; + target[offset - 2] = mask[2]; + target[offset - 1] = mask[3]; + + if (merge) { + applyMask(data, mask, target, offset, data.length); + return [target]; + } + + applyMask(data, mask, data, 0, data.length); + return [target, data]; + } + + /** + * Sends a close message to the other peer. + * + * @param {Number} [code] The status code component of the body + * @param {String} [data] The message component of the body + * @param {Boolean} [mask=false] Specifies whether or not to mask the message + * @param {Function} [cb] Callback + * @public + */ + close(code, data, mask, cb) { + let buf; + + if (code === undefined) { + buf = EMPTY_BUFFER; + } else if (typeof code !== 'number' || !isValidStatusCode(code)) { + throw new TypeError('First argument must be a valid error code number'); + } else if (data === undefined || data === '') { + buf = Buffer.allocUnsafe(2); + buf.writeUInt16BE(code, 0); + } else { + const length = Buffer.byteLength(data); + + if (length > 123) { + throw new RangeError('The message must not be greater than 123 bytes'); + } + + buf = Buffer.allocUnsafe(2 + length); + buf.writeUInt16BE(code, 0); + buf.write(data, 2); + } + + if (this._deflating) { + this.enqueue([this.doClose, buf, mask, cb]); + } else { + this.doClose(buf, mask, cb); + } + } + + /** + * Frames and sends a close message. + * + * @param {Buffer} data The message to send + * @param {Boolean} [mask=false] Specifies whether or not to mask `data` + * @param {Function} [cb] Callback + * @private + */ + doClose(data, mask, cb) { + this.sendFrame( + Sender.frame(data, { + fin: true, + rsv1: false, + opcode: 0x08, + mask, + readOnly: false + }), + cb + ); + } + + /** + * Sends a ping message to the other peer. + * + * @param {*} data The message to send + * @param {Boolean} [mask=false] Specifies whether or not to mask `data` + * @param {Function} [cb] Callback + * @public + */ + ping(data, mask, cb) { + const buf = toBuffer(data); + + if (buf.length > 125) { + throw new RangeError('The data size must not be greater than 125 bytes'); + } + + if (this._deflating) { + this.enqueue([this.doPing, buf, mask, toBuffer.readOnly, cb]); + } else { + this.doPing(buf, mask, toBuffer.readOnly, cb); + } + } + + /** + * Frames and sends a ping message. + * + * @param {Buffer} data The message to send + * @param {Boolean} [mask=false] Specifies whether or not to mask `data` + * @param {Boolean} [readOnly=false] Specifies whether `data` can be modified + * @param {Function} [cb] Callback + * @private + */ + doPing(data, mask, readOnly, cb) { + this.sendFrame( + Sender.frame(data, { + fin: true, + rsv1: false, + opcode: 0x09, + mask, + readOnly + }), + cb + ); + } + + /** + * Sends a pong message to the other peer. + * + * @param {*} data The message to send + * @param {Boolean} [mask=false] Specifies whether or not to mask `data` + * @param {Function} [cb] Callback + * @public + */ + pong(data, mask, cb) { + const buf = toBuffer(data); + + if (buf.length > 125) { + throw new RangeError('The data size must not be greater than 125 bytes'); + } + + if (this._deflating) { + this.enqueue([this.doPong, buf, mask, toBuffer.readOnly, cb]); + } else { + this.doPong(buf, mask, toBuffer.readOnly, cb); + } + } + + /** + * Frames and sends a pong message. + * + * @param {Buffer} data The message to send + * @param {Boolean} [mask=false] Specifies whether or not to mask `data` + * @param {Boolean} [readOnly=false] Specifies whether `data` can be modified + * @param {Function} [cb] Callback + * @private + */ + doPong(data, mask, readOnly, cb) { + this.sendFrame( + Sender.frame(data, { + fin: true, + rsv1: false, + opcode: 0x0a, + mask, + readOnly + }), + cb + ); + } + + /** + * Sends a data message to the other peer. + * + * @param {*} data The message to send + * @param {Object} options Options object + * @param {Boolean} [options.compress=false] Specifies whether or not to + * compress `data` + * @param {Boolean} [options.binary=false] Specifies whether `data` is binary + * or text + * @param {Boolean} [options.fin=false] Specifies whether the fragment is the + * last one + * @param {Boolean} [options.mask=false] Specifies whether or not to mask + * `data` + * @param {Function} [cb] Callback + * @public + */ + send(data, options, cb) { + const buf = toBuffer(data); + const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; + let opcode = options.binary ? 2 : 1; + let rsv1 = options.compress; + + if (this._firstFragment) { + this._firstFragment = false; + if (rsv1 && perMessageDeflate) { + rsv1 = buf.length >= perMessageDeflate._threshold; + } + this._compress = rsv1; + } else { + rsv1 = false; + opcode = 0; + } + + if (options.fin) this._firstFragment = true; + + if (perMessageDeflate) { + const opts = { + fin: options.fin, + rsv1, + opcode, + mask: options.mask, + readOnly: toBuffer.readOnly + }; + + if (this._deflating) { + this.enqueue([this.dispatch, buf, this._compress, opts, cb]); + } else { + this.dispatch(buf, this._compress, opts, cb); + } + } else { + this.sendFrame( + Sender.frame(buf, { + fin: options.fin, + rsv1: false, + opcode, + mask: options.mask, + readOnly: toBuffer.readOnly + }), + cb + ); + } + } + + /** + * Dispatches a data message. + * + * @param {Buffer} data The message to send + * @param {Boolean} [compress=false] Specifies whether or not to compress + * `data` + * @param {Object} options Options object + * @param {Number} options.opcode The opcode + * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be + * modified + * @param {Boolean} [options.fin=false] Specifies whether or not to set the + * FIN bit + * @param {Boolean} [options.mask=false] Specifies whether or not to mask + * `data` + * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the + * RSV1 bit + * @param {Function} [cb] Callback + * @private + */ + dispatch(data, compress, options, cb) { + if (!compress) { + this.sendFrame(Sender.frame(data, options), cb); + return; + } + + const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; + + this._bufferedBytes += data.length; + this._deflating = true; + perMessageDeflate.compress(data, options.fin, (_, buf) => { + if (this._socket.destroyed) { + const err = new Error( + 'The socket was closed while data was being compressed' + ); + + if (typeof cb === 'function') cb(err); + + for (let i = 0; i < this._queue.length; i++) { + const callback = this._queue[i][4]; + + if (typeof callback === 'function') callback(err); + } + + return; + } + + this._bufferedBytes -= data.length; + this._deflating = false; + options.readOnly = false; + this.sendFrame(Sender.frame(buf, options), cb); + this.dequeue(); + }); + } + + /** + * Executes queued send operations. + * + * @private + */ + dequeue() { + while (!this._deflating && this._queue.length) { + const params = this._queue.shift(); + + this._bufferedBytes -= params[1].length; + Reflect.apply(params[0], this, params.slice(1)); + } + } + + /** + * Enqueues a send operation. + * + * @param {Array} params Send operation parameters. + * @private + */ + enqueue(params) { + this._bufferedBytes += params[1].length; + this._queue.push(params); + } + + /** + * Sends a frame. + * + * @param {Buffer[]} list The frame to send + * @param {Function} [cb] Callback + * @private + */ + sendFrame(list, cb) { + if (list.length === 2) { + this._socket.cork(); + this._socket.write(list[0]); + this._socket.write(list[1], cb); + this._socket.uncork(); + } else { + this._socket.write(list[0], cb); + } + } +} + +module.exports = Sender; + + +/***/ }), + +/***/ 9922: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { Duplex } = __nccwpck_require__(12781); + +/** + * Emits the `'close'` event on a stream. + * + * @param {stream.Duplex} The stream. + * @private + */ +function emitClose(stream) { + stream.emit('close'); +} + +/** + * The listener of the `'end'` event. + * + * @private + */ +function duplexOnEnd() { + if (!this.destroyed && this._writableState.finished) { + this.destroy(); + } +} + +/** + * The listener of the `'error'` event. + * + * @param {Error} err The error + * @private + */ +function duplexOnError(err) { + this.removeListener('error', duplexOnError); + this.destroy(); + if (this.listenerCount('error') === 0) { + // Do not suppress the throwing behavior. + this.emit('error', err); + } +} + +/** + * Wraps a `WebSocket` in a duplex stream. + * + * @param {WebSocket} ws The `WebSocket` to wrap + * @param {Object} [options] The options for the `Duplex` constructor + * @return {stream.Duplex} The duplex stream + * @public + */ +function createWebSocketStream(ws, options) { + let resumeOnReceiverDrain = true; + + function receiverOnDrain() { + if (resumeOnReceiverDrain) ws._socket.resume(); + } + + if (ws.readyState === ws.CONNECTING) { + ws.once('open', function open() { + ws._receiver.removeAllListeners('drain'); + ws._receiver.on('drain', receiverOnDrain); + }); + } else { + ws._receiver.removeAllListeners('drain'); + ws._receiver.on('drain', receiverOnDrain); + } + + const duplex = new Duplex({ + ...options, + autoDestroy: false, + emitClose: false, + objectMode: false, + writableObjectMode: false + }); + + ws.on('message', function message(msg) { + if (!duplex.push(msg)) { + resumeOnReceiverDrain = false; + ws._socket.pause(); + } + }); + + ws.once('error', function error(err) { + if (duplex.destroyed) return; + + duplex.destroy(err); + }); + + ws.once('close', function close() { + if (duplex.destroyed) return; + + duplex.push(null); + }); + + duplex._destroy = function (err, callback) { + if (ws.readyState === ws.CLOSED) { + callback(err); + process.nextTick(emitClose, duplex); + return; + } + + let called = false; + + ws.once('error', function error(err) { + called = true; + callback(err); + }); + + ws.once('close', function close() { + if (!called) callback(err); + process.nextTick(emitClose, duplex); + }); + ws.terminate(); + }; + + duplex._final = function (callback) { + if (ws.readyState === ws.CONNECTING) { + ws.once('open', function open() { + duplex._final(callback); + }); + return; + } + + // If the value of the `_socket` property is `null` it means that `ws` is a + // client websocket and the handshake failed. In fact, when this happens, a + // socket is never assigned to the websocket. Wait for the `'error'` event + // that will be emitted by the websocket. + if (ws._socket === null) return; + + if (ws._socket._writableState.finished) { + callback(); + if (duplex._readableState.endEmitted) duplex.destroy(); + } else { + ws._socket.once('finish', function finish() { + // `duplex` is not destroyed here because the `'end'` event will be + // emitted on `duplex` after this `'finish'` event. The EOF signaling + // `null` chunk is, in fact, pushed when the websocket emits `'close'`. + callback(); + }); + ws.close(); + } + }; + + duplex._read = function () { + if (ws.readyState === ws.OPEN && !resumeOnReceiverDrain) { + resumeOnReceiverDrain = true; + if (!ws._receiver._writableState.needDrain) ws._socket.resume(); + } + }; + + duplex._write = function (chunk, encoding, callback) { + if (ws.readyState === ws.CONNECTING) { + ws.once('open', function open() { + duplex._write(chunk, encoding, callback); + }); + return; + } + + ws.send(chunk, callback); + }; + + duplex.on('end', duplexOnEnd); + duplex.on('error', duplexOnError); + return duplex; +} + +module.exports = createWebSocketStream; + + +/***/ }), + +/***/ 10467: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/** + * Checks if a status code is allowed in a close frame. + * + * @param {Number} code The status code + * @return {Boolean} `true` if the status code is valid, else `false` + * @public + */ +function isValidStatusCode(code) { + return ( + (code >= 1000 && + code <= 1014 && + code !== 1004 && + code !== 1005 && + code !== 1006) || + (code >= 3000 && code <= 4999) + ); +} + +/** + * Checks if a given buffer contains only correct UTF-8. + * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by + * Markus Kuhn. + * + * @param {Buffer} buf The buffer to check + * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false` + * @public + */ +function _isValidUTF8(buf) { + const len = buf.length; + let i = 0; + + while (i < len) { + if ((buf[i] & 0x80) === 0) { + // 0xxxxxxx + i++; + } else if ((buf[i] & 0xe0) === 0xc0) { + // 110xxxxx 10xxxxxx + if ( + i + 1 === len || + (buf[i + 1] & 0xc0) !== 0x80 || + (buf[i] & 0xfe) === 0xc0 // Overlong + ) { + return false; + } + + i += 2; + } else if ((buf[i] & 0xf0) === 0xe0) { + // 1110xxxx 10xxxxxx 10xxxxxx + if ( + i + 2 >= len || + (buf[i + 1] & 0xc0) !== 0x80 || + (buf[i + 2] & 0xc0) !== 0x80 || + (buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || // Overlong + (buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) // Surrogate (U+D800 - U+DFFF) + ) { + return false; + } + + i += 3; + } else if ((buf[i] & 0xf8) === 0xf0) { + // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + if ( + i + 3 >= len || + (buf[i + 1] & 0xc0) !== 0x80 || + (buf[i + 2] & 0xc0) !== 0x80 || + (buf[i + 3] & 0xc0) !== 0x80 || + (buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || // Overlong + (buf[i] === 0xf4 && buf[i + 1] > 0x8f) || + buf[i] > 0xf4 // > U+10FFFF + ) { + return false; + } + + i += 4; + } else { + return false; + } + } + + return true; +} + +try { + let isValidUTF8 = __nccwpck_require__(70751); + + /* istanbul ignore if */ + if (typeof isValidUTF8 === 'object') { + isValidUTF8 = isValidUTF8.Validation.isValidUTF8; // utf-8-validate@<3.0.0 + } + + module.exports = { + isValidStatusCode, + isValidUTF8(buf) { + return buf.length < 150 ? _isValidUTF8(buf) : isValidUTF8(buf); + } + }; +} catch (e) /* istanbul ignore next */ { + module.exports = { + isValidStatusCode, + isValidUTF8: _isValidUTF8 + }; +} + + +/***/ }), + +/***/ 67691: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const EventEmitter = __nccwpck_require__(82361); +const { createHash } = __nccwpck_require__(6113); +const { createServer, STATUS_CODES } = __nccwpck_require__(13685); + +const PerMessageDeflate = __nccwpck_require__(98841); +const WebSocket = __nccwpck_require__(71608); +const { format, parse } = __nccwpck_require__(813); +const { GUID, kWebSocket } = __nccwpck_require__(17967); + +const keyRegex = /^[+/0-9A-Za-z]{22}==$/; + +/** + * Class representing a WebSocket server. + * + * @extends EventEmitter + */ +class WebSocketServer extends EventEmitter { + /** + * Create a `WebSocketServer` instance. + * + * @param {Object} options Configuration options + * @param {Number} [options.backlog=511] The maximum length of the queue of + * pending connections + * @param {Boolean} [options.clientTracking=true] Specifies whether or not to + * track clients + * @param {Function} [options.handleProtocols] A hook to handle protocols + * @param {String} [options.host] The hostname where to bind the server + * @param {Number} [options.maxPayload=104857600] The maximum allowed message + * size + * @param {Boolean} [options.noServer=false] Enable no server mode + * @param {String} [options.path] Accept only connections matching this path + * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable + * permessage-deflate + * @param {Number} [options.port] The port where to bind the server + * @param {http.Server} [options.server] A pre-created HTTP/S server to use + * @param {Function} [options.verifyClient] A hook to reject connections + * @param {Function} [callback] A listener for the `listening` event + */ + constructor(options, callback) { + super(); + + options = { + maxPayload: 100 * 1024 * 1024, + perMessageDeflate: false, + handleProtocols: null, + clientTracking: true, + verifyClient: null, + noServer: false, + backlog: null, // use default (511 as implemented in net.js) + server: null, + host: null, + path: null, + port: null, + ...options + }; + + if (options.port == null && !options.server && !options.noServer) { + throw new TypeError( + 'One of the "port", "server", or "noServer" options must be specified' + ); + } + + if (options.port != null) { + this._server = createServer((req, res) => { + const body = STATUS_CODES[426]; + + res.writeHead(426, { + 'Content-Length': body.length, + 'Content-Type': 'text/plain' + }); + res.end(body); + }); + this._server.listen( + options.port, + options.host, + options.backlog, + callback + ); + } else if (options.server) { + this._server = options.server; + } + + if (this._server) { + const emitConnection = this.emit.bind(this, 'connection'); + + this._removeListeners = addListeners(this._server, { + listening: this.emit.bind(this, 'listening'), + error: this.emit.bind(this, 'error'), + upgrade: (req, socket, head) => { + this.handleUpgrade(req, socket, head, emitConnection); + } + }); + } + + if (options.perMessageDeflate === true) options.perMessageDeflate = {}; + if (options.clientTracking) this.clients = new Set(); + this.options = options; + } + + /** + * Returns the bound address, the address family name, and port of the server + * as reported by the operating system if listening on an IP socket. + * If the server is listening on a pipe or UNIX domain socket, the name is + * returned as a string. + * + * @return {(Object|String|null)} The address of the server + * @public + */ + address() { + if (this.options.noServer) { + throw new Error('The server is operating in "noServer" mode'); + } + + if (!this._server) return null; + return this._server.address(); + } + + /** + * Close the server. + * + * @param {Function} [cb] Callback + * @public + */ + close(cb) { + if (cb) this.once('close', cb); + + // + // Terminate all associated clients. + // + if (this.clients) { + for (const client of this.clients) client.terminate(); + } + + const server = this._server; + + if (server) { + this._removeListeners(); + this._removeListeners = this._server = null; + + // + // Close the http server if it was internally created. + // + if (this.options.port != null) { + server.close(() => this.emit('close')); + return; + } + } + + process.nextTick(emitClose, this); + } + + /** + * See if a given request should be handled by this server instance. + * + * @param {http.IncomingMessage} req Request object to inspect + * @return {Boolean} `true` if the request is valid, else `false` + * @public + */ + shouldHandle(req) { + if (this.options.path) { + const index = req.url.indexOf('?'); + const pathname = index !== -1 ? req.url.slice(0, index) : req.url; + + if (pathname !== this.options.path) return false; + } + + return true; + } + + /** + * Handle a HTTP Upgrade request. + * + * @param {http.IncomingMessage} req The request object + * @param {net.Socket} socket The network socket between the server and client + * @param {Buffer} head The first packet of the upgraded stream + * @param {Function} cb Callback + * @public + */ + handleUpgrade(req, socket, head, cb) { + socket.on('error', socketOnError); + + const key = + req.headers['sec-websocket-key'] !== undefined + ? req.headers['sec-websocket-key'].trim() + : false; + const version = +req.headers['sec-websocket-version']; + const extensions = {}; + + if ( + req.method !== 'GET' || + req.headers.upgrade.toLowerCase() !== 'websocket' || + !key || + !keyRegex.test(key) || + (version !== 8 && version !== 13) || + !this.shouldHandle(req) + ) { + return abortHandshake(socket, 400); + } + + if (this.options.perMessageDeflate) { + const perMessageDeflate = new PerMessageDeflate( + this.options.perMessageDeflate, + true, + this.options.maxPayload + ); + + try { + const offers = parse(req.headers['sec-websocket-extensions']); + + if (offers[PerMessageDeflate.extensionName]) { + perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]); + extensions[PerMessageDeflate.extensionName] = perMessageDeflate; + } + } catch (err) { + return abortHandshake(socket, 400); + } + } + + // + // Optionally call external client verification handler. + // + if (this.options.verifyClient) { + const info = { + origin: + req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`], + secure: !!(req.socket.authorized || req.socket.encrypted), + req + }; + + if (this.options.verifyClient.length === 2) { + this.options.verifyClient(info, (verified, code, message, headers) => { + if (!verified) { + return abortHandshake(socket, code || 401, message, headers); + } + + this.completeUpgrade(key, extensions, req, socket, head, cb); + }); + return; + } + + if (!this.options.verifyClient(info)) return abortHandshake(socket, 401); + } + + this.completeUpgrade(key, extensions, req, socket, head, cb); + } + + /** + * Upgrade the connection to WebSocket. + * + * @param {String} key The value of the `Sec-WebSocket-Key` header + * @param {Object} extensions The accepted extensions + * @param {http.IncomingMessage} req The request object + * @param {net.Socket} socket The network socket between the server and client + * @param {Buffer} head The first packet of the upgraded stream + * @param {Function} cb Callback + * @throws {Error} If called more than once with the same socket + * @private + */ + completeUpgrade(key, extensions, req, socket, head, cb) { + // + // Destroy the socket if the client has already sent a FIN packet. + // + if (!socket.readable || !socket.writable) return socket.destroy(); + + if (socket[kWebSocket]) { + throw new Error( + 'server.handleUpgrade() was called more than once with the same ' + + 'socket, possibly due to a misconfiguration' + ); + } + + const digest = createHash('sha1') + .update(key + GUID) + .digest('base64'); + + const headers = [ + 'HTTP/1.1 101 Switching Protocols', + 'Upgrade: websocket', + 'Connection: Upgrade', + `Sec-WebSocket-Accept: ${digest}` + ]; + + const ws = new WebSocket(null); + let protocol = req.headers['sec-websocket-protocol']; + + if (protocol) { + protocol = protocol.split(',').map(trim); + + // + // Optionally call external protocol selection handler. + // + if (this.options.handleProtocols) { + protocol = this.options.handleProtocols(protocol, req); + } else { + protocol = protocol[0]; + } + + if (protocol) { + headers.push(`Sec-WebSocket-Protocol: ${protocol}`); + ws._protocol = protocol; + } + } + + if (extensions[PerMessageDeflate.extensionName]) { + const params = extensions[PerMessageDeflate.extensionName].params; + const value = format({ + [PerMessageDeflate.extensionName]: [params] + }); + headers.push(`Sec-WebSocket-Extensions: ${value}`); + ws._extensions = extensions; + } + + // + // Allow external modification/inspection of handshake headers. + // + this.emit('headers', headers, req); + + socket.write(headers.concat('\r\n').join('\r\n')); + socket.removeListener('error', socketOnError); + + ws.setSocket(socket, head, this.options.maxPayload); + + if (this.clients) { + this.clients.add(ws); + ws.on('close', () => this.clients.delete(ws)); + } + + cb(ws, req); + } +} + +module.exports = WebSocketServer; + +/** + * Add event listeners on an `EventEmitter` using a map of + * pairs. + * + * @param {EventEmitter} server The event emitter + * @param {Object.} map The listeners to add + * @return {Function} A function that will remove the added listeners when + * called + * @private + */ +function addListeners(server, map) { + for (const event of Object.keys(map)) server.on(event, map[event]); + + return function removeListeners() { + for (const event of Object.keys(map)) { + server.removeListener(event, map[event]); + } + }; +} + +/** + * Emit a `'close'` event on an `EventEmitter`. + * + * @param {EventEmitter} server The event emitter + * @private + */ +function emitClose(server) { + server.emit('close'); +} + +/** + * Handle premature socket errors. + * + * @private + */ +function socketOnError() { + this.destroy(); +} + +/** + * Close the connection when preconditions are not fulfilled. + * + * @param {net.Socket} socket The socket of the upgrade request + * @param {Number} code The HTTP response status code + * @param {String} [message] The HTTP response body + * @param {Object} [headers] Additional HTTP response headers + * @private + */ +function abortHandshake(socket, code, message, headers) { + if (socket.writable) { + message = message || STATUS_CODES[code]; + headers = { + Connection: 'close', + 'Content-Type': 'text/html', + 'Content-Length': Buffer.byteLength(message), + ...headers + }; + + socket.write( + `HTTP/1.1 ${code} ${STATUS_CODES[code]}\r\n` + + Object.keys(headers) + .map((h) => `${h}: ${headers[h]}`) + .join('\r\n') + + '\r\n\r\n' + + message + ); + } + + socket.removeListener('error', socketOnError); + socket.destroy(); +} + +/** + * Remove whitespace characters from both ends of a string. + * + * @param {String} str The string + * @return {String} A new string representing `str` stripped of whitespace + * characters from both its beginning and end + * @private + */ +function trim(str) { + return str.trim(); +} + + +/***/ }), + +/***/ 71608: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const EventEmitter = __nccwpck_require__(82361); +const https = __nccwpck_require__(95687); +const http = __nccwpck_require__(13685); +const net = __nccwpck_require__(41808); +const tls = __nccwpck_require__(24404); +const { randomBytes, createHash } = __nccwpck_require__(6113); +const { URL } = __nccwpck_require__(57310); + +const PerMessageDeflate = __nccwpck_require__(98841); +const Receiver = __nccwpck_require__(63501); +const Sender = __nccwpck_require__(90150); +const { + BINARY_TYPES, + EMPTY_BUFFER, + GUID, + kStatusCode, + kWebSocket, + NOOP +} = __nccwpck_require__(17967); +const { addEventListener, removeEventListener } = __nccwpck_require__(65679); +const { format, parse } = __nccwpck_require__(813); +const { toBuffer } = __nccwpck_require__(67716); + +const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED']; +const protocolVersions = [8, 13]; +const closeTimeout = 30 * 1000; + +/** + * Class representing a WebSocket. + * + * @extends EventEmitter + */ +class WebSocket extends EventEmitter { + /** + * Create a new `WebSocket`. + * + * @param {(String|url.URL)} address The URL to which to connect + * @param {(String|String[])} [protocols] The subprotocols + * @param {Object} [options] Connection options + */ + constructor(address, protocols, options) { + super(); + + this._binaryType = BINARY_TYPES[0]; + this._closeCode = 1006; + this._closeFrameReceived = false; + this._closeFrameSent = false; + this._closeMessage = ''; + this._closeTimer = null; + this._extensions = {}; + this._protocol = ''; + this._readyState = WebSocket.CONNECTING; + this._receiver = null; + this._sender = null; + this._socket = null; + + if (address !== null) { + this._bufferedAmount = 0; + this._isServer = false; + this._redirects = 0; + + if (Array.isArray(protocols)) { + protocols = protocols.join(', '); + } else if (typeof protocols === 'object' && protocols !== null) { + options = protocols; + protocols = undefined; + } + + initAsClient(this, address, protocols, options); + } else { + this._isServer = true; + } + } + + /** + * This deviates from the WHATWG interface since ws doesn't support the + * required default "blob" type (instead we define a custom "nodebuffer" + * type). + * + * @type {String} + */ + get binaryType() { + return this._binaryType; + } + + set binaryType(type) { + if (!BINARY_TYPES.includes(type)) return; + + this._binaryType = type; + + // + // Allow to change `binaryType` on the fly. + // + if (this._receiver) this._receiver._binaryType = type; + } + + /** + * @type {Number} + */ + get bufferedAmount() { + if (!this._socket) return this._bufferedAmount; + + return this._socket._writableState.length + this._sender._bufferedBytes; + } + + /** + * @type {String} + */ + get extensions() { + return Object.keys(this._extensions).join(); + } + + /** + * @type {String} + */ + get protocol() { + return this._protocol; + } + + /** + * @type {Number} + */ + get readyState() { + return this._readyState; + } + + /** + * @type {String} + */ + get url() { + return this._url; + } + + /** + * Set up the socket and the internal resources. + * + * @param {net.Socket} socket The network socket between the server and client + * @param {Buffer} head The first packet of the upgraded stream + * @param {Number} [maxPayload=0] The maximum allowed message size + * @private + */ + setSocket(socket, head, maxPayload) { + const receiver = new Receiver( + this.binaryType, + this._extensions, + this._isServer, + maxPayload + ); + + this._sender = new Sender(socket, this._extensions); + this._receiver = receiver; + this._socket = socket; + + receiver[kWebSocket] = this; + socket[kWebSocket] = this; + + receiver.on('conclude', receiverOnConclude); + receiver.on('drain', receiverOnDrain); + receiver.on('error', receiverOnError); + receiver.on('message', receiverOnMessage); + receiver.on('ping', receiverOnPing); + receiver.on('pong', receiverOnPong); + + socket.setTimeout(0); + socket.setNoDelay(); + + if (head.length > 0) socket.unshift(head); + + socket.on('close', socketOnClose); + socket.on('data', socketOnData); + socket.on('end', socketOnEnd); + socket.on('error', socketOnError); + + this._readyState = WebSocket.OPEN; + this.emit('open'); + } + + /** + * Emit the `'close'` event. + * + * @private + */ + emitClose() { + if (!this._socket) { + this._readyState = WebSocket.CLOSED; + this.emit('close', this._closeCode, this._closeMessage); + return; + } + + if (this._extensions[PerMessageDeflate.extensionName]) { + this._extensions[PerMessageDeflate.extensionName].cleanup(); + } + + this._receiver.removeAllListeners(); + this._readyState = WebSocket.CLOSED; + this.emit('close', this._closeCode, this._closeMessage); + } + + /** + * Start a closing handshake. + * + * +----------+ +-----------+ +----------+ + * - - -|ws.close()|-->|close frame|-->|ws.close()|- - - + * | +----------+ +-----------+ +----------+ | + * +----------+ +-----------+ | + * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING + * +----------+ +-----------+ | + * | | | +---+ | + * +------------------------+-->|fin| - - - - + * | +---+ | +---+ + * - - - - -|fin|<---------------------+ + * +---+ + * + * @param {Number} [code] Status code explaining why the connection is closing + * @param {String} [data] A string explaining why the connection is closing + * @public + */ + close(code, data) { + if (this.readyState === WebSocket.CLOSED) return; + if (this.readyState === WebSocket.CONNECTING) { + const msg = 'WebSocket was closed before the connection was established'; + return abortHandshake(this, this._req, msg); + } + + if (this.readyState === WebSocket.CLOSING) { + if (this._closeFrameSent && this._closeFrameReceived) this._socket.end(); + return; + } + + this._readyState = WebSocket.CLOSING; + this._sender.close(code, data, !this._isServer, (err) => { + // + // This error is handled by the `'error'` listener on the socket. We only + // want to know if the close frame has been sent here. + // + if (err) return; + + this._closeFrameSent = true; + if (this._closeFrameReceived) this._socket.end(); + }); + + // + // Specify a timeout for the closing handshake to complete. + // + this._closeTimer = setTimeout( + this._socket.destroy.bind(this._socket), + closeTimeout + ); + } + + /** + * Send a ping. + * + * @param {*} [data] The data to send + * @param {Boolean} [mask] Indicates whether or not to mask `data` + * @param {Function} [cb] Callback which is executed when the ping is sent + * @public + */ + ping(data, mask, cb) { + if (this.readyState === WebSocket.CONNECTING) { + throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); + } + + if (typeof data === 'function') { + cb = data; + data = mask = undefined; + } else if (typeof mask === 'function') { + cb = mask; + mask = undefined; + } + + if (typeof data === 'number') data = data.toString(); + + if (this.readyState !== WebSocket.OPEN) { + sendAfterClose(this, data, cb); + return; + } + + if (mask === undefined) mask = !this._isServer; + this._sender.ping(data || EMPTY_BUFFER, mask, cb); + } + + /** + * Send a pong. + * + * @param {*} [data] The data to send + * @param {Boolean} [mask] Indicates whether or not to mask `data` + * @param {Function} [cb] Callback which is executed when the pong is sent + * @public + */ + pong(data, mask, cb) { + if (this.readyState === WebSocket.CONNECTING) { + throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); + } + + if (typeof data === 'function') { + cb = data; + data = mask = undefined; + } else if (typeof mask === 'function') { + cb = mask; + mask = undefined; + } + + if (typeof data === 'number') data = data.toString(); + + if (this.readyState !== WebSocket.OPEN) { + sendAfterClose(this, data, cb); + return; + } + + if (mask === undefined) mask = !this._isServer; + this._sender.pong(data || EMPTY_BUFFER, mask, cb); + } + + /** + * Send a data message. + * + * @param {*} data The message to send + * @param {Object} [options] Options object + * @param {Boolean} [options.compress] Specifies whether or not to compress + * `data` + * @param {Boolean} [options.binary] Specifies whether `data` is binary or + * text + * @param {Boolean} [options.fin=true] Specifies whether the fragment is the + * last one + * @param {Boolean} [options.mask] Specifies whether or not to mask `data` + * @param {Function} [cb] Callback which is executed when data is written out + * @public + */ + send(data, options, cb) { + if (this.readyState === WebSocket.CONNECTING) { + throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); + } + + if (typeof options === 'function') { + cb = options; + options = {}; + } + + if (typeof data === 'number') data = data.toString(); + + if (this.readyState !== WebSocket.OPEN) { + sendAfterClose(this, data, cb); + return; + } + + const opts = { + binary: typeof data !== 'string', + mask: !this._isServer, + compress: true, + fin: true, + ...options + }; + + if (!this._extensions[PerMessageDeflate.extensionName]) { + opts.compress = false; + } + + this._sender.send(data || EMPTY_BUFFER, opts, cb); + } + + /** + * Forcibly close the connection. + * + * @public + */ + terminate() { + if (this.readyState === WebSocket.CLOSED) return; + if (this.readyState === WebSocket.CONNECTING) { + const msg = 'WebSocket was closed before the connection was established'; + return abortHandshake(this, this._req, msg); + } + + if (this._socket) { + this._readyState = WebSocket.CLOSING; + this._socket.destroy(); + } + } +} + +readyStates.forEach((readyState, i) => { + const descriptor = { enumerable: true, value: i }; + + Object.defineProperty(WebSocket.prototype, readyState, descriptor); + Object.defineProperty(WebSocket, readyState, descriptor); +}); + +[ + 'binaryType', + 'bufferedAmount', + 'extensions', + 'protocol', + 'readyState', + 'url' +].forEach((property) => { + Object.defineProperty(WebSocket.prototype, property, { enumerable: true }); +}); + +// +// Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes. +// See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface +// +['open', 'error', 'close', 'message'].forEach((method) => { + Object.defineProperty(WebSocket.prototype, `on${method}`, { + configurable: true, + enumerable: true, + /** + * Return the listener of the event. + * + * @return {(Function|undefined)} The event listener or `undefined` + * @public + */ + get() { + const listeners = this.listeners(method); + for (let i = 0; i < listeners.length; i++) { + if (listeners[i]._listener) return listeners[i]._listener; + } + + return undefined; + }, + /** + * Add a listener for the event. + * + * @param {Function} listener The listener to add + * @public + */ + set(listener) { + const listeners = this.listeners(method); + for (let i = 0; i < listeners.length; i++) { + // + // Remove only the listeners added via `addEventListener`. + // + if (listeners[i]._listener) this.removeListener(method, listeners[i]); + } + this.addEventListener(method, listener); + } + }); +}); + +WebSocket.prototype.addEventListener = addEventListener; +WebSocket.prototype.removeEventListener = removeEventListener; + +module.exports = WebSocket; + +/** + * Initialize a WebSocket client. + * + * @param {WebSocket} websocket The client to initialize + * @param {(String|url.URL)} address The URL to which to connect + * @param {String} [protocols] The subprotocols + * @param {Object} [options] Connection options + * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable + * permessage-deflate + * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the + * handshake request + * @param {Number} [options.protocolVersion=13] Value of the + * `Sec-WebSocket-Version` header + * @param {String} [options.origin] Value of the `Origin` or + * `Sec-WebSocket-Origin` header + * @param {Number} [options.maxPayload=104857600] The maximum allowed message + * size + * @param {Boolean} [options.followRedirects=false] Whether or not to follow + * redirects + * @param {Number} [options.maxRedirects=10] The maximum number of redirects + * allowed + * @private + */ +function initAsClient(websocket, address, protocols, options) { + const opts = { + protocolVersion: protocolVersions[1], + maxPayload: 100 * 1024 * 1024, + perMessageDeflate: true, + followRedirects: false, + maxRedirects: 10, + ...options, + createConnection: undefined, + socketPath: undefined, + hostname: undefined, + protocol: undefined, + timeout: undefined, + method: undefined, + host: undefined, + path: undefined, + port: undefined + }; + + if (!protocolVersions.includes(opts.protocolVersion)) { + throw new RangeError( + `Unsupported protocol version: ${opts.protocolVersion} ` + + `(supported versions: ${protocolVersions.join(', ')})` + ); + } + + let parsedUrl; + + if (address instanceof URL) { + parsedUrl = address; + websocket._url = address.href; + } else { + parsedUrl = new URL(address); + websocket._url = address; + } + + const isUnixSocket = parsedUrl.protocol === 'ws+unix:'; + + if (!parsedUrl.host && (!isUnixSocket || !parsedUrl.pathname)) { + throw new Error(`Invalid URL: ${websocket.url}`); + } + + const isSecure = + parsedUrl.protocol === 'wss:' || parsedUrl.protocol === 'https:'; + const defaultPort = isSecure ? 443 : 80; + const key = randomBytes(16).toString('base64'); + const get = isSecure ? https.get : http.get; + let perMessageDeflate; + + opts.createConnection = isSecure ? tlsConnect : netConnect; + opts.defaultPort = opts.defaultPort || defaultPort; + opts.port = parsedUrl.port || defaultPort; + opts.host = parsedUrl.hostname.startsWith('[') + ? parsedUrl.hostname.slice(1, -1) + : parsedUrl.hostname; + opts.headers = { + 'Sec-WebSocket-Version': opts.protocolVersion, + 'Sec-WebSocket-Key': key, + Connection: 'Upgrade', + Upgrade: 'websocket', + ...opts.headers + }; + opts.path = parsedUrl.pathname + parsedUrl.search; + opts.timeout = opts.handshakeTimeout; + + if (opts.perMessageDeflate) { + perMessageDeflate = new PerMessageDeflate( + opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, + false, + opts.maxPayload + ); + opts.headers['Sec-WebSocket-Extensions'] = format({ + [PerMessageDeflate.extensionName]: perMessageDeflate.offer() + }); + } + if (protocols) { + opts.headers['Sec-WebSocket-Protocol'] = protocols; + } + if (opts.origin) { + if (opts.protocolVersion < 13) { + opts.headers['Sec-WebSocket-Origin'] = opts.origin; + } else { + opts.headers.Origin = opts.origin; + } + } + if (parsedUrl.username || parsedUrl.password) { + opts.auth = `${parsedUrl.username}:${parsedUrl.password}`; + } + + if (isUnixSocket) { + const parts = opts.path.split(':'); + + opts.socketPath = parts[0]; + opts.path = parts[1]; + } + + let req = (websocket._req = get(opts)); + + if (opts.timeout) { + req.on('timeout', () => { + abortHandshake(websocket, req, 'Opening handshake has timed out'); + }); + } + + req.on('error', (err) => { + if (req === null || req.aborted) return; + + req = websocket._req = null; + websocket._readyState = WebSocket.CLOSING; + websocket.emit('error', err); + websocket.emitClose(); + }); + + req.on('response', (res) => { + const location = res.headers.location; + const statusCode = res.statusCode; + + if ( + location && + opts.followRedirects && + statusCode >= 300 && + statusCode < 400 + ) { + if (++websocket._redirects > opts.maxRedirects) { + abortHandshake(websocket, req, 'Maximum redirects exceeded'); + return; + } + + req.abort(); + + const addr = new URL(location, address); + + initAsClient(websocket, addr, protocols, options); + } else if (!websocket.emit('unexpected-response', req, res)) { + abortHandshake( + websocket, + req, + `Unexpected server response: ${res.statusCode}` + ); + } + }); + + req.on('upgrade', (res, socket, head) => { + websocket.emit('upgrade', res); + + // + // The user may have closed the connection from a listener of the `upgrade` + // event. + // + if (websocket.readyState !== WebSocket.CONNECTING) return; + + req = websocket._req = null; + + const digest = createHash('sha1') + .update(key + GUID) + .digest('base64'); + + if (res.headers['sec-websocket-accept'] !== digest) { + abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header'); + return; + } + + const serverProt = res.headers['sec-websocket-protocol']; + const protList = (protocols || '').split(/, */); + let protError; + + if (!protocols && serverProt) { + protError = 'Server sent a subprotocol but none was requested'; + } else if (protocols && !serverProt) { + protError = 'Server sent no subprotocol'; + } else if (serverProt && !protList.includes(serverProt)) { + protError = 'Server sent an invalid subprotocol'; + } + + if (protError) { + abortHandshake(websocket, socket, protError); + return; + } + + if (serverProt) websocket._protocol = serverProt; + + if (perMessageDeflate) { + try { + const extensions = parse(res.headers['sec-websocket-extensions']); + + if (extensions[PerMessageDeflate.extensionName]) { + perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]); + websocket._extensions[PerMessageDeflate.extensionName] = + perMessageDeflate; + } + } catch (err) { + abortHandshake( + websocket, + socket, + 'Invalid Sec-WebSocket-Extensions header' + ); + return; + } + } + + websocket.setSocket(socket, head, opts.maxPayload); + }); +} + +/** + * Create a `net.Socket` and initiate a connection. + * + * @param {Object} options Connection options + * @return {net.Socket} The newly created socket used to start the connection + * @private + */ +function netConnect(options) { + options.path = options.socketPath; + return net.connect(options); +} + +/** + * Create a `tls.TLSSocket` and initiate a connection. + * + * @param {Object} options Connection options + * @return {tls.TLSSocket} The newly created socket used to start the connection + * @private + */ +function tlsConnect(options) { + options.path = undefined; + + if (!options.servername && options.servername !== '') { + options.servername = net.isIP(options.host) ? '' : options.host; + } + + return tls.connect(options); +} + +/** + * Abort the handshake and emit an error. + * + * @param {WebSocket} websocket The WebSocket instance + * @param {(http.ClientRequest|net.Socket)} stream The request to abort or the + * socket to destroy + * @param {String} message The error message + * @private + */ +function abortHandshake(websocket, stream, message) { + websocket._readyState = WebSocket.CLOSING; + + const err = new Error(message); + Error.captureStackTrace(err, abortHandshake); + + if (stream.setHeader) { + stream.abort(); + + if (stream.socket && !stream.socket.destroyed) { + // + // On Node.js >= 14.3.0 `request.abort()` does not destroy the socket if + // called after the request completed. See + // https://github.com/websockets/ws/issues/1869. + // + stream.socket.destroy(); + } + + stream.once('abort', websocket.emitClose.bind(websocket)); + websocket.emit('error', err); + } else { + stream.destroy(err); + stream.once('error', websocket.emit.bind(websocket, 'error')); + stream.once('close', websocket.emitClose.bind(websocket)); + } +} + +/** + * Handle cases where the `ping()`, `pong()`, or `send()` methods are called + * when the `readyState` attribute is `CLOSING` or `CLOSED`. + * + * @param {WebSocket} websocket The WebSocket instance + * @param {*} [data] The data to send + * @param {Function} [cb] Callback + * @private + */ +function sendAfterClose(websocket, data, cb) { + if (data) { + const length = toBuffer(data).length; + + // + // The `_bufferedAmount` property is used only when the peer is a client and + // the opening handshake fails. Under these circumstances, in fact, the + // `setSocket()` method is not called, so the `_socket` and `_sender` + // properties are set to `null`. + // + if (websocket._socket) websocket._sender._bufferedBytes += length; + else websocket._bufferedAmount += length; + } + + if (cb) { + const err = new Error( + `WebSocket is not open: readyState ${websocket.readyState} ` + + `(${readyStates[websocket.readyState]})` + ); + cb(err); + } +} + +/** + * The listener of the `Receiver` `'conclude'` event. + * + * @param {Number} code The status code + * @param {String} reason The reason for closing + * @private + */ +function receiverOnConclude(code, reason) { + const websocket = this[kWebSocket]; + + websocket._socket.removeListener('data', socketOnData); + websocket._socket.resume(); + + websocket._closeFrameReceived = true; + websocket._closeMessage = reason; + websocket._closeCode = code; + + if (code === 1005) websocket.close(); + else websocket.close(code, reason); +} + +/** + * The listener of the `Receiver` `'drain'` event. + * + * @private + */ +function receiverOnDrain() { + this[kWebSocket]._socket.resume(); +} + +/** + * The listener of the `Receiver` `'error'` event. + * + * @param {(RangeError|Error)} err The emitted error + * @private + */ +function receiverOnError(err) { + const websocket = this[kWebSocket]; + + websocket._socket.removeListener('data', socketOnData); + + websocket._readyState = WebSocket.CLOSING; + websocket._closeCode = err[kStatusCode]; + websocket.emit('error', err); + websocket._socket.destroy(); +} + +/** + * The listener of the `Receiver` `'finish'` event. + * + * @private + */ +function receiverOnFinish() { + this[kWebSocket].emitClose(); +} + +/** + * The listener of the `Receiver` `'message'` event. + * + * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The message + * @private + */ +function receiverOnMessage(data) { + this[kWebSocket].emit('message', data); +} + +/** + * The listener of the `Receiver` `'ping'` event. + * + * @param {Buffer} data The data included in the ping frame + * @private + */ +function receiverOnPing(data) { + const websocket = this[kWebSocket]; + + websocket.pong(data, !websocket._isServer, NOOP); + websocket.emit('ping', data); +} + +/** + * The listener of the `Receiver` `'pong'` event. + * + * @param {Buffer} data The data included in the pong frame + * @private + */ +function receiverOnPong(data) { + this[kWebSocket].emit('pong', data); +} + +/** + * The listener of the `net.Socket` `'close'` event. + * + * @private + */ +function socketOnClose() { + const websocket = this[kWebSocket]; + + this.removeListener('close', socketOnClose); + this.removeListener('end', socketOnEnd); + + websocket._readyState = WebSocket.CLOSING; + + // + // The close frame might not have been received or the `'end'` event emitted, + // for example, if the socket was destroyed due to an error. Ensure that the + // `receiver` stream is closed after writing any remaining buffered data to + // it. If the readable side of the socket is in flowing mode then there is no + // buffered data as everything has been already written and `readable.read()` + // will return `null`. If instead, the socket is paused, any possible buffered + // data will be read as a single chunk and emitted synchronously in a single + // `'data'` event. + // + websocket._socket.read(); + websocket._receiver.end(); + + this.removeListener('data', socketOnData); + this[kWebSocket] = undefined; + + clearTimeout(websocket._closeTimer); + + if ( + websocket._receiver._writableState.finished || + websocket._receiver._writableState.errorEmitted + ) { + websocket.emitClose(); + } else { + websocket._receiver.on('error', receiverOnFinish); + websocket._receiver.on('finish', receiverOnFinish); + } +} + +/** + * The listener of the `net.Socket` `'data'` event. + * + * @param {Buffer} chunk A chunk of data + * @private + */ +function socketOnData(chunk) { + if (!this[kWebSocket]._receiver.write(chunk)) { + this.pause(); + } +} + +/** + * The listener of the `net.Socket` `'end'` event. + * + * @private + */ +function socketOnEnd() { + const websocket = this[kWebSocket]; + + websocket._readyState = WebSocket.CLOSING; + websocket._receiver.end(); + this.end(); +} + +/** + * The listener of the `net.Socket` `'error'` event. + * + * @private + */ +function socketOnError() { + const websocket = this[kWebSocket]; + + this.removeListener('error', socketOnError); + this.on('error', NOOP); + + if (websocket) { + websocket._readyState = WebSocket.CLOSING; + this.destroy(); + } +} + + +/***/ }), + +/***/ 50967: +/***/ ((module) => { + +"use strict"; + +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} + + +/***/ }), + +/***/ 56128: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + __nccwpck_require__(50967)(Yallist) +} catch (er) {} + + +/***/ }), + +/***/ 20034: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildSecret = exports.checkClusterContext = void 0; +const core = __nccwpck_require__(26024); +const client_node_1 = __nccwpck_require__(38707); +function checkClusterContext() { + if (!process.env["KUBECONFIG"]) { + throw new Error('Cluster context not set. Use k8s-set-context/aks-set-context action to set cluster context'); + } +} +exports.checkClusterContext = checkClusterContext; +function buildSecret(secretName, namespace) { + return __awaiter(this, void 0, void 0, function* () { + // The secret type for the new secret + const secretType = core.getInput('secret-type', { required: true }); + const metaData = { + name: secretName, + namespace: namespace + }; + // The serialized form of the secret data is a base64 encoded string + let data = {}; + if (core.getInput('data')) { + core.debug(`loading 'data' field`); + data = JSON.parse(core.getInput('data')); + } + // The plaintext form of the secret data + let stringData = {}; + if (core.getInput('string-data')) { + core.debug(`loading 'string-data' field`); + stringData = JSON.parse(core.getInput('string-data')); + } + // Create secret object for passing to the api + core.debug(`creating V1Secret`); + const secret = { + apiVersion: 'v1', + type: secretType, + data: data, + stringData: stringData, + metadata: metaData + }; + return secret; + }); +} +exports.buildSecret = buildSecret; +function run() { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + checkClusterContext(); + // Create kubeconfig and load values from 'KUBECONFIG' environment variable + const kc = new client_node_1.KubeConfig(); + core.debug(`loading kubeconfig from defaults...`); + kc.loadFromDefault(); + const api = kc.makeApiClient(client_node_1.CoreV1Api); + // The name of the new secret + const secretName = core.getInput('secret-name', { required: true }); + // The namespace in which to place the secret + const namespace = core.getInput('namespace') || 'default'; + // Delete if exists + let deleteSecretResponse; + try { + deleteSecretResponse = yield api.deleteNamespacedSecret(secretName, namespace); + } + catch ({ response }) { + core.warning(`Failed to delete secret with statusCode: ${response === null || response === void 0 ? void 0 : response.statusCode}`); + core.warning((_a = response === null || response === void 0 ? void 0 : response.body) === null || _a === void 0 ? void 0 : _a.metadata); + } + core.info('Deleting secret:'); + core.info((_b = deleteSecretResponse === null || deleteSecretResponse === void 0 ? void 0 : deleteSecretResponse.response) === null || _b === void 0 ? void 0 : _b.body); + const secret = yield buildSecret(secretName, namespace); + let result; + try { + result = yield api.createNamespacedSecret(namespace, secret); + } + catch ({ response }) { + core.error(`Failed to create secret with statusCode: ${response === null || response === void 0 ? void 0 : response.statusCode}`); + core.error(response === null || response === void 0 ? void 0 : response.body); + } + const response = result === null || result === void 0 ? void 0 : result.response; + core.debug((_c = response === null || response === void 0 ? void 0 : response.body) === null || _c === void 0 ? void 0 : _c.metadata); + }); +} +run().catch(core.setFailed); + + +/***/ }), + +/***/ 64084: +/***/ ((module) => { + +module.exports = eval("require")("bufferutil"); + + +/***/ }), + +/***/ 70751: +/***/ ((module) => { + +module.exports = eval("require")("utf-8-validate"); + + +/***/ }), + +/***/ 39491: +/***/ ((module) => { + +"use strict"; +module.exports = require("assert"); + +/***/ }), + +/***/ 14300: +/***/ ((module) => { + +"use strict"; +module.exports = require("buffer"); + +/***/ }), + +/***/ 32081: +/***/ ((module) => { + +"use strict"; +module.exports = require("child_process"); + +/***/ }), + +/***/ 6113: +/***/ ((module) => { + +"use strict"; +module.exports = require("crypto"); + +/***/ }), + +/***/ 17578: +/***/ ((module) => { + +"use strict"; +module.exports = require("dns"); + +/***/ }), + +/***/ 82361: +/***/ ((module) => { + +"use strict"; +module.exports = require("events"); + +/***/ }), + +/***/ 57147: +/***/ ((module) => { + +"use strict"; +module.exports = require("fs"); + +/***/ }), + +/***/ 13685: +/***/ ((module) => { + +"use strict"; +module.exports = require("http"); + +/***/ }), + +/***/ 85158: +/***/ ((module) => { + +"use strict"; +module.exports = require("http2"); + +/***/ }), + +/***/ 95687: +/***/ ((module) => { + +"use strict"; +module.exports = require("https"); + +/***/ }), + +/***/ 41808: +/***/ ((module) => { + +"use strict"; +module.exports = require("net"); + +/***/ }), + +/***/ 22037: +/***/ ((module) => { + +"use strict"; +module.exports = require("os"); + +/***/ }), + +/***/ 71017: +/***/ ((module) => { + +"use strict"; +module.exports = require("path"); + +/***/ }), + +/***/ 85477: +/***/ ((module) => { + +"use strict"; +module.exports = require("punycode"); + +/***/ }), + +/***/ 63477: +/***/ ((module) => { + +"use strict"; +module.exports = require("querystring"); + +/***/ }), + +/***/ 12781: +/***/ ((module) => { + +"use strict"; +module.exports = require("stream"); + +/***/ }), + +/***/ 71576: +/***/ ((module) => { + +"use strict"; +module.exports = require("string_decoder"); + +/***/ }), + +/***/ 39512: +/***/ ((module) => { + +"use strict"; +module.exports = require("timers"); + +/***/ }), + +/***/ 24404: +/***/ ((module) => { + +"use strict"; +module.exports = require("tls"); + +/***/ }), + +/***/ 57310: +/***/ ((module) => { + +"use strict"; +module.exports = require("url"); + +/***/ }), + +/***/ 73837: +/***/ ((module) => { + +"use strict"; +module.exports = require("util"); + +/***/ }), + +/***/ 26144: +/***/ ((module) => { + +"use strict"; +module.exports = require("vm"); + +/***/ }), + +/***/ 59796: +/***/ ((module) => { + +"use strict"; +module.exports = require("zlib"); + +/***/ }), + +/***/ 44702: +/***/ ((__unused_webpack_module, exports) => { + +// Underscore.js 1.13.1 +// https://underscorejs.org +// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +// Current version. +var VERSION = '1.13.1'; + +// Establish the root object, `window` (`self`) in the browser, `global` +// on the server, or `this` in some virtual machines. We use `self` +// instead of `window` for `WebWorker` support. +var root = typeof self == 'object' && self.self === self && self || + typeof global == 'object' && global.global === global && global || + Function('return this')() || + {}; + +// Save bytes in the minified (but not gzipped) version: +var ArrayProto = Array.prototype, ObjProto = Object.prototype; +var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; + +// Create quick reference variables for speed access to core prototypes. +var push = ArrayProto.push, + slice = ArrayProto.slice, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + +// Modern feature detection. +var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined', + supportsDataView = typeof DataView !== 'undefined'; + +// All **ECMAScript 5+** native function implementations that we hope to use +// are declared here. +var nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeCreate = Object.create, + nativeIsView = supportsArrayBuffer && ArrayBuffer.isView; + +// Create references to these builtin functions because we override them. +var _isNaN = isNaN, + _isFinite = isFinite; + +// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. +var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); +var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', + 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; + +// The largest integer that can be represented exactly. +var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; + +// Some functions take a variable number of arguments, or a few expected +// arguments at the beginning and then a variable number of values to operate +// on. This helper accumulates all remaining arguments past the function’s +// argument length (or an explicit `startIndex`), into an array that becomes +// the last argument. Similar to ES6’s "rest parameter". +function restArguments(func, startIndex) { + startIndex = startIndex == null ? func.length - 1 : +startIndex; + return function() { + var length = Math.max(arguments.length - startIndex, 0), + rest = Array(length), + index = 0; + for (; index < length; index++) { + rest[index] = arguments[index + startIndex]; + } + switch (startIndex) { + case 0: return func.call(this, rest); + case 1: return func.call(this, arguments[0], rest); + case 2: return func.call(this, arguments[0], arguments[1], rest); + } + var args = Array(startIndex + 1); + for (index = 0; index < startIndex; index++) { + args[index] = arguments[index]; + } + args[startIndex] = rest; + return func.apply(this, args); + }; +} + +// Is a given variable an object? +function isObject(obj) { + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; +} + +// Is a given value equal to null? +function isNull(obj) { + return obj === null; +} + +// Is a given variable undefined? +function isUndefined(obj) { + return obj === void 0; +} + +// Is a given value a boolean? +function isBoolean(obj) { + return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; +} + +// Is a given value a DOM element? +function isElement(obj) { + return !!(obj && obj.nodeType === 1); +} + +// Internal function for creating a `toString`-based type tester. +function tagTester(name) { + var tag = '[object ' + name + ']'; + return function(obj) { + return toString.call(obj) === tag; + }; +} + +var isString = tagTester('String'); + +var isNumber = tagTester('Number'); + +var isDate = tagTester('Date'); + +var isRegExp = tagTester('RegExp'); + +var isError = tagTester('Error'); + +var isSymbol = tagTester('Symbol'); + +var isArrayBuffer = tagTester('ArrayBuffer'); + +var isFunction = tagTester('Function'); + +// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old +// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). +var nodelist = root.document && root.document.childNodes; +if ( true && typeof Int8Array != 'object' && typeof nodelist != 'function') { + isFunction = function(obj) { + return typeof obj == 'function' || false; + }; +} + +var isFunction$1 = isFunction; + +var hasObjectTag = tagTester('Object'); + +// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`. +// In IE 11, the most common among them, this problem also applies to +// `Map`, `WeakMap` and `Set`. +var hasStringTagBug = ( + supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8))) + ), + isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map)); + +var isDataView = tagTester('DataView'); + +// In IE 10 - Edge 13, we need a different heuristic +// to determine whether an object is a `DataView`. +function ie10IsDataView(obj) { + return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer); +} + +var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView); + +// Is a given value an array? +// Delegates to ECMA5's native `Array.isArray`. +var isArray = nativeIsArray || tagTester('Array'); + +// Internal function to check whether `key` is an own property name of `obj`. +function has$1(obj, key) { + return obj != null && hasOwnProperty.call(obj, key); +} + +var isArguments = tagTester('Arguments'); + +// Define a fallback version of the method in browsers (ahem, IE < 9), where +// there isn't any inspectable "Arguments" type. +(function() { + if (!isArguments(arguments)) { + isArguments = function(obj) { + return has$1(obj, 'callee'); + }; + } +}()); + +var isArguments$1 = isArguments; + +// Is a given object a finite number? +function isFinite$1(obj) { + return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj)); +} + +// Is the given value `NaN`? +function isNaN$1(obj) { + return isNumber(obj) && _isNaN(obj); +} + +// Predicate-generating function. Often useful outside of Underscore. +function constant(value) { + return function() { + return value; + }; +} + +// Common internal logic for `isArrayLike` and `isBufferLike`. +function createSizePropertyCheck(getSizeProperty) { + return function(collection) { + var sizeProperty = getSizeProperty(collection); + return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX; + } +} + +// Internal helper to generate a function to obtain property `key` from `obj`. +function shallowProperty(key) { + return function(obj) { + return obj == null ? void 0 : obj[key]; + }; +} + +// Internal helper to obtain the `byteLength` property of an object. +var getByteLength = shallowProperty('byteLength'); + +// Internal helper to determine whether we should spend extensive checks against +// `ArrayBuffer` et al. +var isBufferLike = createSizePropertyCheck(getByteLength); + +// Is a given value a typed array? +var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/; +function isTypedArray(obj) { + // `ArrayBuffer.isView` is the most future-proof, so use it when available. + // Otherwise, fall back on the above regular expression. + return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) : + isBufferLike(obj) && typedArrayPattern.test(toString.call(obj)); +} + +var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false); + +// Internal helper to obtain the `length` property of an object. +var getLength = shallowProperty('length'); + +// Internal helper to create a simple lookup structure. +// `collectNonEnumProps` used to depend on `_.contains`, but this led to +// circular imports. `emulatedSet` is a one-off solution that only works for +// arrays of strings. +function emulatedSet(keys) { + var hash = {}; + for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true; + return { + contains: function(key) { return hash[key]; }, + push: function(key) { + hash[key] = true; + return keys.push(key); + } + }; +} + +// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't +// be iterated by `for key in ...` and thus missed. Extends `keys` in place if +// needed. +function collectNonEnumProps(obj, keys) { + keys = emulatedSet(keys); + var nonEnumIdx = nonEnumerableProps.length; + var constructor = obj.constructor; + var proto = isFunction$1(constructor) && constructor.prototype || ObjProto; + + // Constructor is a special case. + var prop = 'constructor'; + if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop); + + while (nonEnumIdx--) { + prop = nonEnumerableProps[nonEnumIdx]; + if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) { + keys.push(prop); + } + } +} + +// Retrieve the names of an object's own properties. +// Delegates to **ECMAScript 5**'s native `Object.keys`. +function keys(obj) { + if (!isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); + var keys = []; + for (var key in obj) if (has$1(obj, key)) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; +} + +// Is a given array, string, or object empty? +// An "empty" object has no enumerable own-properties. +function isEmpty(obj) { + if (obj == null) return true; + // Skip the more expensive `toString`-based type checks if `obj` has no + // `.length`. + var length = getLength(obj); + if (typeof length == 'number' && ( + isArray(obj) || isString(obj) || isArguments$1(obj) + )) return length === 0; + return getLength(keys(obj)) === 0; +} + +// Returns whether an object has a given set of `key:value` pairs. +function isMatch(object, attrs) { + var _keys = keys(attrs), length = _keys.length; + if (object == null) return !length; + var obj = Object(object); + for (var i = 0; i < length; i++) { + var key = _keys[i]; + if (attrs[key] !== obj[key] || !(key in obj)) return false; + } + return true; +} + +// If Underscore is called as a function, it returns a wrapped object that can +// be used OO-style. This wrapper holds altered versions of all functions added +// through `_.mixin`. Wrapped objects may be chained. +function _$1(obj) { + if (obj instanceof _$1) return obj; + if (!(this instanceof _$1)) return new _$1(obj); + this._wrapped = obj; +} + +_$1.VERSION = VERSION; + +// Extracts the result from a wrapped and chained object. +_$1.prototype.value = function() { + return this._wrapped; +}; + +// Provide unwrapping proxies for some methods used in engine operations +// such as arithmetic and JSON stringification. +_$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value; + +_$1.prototype.toString = function() { + return String(this._wrapped); +}; + +// Internal function to wrap or shallow-copy an ArrayBuffer, +// typed array or DataView to a new view, reusing the buffer. +function toBufferView(bufferSource) { + return new Uint8Array( + bufferSource.buffer || bufferSource, + bufferSource.byteOffset || 0, + getByteLength(bufferSource) + ); +} + +// We use this string twice, so give it a name for minification. +var tagDataView = '[object DataView]'; + +// Internal recursive comparison function for `_.isEqual`. +function eq(a, b, aStack, bStack) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal). + if (a === b) return a !== 0 || 1 / a === 1 / b; + // `null` or `undefined` only equal to itself (strict comparison). + if (a == null || b == null) return false; + // `NaN`s are equivalent, but non-reflexive. + if (a !== a) return b !== b; + // Exhaust primitive checks + var type = typeof a; + if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; + return deepEq(a, b, aStack, bStack); +} + +// Internal recursive comparison function for `_.isEqual`. +function deepEq(a, b, aStack, bStack) { + // Unwrap any wrapped objects. + if (a instanceof _$1) a = a._wrapped; + if (b instanceof _$1) b = b._wrapped; + // Compare `[[Class]]` names. + var className = toString.call(a); + if (className !== toString.call(b)) return false; + // Work around a bug in IE 10 - Edge 13. + if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) { + if (!isDataView$1(b)) return false; + className = tagDataView; + } + switch (className) { + // These types are compared by value. + case '[object RegExp]': + // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') + case '[object String]': + // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is + // equivalent to `new String("5")`. + return '' + a === '' + b; + case '[object Number]': + // `NaN`s are equivalent, but non-reflexive. + // Object(NaN) is equivalent to NaN. + if (+a !== +a) return +b !== +b; + // An `egal` comparison is performed for other numeric values. + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case '[object Date]': + case '[object Boolean]': + // Coerce dates and booleans to numeric primitive values. Dates are compared by their + // millisecond representations. Note that invalid dates with millisecond representations + // of `NaN` are not equivalent. + return +a === +b; + case '[object Symbol]': + return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); + case '[object ArrayBuffer]': + case tagDataView: + // Coerce to typed array so we can fall through. + return deepEq(toBufferView(a), toBufferView(b), aStack, bStack); + } + + var areArrays = className === '[object Array]'; + if (!areArrays && isTypedArray$1(a)) { + var byteLength = getByteLength(a); + if (byteLength !== getByteLength(b)) return false; + if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true; + areArrays = true; + } + if (!areArrays) { + if (typeof a != 'object' || typeof b != 'object') return false; + + // Objects with different constructors are not equivalent, but `Object`s or `Array`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor && + isFunction$1(bCtor) && bCtor instanceof bCtor) + && ('constructor' in a && 'constructor' in b)) { + return false; + } + } + // Assume equality for cyclic structures. The algorithm for detecting cyclic + // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. + + // Initializing stack of traversed objects. + // It's done here since we only need them for objects and arrays comparison. + aStack = aStack || []; + bStack = bStack || []; + var length = aStack.length; + while (length--) { + // Linear search. Performance is inversely proportional to the number of + // unique nested structures. + if (aStack[length] === a) return bStack[length] === b; + } + + // Add the first object to the stack of traversed objects. + aStack.push(a); + bStack.push(b); + + // Recursively compare objects and arrays. + if (areArrays) { + // Compare array lengths to determine if a deep comparison is necessary. + length = a.length; + if (length !== b.length) return false; + // Deep compare the contents, ignoring non-numeric properties. + while (length--) { + if (!eq(a[length], b[length], aStack, bStack)) return false; + } + } else { + // Deep compare objects. + var _keys = keys(a), key; + length = _keys.length; + // Ensure that both objects contain the same number of properties before comparing deep equality. + if (keys(b).length !== length) return false; + while (length--) { + // Deep compare each member + key = _keys[length]; + if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false; + } + } + // Remove the first object from the stack of traversed objects. + aStack.pop(); + bStack.pop(); + return true; +} + +// Perform a deep comparison to check if two objects are equal. +function isEqual(a, b) { + return eq(a, b); +} + +// Retrieve all the enumerable property names of an object. +function allKeys(obj) { + if (!isObject(obj)) return []; + var keys = []; + for (var key in obj) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; +} + +// Since the regular `Object.prototype.toString` type tests don't work for +// some types in IE 11, we use a fingerprinting heuristic instead, based +// on the methods. It's not great, but it's the best we got. +// The fingerprint method lists are defined below. +function ie11fingerprint(methods) { + var length = getLength(methods); + return function(obj) { + if (obj == null) return false; + // `Map`, `WeakMap` and `Set` have no enumerable keys. + var keys = allKeys(obj); + if (getLength(keys)) return false; + for (var i = 0; i < length; i++) { + if (!isFunction$1(obj[methods[i]])) return false; + } + // If we are testing against `WeakMap`, we need to ensure that + // `obj` doesn't have a `forEach` method in order to distinguish + // it from a regular `Map`. + return methods !== weakMapMethods || !isFunction$1(obj[forEachName]); + }; +} + +// In the interest of compact minification, we write +// each string in the fingerprints only once. +var forEachName = 'forEach', + hasName = 'has', + commonInit = ['clear', 'delete'], + mapTail = ['get', hasName, 'set']; + +// `Map`, `WeakMap` and `Set` each have slightly different +// combinations of the above sublists. +var mapMethods = commonInit.concat(forEachName, mapTail), + weakMapMethods = commonInit.concat(mapTail), + setMethods = ['add'].concat(commonInit, forEachName, hasName); + +var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map'); + +var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap'); + +var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set'); + +var isWeakSet = tagTester('WeakSet'); + +// Retrieve the values of an object's properties. +function values(obj) { + var _keys = keys(obj); + var length = _keys.length; + var values = Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[_keys[i]]; + } + return values; +} + +// Convert an object into a list of `[key, value]` pairs. +// The opposite of `_.object` with one argument. +function pairs(obj) { + var _keys = keys(obj); + var length = _keys.length; + var pairs = Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [_keys[i], obj[_keys[i]]]; + } + return pairs; +} + +// Invert the keys and values of an object. The values must be serializable. +function invert(obj) { + var result = {}; + var _keys = keys(obj); + for (var i = 0, length = _keys.length; i < length; i++) { + result[obj[_keys[i]]] = _keys[i]; + } + return result; +} + +// Return a sorted list of the function names available on the object. +function functions(obj) { + var names = []; + for (var key in obj) { + if (isFunction$1(obj[key])) names.push(key); + } + return names.sort(); +} + +// An internal function for creating assigner functions. +function createAssigner(keysFunc, defaults) { + return function(obj) { + var length = arguments.length; + if (defaults) obj = Object(obj); + if (length < 2 || obj == null) return obj; + for (var index = 1; index < length; index++) { + var source = arguments[index], + keys = keysFunc(source), + l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (!defaults || obj[key] === void 0) obj[key] = source[key]; + } + } + return obj; + }; +} + +// Extend a given object with all the properties in passed-in object(s). +var extend = createAssigner(allKeys); + +// Assigns a given object with all the own properties in the passed-in +// object(s). +// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) +var extendOwn = createAssigner(keys); + +// Fill in a given object with default properties. +var defaults = createAssigner(allKeys, true); + +// Create a naked function reference for surrogate-prototype-swapping. +function ctor() { + return function(){}; +} + +// An internal function for creating a new object that inherits from another. +function baseCreate(prototype) { + if (!isObject(prototype)) return {}; + if (nativeCreate) return nativeCreate(prototype); + var Ctor = ctor(); + Ctor.prototype = prototype; + var result = new Ctor; + Ctor.prototype = null; + return result; +} + +// Creates an object that inherits from the given prototype object. +// If additional properties are provided then they will be added to the +// created object. +function create(prototype, props) { + var result = baseCreate(prototype); + if (props) extendOwn(result, props); + return result; +} + +// Create a (shallow-cloned) duplicate of an object. +function clone(obj) { + if (!isObject(obj)) return obj; + return isArray(obj) ? obj.slice() : extend({}, obj); +} + +// Invokes `interceptor` with the `obj` and then returns `obj`. +// The primary purpose of this method is to "tap into" a method chain, in +// order to perform operations on intermediate results within the chain. +function tap(obj, interceptor) { + interceptor(obj); + return obj; +} + +// Normalize a (deep) property `path` to array. +// Like `_.iteratee`, this function can be customized. +function toPath$1(path) { + return isArray(path) ? path : [path]; +} +_$1.toPath = toPath$1; + +// Internal wrapper for `_.toPath` to enable minification. +// Similar to `cb` for `_.iteratee`. +function toPath(path) { + return _$1.toPath(path); +} + +// Internal function to obtain a nested property in `obj` along `path`. +function deepGet(obj, path) { + var length = path.length; + for (var i = 0; i < length; i++) { + if (obj == null) return void 0; + obj = obj[path[i]]; + } + return length ? obj : void 0; +} + +// Get the value of the (deep) property on `path` from `object`. +// If any property in `path` does not exist or if the value is +// `undefined`, return `defaultValue` instead. +// The `path` is normalized through `_.toPath`. +function get(object, path, defaultValue) { + var value = deepGet(object, toPath(path)); + return isUndefined(value) ? defaultValue : value; +} + +// Shortcut function for checking if an object has a given property directly on +// itself (in other words, not on a prototype). Unlike the internal `has` +// function, this public version can also traverse nested properties. +function has(obj, path) { + path = toPath(path); + var length = path.length; + for (var i = 0; i < length; i++) { + var key = path[i]; + if (!has$1(obj, key)) return false; + obj = obj[key]; + } + return !!length; +} + +// Keep the identity function around for default iteratees. +function identity(value) { + return value; +} + +// Returns a predicate for checking whether an object has a given set of +// `key:value` pairs. +function matcher(attrs) { + attrs = extendOwn({}, attrs); + return function(obj) { + return isMatch(obj, attrs); + }; +} + +// Creates a function that, when passed an object, will traverse that object’s +// properties down the given `path`, specified as an array of keys or indices. +function property(path) { + path = toPath(path); + return function(obj) { + return deepGet(obj, path); + }; +} + +// Internal function that returns an efficient (for current engines) version +// of the passed-in callback, to be repeatedly applied in other Underscore +// functions. +function optimizeCb(func, context, argCount) { + if (context === void 0) return func; + switch (argCount == null ? 3 : argCount) { + case 1: return function(value) { + return func.call(context, value); + }; + // The 2-argument case is omitted because we’re not using it. + case 3: return function(value, index, collection) { + return func.call(context, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(context, accumulator, value, index, collection); + }; + } + return function() { + return func.apply(context, arguments); + }; +} + +// An internal function to generate callbacks that can be applied to each +// element in a collection, returning the desired result — either `_.identity`, +// an arbitrary callback, a property matcher, or a property accessor. +function baseIteratee(value, context, argCount) { + if (value == null) return identity; + if (isFunction$1(value)) return optimizeCb(value, context, argCount); + if (isObject(value) && !isArray(value)) return matcher(value); + return property(value); +} + +// External wrapper for our callback generator. Users may customize +// `_.iteratee` if they want additional predicate/iteratee shorthand styles. +// This abstraction hides the internal-only `argCount` argument. +function iteratee(value, context) { + return baseIteratee(value, context, Infinity); +} +_$1.iteratee = iteratee; + +// The function we call internally to generate a callback. It invokes +// `_.iteratee` if overridden, otherwise `baseIteratee`. +function cb(value, context, argCount) { + if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context); + return baseIteratee(value, context, argCount); +} + +// Returns the results of applying the `iteratee` to each element of `obj`. +// In contrast to `_.map` it returns an object. +function mapObject(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var _keys = keys(obj), + length = _keys.length, + results = {}; + for (var index = 0; index < length; index++) { + var currentKey = _keys[index]; + results[currentKey] = iteratee(obj[currentKey], currentKey, obj); + } + return results; +} + +// Predicate-generating function. Often useful outside of Underscore. +function noop(){} + +// Generates a function for a given object that returns a given property. +function propertyOf(obj) { + if (obj == null) return noop; + return function(path) { + return get(obj, path); + }; +} + +// Run a function **n** times. +function times(n, iteratee, context) { + var accum = Array(Math.max(0, n)); + iteratee = optimizeCb(iteratee, context, 1); + for (var i = 0; i < n; i++) accum[i] = iteratee(i); + return accum; +} + +// Return a random integer between `min` and `max` (inclusive). +function random(min, max) { + if (max == null) { + max = min; + min = 0; + } + return min + Math.floor(Math.random() * (max - min + 1)); +} + +// A (possibly faster) way to get the current timestamp as an integer. +var now = Date.now || function() { + return new Date().getTime(); +}; + +// Internal helper to generate functions for escaping and unescaping strings +// to/from HTML interpolation. +function createEscaper(map) { + var escaper = function(match) { + return map[match]; + }; + // Regexes for identifying a key that needs to be escaped. + var source = '(?:' + keys(map).join('|') + ')'; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, 'g'); + return function(string) { + string = string == null ? '' : '' + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; +} + +// Internal list of HTML entities for escaping. +var escapeMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' +}; + +// Function for escaping strings to HTML interpolation. +var _escape = createEscaper(escapeMap); + +// Internal list of HTML entities for unescaping. +var unescapeMap = invert(escapeMap); + +// Function for unescaping strings from HTML interpolation. +var _unescape = createEscaper(unescapeMap); + +// By default, Underscore uses ERB-style template delimiters. Change the +// following template settings to use alternative delimiters. +var templateSettings = _$1.templateSettings = { + evaluate: /<%([\s\S]+?)%>/g, + interpolate: /<%=([\s\S]+?)%>/g, + escape: /<%-([\s\S]+?)%>/g +}; + +// When customizing `_.templateSettings`, if you don't want to define an +// interpolation, evaluation or escaping regex, we need one that is +// guaranteed not to match. +var noMatch = /(.)^/; + +// Certain characters need to be escaped so that they can be put into a +// string literal. +var escapes = { + "'": "'", + '\\': '\\', + '\r': 'r', + '\n': 'n', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; + +function escapeChar(match) { + return '\\' + escapes[match]; +} + +// In order to prevent third-party code injection through +// `_.templateSettings.variable`, we test it against the following regular +// expression. It is intentionally a bit more liberal than just matching valid +// identifiers, but still prevents possible loopholes through defaults or +// destructuring assignment. +var bareIdentifier = /^\s*(\w|\$)+\s*$/; + +// JavaScript micro-templating, similar to John Resig's implementation. +// Underscore templating handles arbitrary delimiters, preserves whitespace, +// and correctly escapes quotes within interpolated code. +// NB: `oldSettings` only exists for backwards compatibility. +function template(text, settings, oldSettings) { + if (!settings && oldSettings) settings = oldSettings; + settings = defaults({}, settings, _$1.templateSettings); + + // Combine delimiters into one regular expression via alternation. + var matcher = RegExp([ + (settings.escape || noMatch).source, + (settings.interpolate || noMatch).source, + (settings.evaluate || noMatch).source + ].join('|') + '|$', 'g'); + + // Compile the template source, escaping string literals appropriately. + var index = 0; + var source = "__p+='"; + text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { + source += text.slice(index, offset).replace(escapeRegExp, escapeChar); + index = offset + match.length; + + if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } else if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } else if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + } + + // Adobe VMs need the match returned to produce the correct offset. + return match; + }); + source += "';\n"; + + var argument = settings.variable; + if (argument) { + // Insure against third-party code injection. (CVE-2021-23358) + if (!bareIdentifier.test(argument)) throw new Error( + 'variable is not a bare identifier: ' + argument + ); + } else { + // If a variable is not specified, place data values in local scope. + source = 'with(obj||{}){\n' + source + '}\n'; + argument = 'obj'; + } + + source = "var __t,__p='',__j=Array.prototype.join," + + "print=function(){__p+=__j.call(arguments,'');};\n" + + source + 'return __p;\n'; + + var render; + try { + render = new Function(argument, '_', source); + } catch (e) { + e.source = source; + throw e; + } + + var template = function(data) { + return render.call(this, data, _$1); + }; + + // Provide the compiled source as a convenience for precompilation. + template.source = 'function(' + argument + '){\n' + source + '}'; + + return template; +} + +// Traverses the children of `obj` along `path`. If a child is a function, it +// is invoked with its parent as context. Returns the value of the final +// child, or `fallback` if any child is undefined. +function result(obj, path, fallback) { + path = toPath(path); + var length = path.length; + if (!length) { + return isFunction$1(fallback) ? fallback.call(obj) : fallback; + } + for (var i = 0; i < length; i++) { + var prop = obj == null ? void 0 : obj[path[i]]; + if (prop === void 0) { + prop = fallback; + i = length; // Ensure we don't continue iterating. + } + obj = isFunction$1(prop) ? prop.call(obj) : prop; + } + return obj; +} + +// Generate a unique integer id (unique within the entire client session). +// Useful for temporary DOM ids. +var idCounter = 0; +function uniqueId(prefix) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; +} + +// Start chaining a wrapped Underscore object. +function chain(obj) { + var instance = _$1(obj); + instance._chain = true; + return instance; +} + +// Internal function to execute `sourceFunc` bound to `context` with optional +// `args`. Determines whether to execute a function as a constructor or as a +// normal function. +function executeBound(sourceFunc, boundFunc, context, callingContext, args) { + if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); + var self = baseCreate(sourceFunc.prototype); + var result = sourceFunc.apply(self, args); + if (isObject(result)) return result; + return self; +} + +// Partially apply a function by creating a version that has had some of its +// arguments pre-filled, without changing its dynamic `this` context. `_` acts +// as a placeholder by default, allowing any combination of arguments to be +// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. +var partial = restArguments(function(func, boundArgs) { + var placeholder = partial.placeholder; + var bound = function() { + var position = 0, length = boundArgs.length; + var args = Array(length); + for (var i = 0; i < length; i++) { + args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; + } + while (position < arguments.length) args.push(arguments[position++]); + return executeBound(func, bound, this, this, args); + }; + return bound; +}); + +partial.placeholder = _$1; + +// Create a function bound to a given object (assigning `this`, and arguments, +// optionally). +var bind = restArguments(function(func, context, args) { + if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function'); + var bound = restArguments(function(callArgs) { + return executeBound(func, bound, context, this, args.concat(callArgs)); + }); + return bound; +}); + +// Internal helper for collection methods to determine whether a collection +// should be iterated as an array or as an object. +// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength +// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 +var isArrayLike = createSizePropertyCheck(getLength); + +// Internal implementation of a recursive `flatten` function. +function flatten$1(input, depth, strict, output) { + output = output || []; + if (!depth && depth !== 0) { + depth = Infinity; + } else if (depth <= 0) { + return output.concat(input); + } + var idx = output.length; + for (var i = 0, length = getLength(input); i < length; i++) { + var value = input[i]; + if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) { + // Flatten current level of array or arguments object. + if (depth > 1) { + flatten$1(value, depth - 1, strict, output); + idx = output.length; + } else { + var j = 0, len = value.length; + while (j < len) output[idx++] = value[j++]; + } + } else if (!strict) { + output[idx++] = value; + } + } + return output; +} + +// Bind a number of an object's methods to that object. Remaining arguments +// are the method names to be bound. Useful for ensuring that all callbacks +// defined on an object belong to it. +var bindAll = restArguments(function(obj, keys) { + keys = flatten$1(keys, false, false); + var index = keys.length; + if (index < 1) throw new Error('bindAll must be passed function names'); + while (index--) { + var key = keys[index]; + obj[key] = bind(obj[key], obj); + } + return obj; +}); + +// Memoize an expensive function by storing its results. +function memoize(func, hasher) { + var memoize = function(key) { + var cache = memoize.cache; + var address = '' + (hasher ? hasher.apply(this, arguments) : key); + if (!has$1(cache, address)) cache[address] = func.apply(this, arguments); + return cache[address]; + }; + memoize.cache = {}; + return memoize; +} + +// Delays a function for the given number of milliseconds, and then calls +// it with the arguments supplied. +var delay = restArguments(function(func, wait, args) { + return setTimeout(function() { + return func.apply(null, args); + }, wait); +}); + +// Defers a function, scheduling it to run after the current call stack has +// cleared. +var defer = partial(delay, _$1, 1); + +// Returns a function, that, when invoked, will only be triggered at most once +// during a given window of time. Normally, the throttled function will run +// as much as it can, without ever going more than once per `wait` duration; +// but if you'd like to disable the execution on the leading edge, pass +// `{leading: false}`. To disable execution on the trailing edge, ditto. +function throttle(func, wait, options) { + var timeout, context, args, result; + var previous = 0; + if (!options) options = {}; + + var later = function() { + previous = options.leading === false ? 0 : now(); + timeout = null; + result = func.apply(context, args); + if (!timeout) context = args = null; + }; + + var throttled = function() { + var _now = now(); + if (!previous && options.leading === false) previous = _now; + var remaining = wait - (_now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = _now; + result = func.apply(context, args); + if (!timeout) context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + + throttled.cancel = function() { + clearTimeout(timeout); + previous = 0; + timeout = context = args = null; + }; + + return throttled; +} + +// When a sequence of calls of the returned function ends, the argument +// function is triggered. The end of a sequence is defined by the `wait` +// parameter. If `immediate` is passed, the argument function will be +// triggered at the beginning of the sequence instead of at the end. +function debounce(func, wait, immediate) { + var timeout, previous, args, result, context; + + var later = function() { + var passed = now() - previous; + if (wait > passed) { + timeout = setTimeout(later, wait - passed); + } else { + timeout = null; + if (!immediate) result = func.apply(context, args); + // This check is needed because `func` can recursively invoke `debounced`. + if (!timeout) args = context = null; + } + }; + + var debounced = restArguments(function(_args) { + context = this; + args = _args; + previous = now(); + if (!timeout) { + timeout = setTimeout(later, wait); + if (immediate) result = func.apply(context, args); + } + return result; + }); + + debounced.cancel = function() { + clearTimeout(timeout); + timeout = args = context = null; + }; + + return debounced; +} + +// Returns the first function passed as an argument to the second, +// allowing you to adjust arguments, run code before and after, and +// conditionally execute the original function. +function wrap(func, wrapper) { + return partial(wrapper, func); +} + +// Returns a negated version of the passed-in predicate. +function negate(predicate) { + return function() { + return !predicate.apply(this, arguments); + }; +} + +// Returns a function that is the composition of a list of functions, each +// consuming the return value of the function that follows. +function compose() { + var args = arguments; + var start = args.length - 1; + return function() { + var i = start; + var result = args[start].apply(this, arguments); + while (i--) result = args[i].call(this, result); + return result; + }; +} + +// Returns a function that will only be executed on and after the Nth call. +function after(times, func) { + return function() { + if (--times < 1) { + return func.apply(this, arguments); + } + }; +} + +// Returns a function that will only be executed up to (but not including) the +// Nth call. +function before(times, func) { + var memo; + return function() { + if (--times > 0) { + memo = func.apply(this, arguments); + } + if (times <= 1) func = null; + return memo; + }; +} + +// Returns a function that will be executed at most one time, no matter how +// often you call it. Useful for lazy initialization. +var once = partial(before, 2); + +// Returns the first key on an object that passes a truth test. +function findKey(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = keys(obj), key; + for (var i = 0, length = _keys.length; i < length; i++) { + key = _keys[i]; + if (predicate(obj[key], key, obj)) return key; + } +} + +// Internal function to generate `_.findIndex` and `_.findLastIndex`. +function createPredicateIndexFinder(dir) { + return function(array, predicate, context) { + predicate = cb(predicate, context); + var length = getLength(array); + var index = dir > 0 ? 0 : length - 1; + for (; index >= 0 && index < length; index += dir) { + if (predicate(array[index], index, array)) return index; + } + return -1; + }; +} + +// Returns the first index on an array-like that passes a truth test. +var findIndex = createPredicateIndexFinder(1); + +// Returns the last index on an array-like that passes a truth test. +var findLastIndex = createPredicateIndexFinder(-1); + +// Use a comparator function to figure out the smallest index at which +// an object should be inserted so as to maintain order. Uses binary search. +function sortedIndex(array, obj, iteratee, context) { + iteratee = cb(iteratee, context, 1); + var value = iteratee(obj); + var low = 0, high = getLength(array); + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; + } + return low; +} + +// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions. +function createIndexFinder(dir, predicateFind, sortedIndex) { + return function(array, item, idx) { + var i = 0, length = getLength(array); + if (typeof idx == 'number') { + if (dir > 0) { + i = idx >= 0 ? idx : Math.max(idx + length, i); + } else { + length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; + } + } else if (sortedIndex && idx && length) { + idx = sortedIndex(array, item); + return array[idx] === item ? idx : -1; + } + if (item !== item) { + idx = predicateFind(slice.call(array, i, length), isNaN$1); + return idx >= 0 ? idx + i : -1; + } + for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { + if (array[idx] === item) return idx; + } + return -1; + }; +} + +// Return the position of the first occurrence of an item in an array, +// or -1 if the item is not included in the array. +// If the array is large and already in sort order, pass `true` +// for **isSorted** to use binary search. +var indexOf = createIndexFinder(1, findIndex, sortedIndex); + +// Return the position of the last occurrence of an item in an array, +// or -1 if the item is not included in the array. +var lastIndexOf = createIndexFinder(-1, findLastIndex); + +// Return the first value which passes a truth test. +function find(obj, predicate, context) { + var keyFinder = isArrayLike(obj) ? findIndex : findKey; + var key = keyFinder(obj, predicate, context); + if (key !== void 0 && key !== -1) return obj[key]; +} + +// Convenience version of a common use case of `_.find`: getting the first +// object containing specific `key:value` pairs. +function findWhere(obj, attrs) { + return find(obj, matcher(attrs)); +} + +// The cornerstone for collection functions, an `each` +// implementation, aka `forEach`. +// Handles raw objects in addition to array-likes. Treats all +// sparse array-likes as if they were dense. +function each(obj, iteratee, context) { + iteratee = optimizeCb(iteratee, context); + var i, length; + if (isArrayLike(obj)) { + for (i = 0, length = obj.length; i < length; i++) { + iteratee(obj[i], i, obj); + } + } else { + var _keys = keys(obj); + for (i = 0, length = _keys.length; i < length; i++) { + iteratee(obj[_keys[i]], _keys[i], obj); + } + } + return obj; +} + +// Return the results of applying the iteratee to each element. +function map(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length, + results = Array(length); + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + results[index] = iteratee(obj[currentKey], currentKey, obj); + } + return results; +} + +// Internal helper to create a reducing function, iterating left or right. +function createReduce(dir) { + // Wrap code that reassigns argument variables in a separate function than + // the one that accesses `arguments.length` to avoid a perf hit. (#1991) + var reducer = function(obj, iteratee, memo, initial) { + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length, + index = dir > 0 ? 0 : length - 1; + if (!initial) { + memo = obj[_keys ? _keys[index] : index]; + index += dir; + } + for (; index >= 0 && index < length; index += dir) { + var currentKey = _keys ? _keys[index] : index; + memo = iteratee(memo, obj[currentKey], currentKey, obj); + } + return memo; + }; + + return function(obj, iteratee, memo, context) { + var initial = arguments.length >= 3; + return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); + }; +} + +// **Reduce** builds up a single result from a list of values, aka `inject`, +// or `foldl`. +var reduce = createReduce(1); + +// The right-associative version of reduce, also known as `foldr`. +var reduceRight = createReduce(-1); + +// Return all the elements that pass a truth test. +function filter(obj, predicate, context) { + var results = []; + predicate = cb(predicate, context); + each(obj, function(value, index, list) { + if (predicate(value, index, list)) results.push(value); + }); + return results; +} + +// Return all the elements for which a truth test fails. +function reject(obj, predicate, context) { + return filter(obj, negate(cb(predicate)), context); +} + +// Determine whether all of the elements pass a truth test. +function every(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + if (!predicate(obj[currentKey], currentKey, obj)) return false; + } + return true; +} + +// Determine if at least one element in the object passes a truth test. +function some(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + if (predicate(obj[currentKey], currentKey, obj)) return true; + } + return false; +} + +// Determine if the array or object contains a given item (using `===`). +function contains(obj, item, fromIndex, guard) { + if (!isArrayLike(obj)) obj = values(obj); + if (typeof fromIndex != 'number' || guard) fromIndex = 0; + return indexOf(obj, item, fromIndex) >= 0; +} + +// Invoke a method (with arguments) on every item in a collection. +var invoke = restArguments(function(obj, path, args) { + var contextPath, func; + if (isFunction$1(path)) { + func = path; + } else { + path = toPath(path); + contextPath = path.slice(0, -1); + path = path[path.length - 1]; + } + return map(obj, function(context) { + var method = func; + if (!method) { + if (contextPath && contextPath.length) { + context = deepGet(context, contextPath); + } + if (context == null) return void 0; + method = context[path]; + } + return method == null ? method : method.apply(context, args); + }); +}); + +// Convenience version of a common use case of `_.map`: fetching a property. +function pluck(obj, key) { + return map(obj, property(key)); +} + +// Convenience version of a common use case of `_.filter`: selecting only +// objects containing specific `key:value` pairs. +function where(obj, attrs) { + return filter(obj, matcher(attrs)); +} + +// Return the maximum element (or element-based computation). +function max(obj, iteratee, context) { + var result = -Infinity, lastComputed = -Infinity, + value, computed; + if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { + obj = isArrayLike(obj) ? obj : values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value != null && value > result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + each(obj, function(v, index, list) { + computed = iteratee(v, index, list); + if (computed > lastComputed || computed === -Infinity && result === -Infinity) { + result = v; + lastComputed = computed; + } + }); + } + return result; +} + +// Return the minimum element (or element-based computation). +function min(obj, iteratee, context) { + var result = Infinity, lastComputed = Infinity, + value, computed; + if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { + obj = isArrayLike(obj) ? obj : values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value != null && value < result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + each(obj, function(v, index, list) { + computed = iteratee(v, index, list); + if (computed < lastComputed || computed === Infinity && result === Infinity) { + result = v; + lastComputed = computed; + } + }); + } + return result; +} + +// Sample **n** random values from a collection using the modern version of the +// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). +// If **n** is not specified, returns a single random element. +// The internal `guard` argument allows it to work with `_.map`. +function sample(obj, n, guard) { + if (n == null || guard) { + if (!isArrayLike(obj)) obj = values(obj); + return obj[random(obj.length - 1)]; + } + var sample = isArrayLike(obj) ? clone(obj) : values(obj); + var length = getLength(sample); + n = Math.max(Math.min(n, length), 0); + var last = length - 1; + for (var index = 0; index < n; index++) { + var rand = random(index, last); + var temp = sample[index]; + sample[index] = sample[rand]; + sample[rand] = temp; + } + return sample.slice(0, n); +} + +// Shuffle a collection. +function shuffle(obj) { + return sample(obj, Infinity); +} + +// Sort the object's values by a criterion produced by an iteratee. +function sortBy(obj, iteratee, context) { + var index = 0; + iteratee = cb(iteratee, context); + return pluck(map(obj, function(value, key, list) { + return { + value: value, + index: index++, + criteria: iteratee(value, key, list) + }; + }).sort(function(left, right) { + var a = left.criteria; + var b = right.criteria; + if (a !== b) { + if (a > b || a === void 0) return 1; + if (a < b || b === void 0) return -1; + } + return left.index - right.index; + }), 'value'); +} + +// An internal function used for aggregate "group by" operations. +function group(behavior, partition) { + return function(obj, iteratee, context) { + var result = partition ? [[], []] : {}; + iteratee = cb(iteratee, context); + each(obj, function(value, index) { + var key = iteratee(value, index, obj); + behavior(result, value, key); + }); + return result; + }; +} + +// Groups the object's values by a criterion. Pass either a string attribute +// to group by, or a function that returns the criterion. +var groupBy = group(function(result, value, key) { + if (has$1(result, key)) result[key].push(value); else result[key] = [value]; +}); + +// Indexes the object's values by a criterion, similar to `_.groupBy`, but for +// when you know that your index values will be unique. +var indexBy = group(function(result, value, key) { + result[key] = value; +}); + +// Counts instances of an object that group by a certain criterion. Pass +// either a string attribute to count by, or a function that returns the +// criterion. +var countBy = group(function(result, value, key) { + if (has$1(result, key)) result[key]++; else result[key] = 1; +}); + +// Split a collection into two arrays: one whose elements all pass the given +// truth test, and one whose elements all do not pass the truth test. +var partition = group(function(result, value, pass) { + result[pass ? 0 : 1].push(value); +}, true); + +// Safely create a real, live array from anything iterable. +var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; +function toArray(obj) { + if (!obj) return []; + if (isArray(obj)) return slice.call(obj); + if (isString(obj)) { + // Keep surrogate pair characters together. + return obj.match(reStrSymbol); + } + if (isArrayLike(obj)) return map(obj, identity); + return values(obj); +} + +// Return the number of elements in a collection. +function size(obj) { + if (obj == null) return 0; + return isArrayLike(obj) ? obj.length : keys(obj).length; +} + +// Internal `_.pick` helper function to determine whether `key` is an enumerable +// property name of `obj`. +function keyInObj(value, key, obj) { + return key in obj; +} + +// Return a copy of the object only containing the allowed properties. +var pick = restArguments(function(obj, keys) { + var result = {}, iteratee = keys[0]; + if (obj == null) return result; + if (isFunction$1(iteratee)) { + if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); + keys = allKeys(obj); + } else { + iteratee = keyInObj; + keys = flatten$1(keys, false, false); + obj = Object(obj); + } + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i]; + var value = obj[key]; + if (iteratee(value, key, obj)) result[key] = value; + } + return result; +}); + +// Return a copy of the object without the disallowed properties. +var omit = restArguments(function(obj, keys) { + var iteratee = keys[0], context; + if (isFunction$1(iteratee)) { + iteratee = negate(iteratee); + if (keys.length > 1) context = keys[1]; + } else { + keys = map(flatten$1(keys, false, false), String); + iteratee = function(value, key) { + return !contains(keys, key); + }; + } + return pick(obj, iteratee, context); +}); + +// Returns everything but the last entry of the array. Especially useful on +// the arguments object. Passing **n** will return all the values in +// the array, excluding the last N. +function initial(array, n, guard) { + return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); +} + +// Get the first element of an array. Passing **n** will return the first N +// values in the array. The **guard** check allows it to work with `_.map`. +function first(array, n, guard) { + if (array == null || array.length < 1) return n == null || guard ? void 0 : []; + if (n == null || guard) return array[0]; + return initial(array, array.length - n); +} + +// Returns everything but the first entry of the `array`. Especially useful on +// the `arguments` object. Passing an **n** will return the rest N values in the +// `array`. +function rest(array, n, guard) { + return slice.call(array, n == null || guard ? 1 : n); +} + +// Get the last element of an array. Passing **n** will return the last N +// values in the array. +function last(array, n, guard) { + if (array == null || array.length < 1) return n == null || guard ? void 0 : []; + if (n == null || guard) return array[array.length - 1]; + return rest(array, Math.max(0, array.length - n)); +} + +// Trim out all falsy values from an array. +function compact(array) { + return filter(array, Boolean); +} + +// Flatten out an array, either recursively (by default), or up to `depth`. +// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively. +function flatten(array, depth) { + return flatten$1(array, depth, false); +} + +// Take the difference between one array and a number of other arrays. +// Only the elements present in just the first array will remain. +var difference = restArguments(function(array, rest) { + rest = flatten$1(rest, true, true); + return filter(array, function(value){ + return !contains(rest, value); + }); +}); + +// Return a version of the array that does not contain the specified value(s). +var without = restArguments(function(array, otherArrays) { + return difference(array, otherArrays); +}); + +// Produce a duplicate-free version of the array. If the array has already +// been sorted, you have the option of using a faster algorithm. +// The faster algorithm will not work with an iteratee if the iteratee +// is not a one-to-one function, so providing an iteratee will disable +// the faster algorithm. +function uniq(array, isSorted, iteratee, context) { + if (!isBoolean(isSorted)) { + context = iteratee; + iteratee = isSorted; + isSorted = false; + } + if (iteratee != null) iteratee = cb(iteratee, context); + var result = []; + var seen = []; + for (var i = 0, length = getLength(array); i < length; i++) { + var value = array[i], + computed = iteratee ? iteratee(value, i, array) : value; + if (isSorted && !iteratee) { + if (!i || seen !== computed) result.push(value); + seen = computed; + } else if (iteratee) { + if (!contains(seen, computed)) { + seen.push(computed); + result.push(value); + } + } else if (!contains(result, value)) { + result.push(value); + } + } + return result; +} + +// Produce an array that contains the union: each distinct element from all of +// the passed-in arrays. +var union = restArguments(function(arrays) { + return uniq(flatten$1(arrays, true, true)); +}); + +// Produce an array that contains every item shared between all the +// passed-in arrays. +function intersection(array) { + var result = []; + var argsLength = arguments.length; + for (var i = 0, length = getLength(array); i < length; i++) { + var item = array[i]; + if (contains(result, item)) continue; + var j; + for (j = 1; j < argsLength; j++) { + if (!contains(arguments[j], item)) break; + } + if (j === argsLength) result.push(item); + } + return result; +} + +// Complement of zip. Unzip accepts an array of arrays and groups +// each array's elements on shared indices. +function unzip(array) { + var length = array && max(array, getLength).length || 0; + var result = Array(length); + + for (var index = 0; index < length; index++) { + result[index] = pluck(array, index); + } + return result; +} + +// Zip together multiple lists into a single array -- elements that share +// an index go together. +var zip = restArguments(unzip); + +// Converts lists into objects. Pass either a single array of `[key, value]` +// pairs, or two parallel arrays of the same length -- one of keys, and one of +// the corresponding values. Passing by pairs is the reverse of `_.pairs`. +function object(list, values) { + var result = {}; + for (var i = 0, length = getLength(list); i < length; i++) { + if (values) { + result[list[i]] = values[i]; + } else { + result[list[i][0]] = list[i][1]; + } + } + return result; +} + +// Generate an integer Array containing an arithmetic progression. A port of +// the native Python `range()` function. See +// [the Python documentation](https://docs.python.org/library/functions.html#range). +function range(start, stop, step) { + if (stop == null) { + stop = start || 0; + start = 0; + } + if (!step) { + step = stop < start ? -1 : 1; + } + + var length = Math.max(Math.ceil((stop - start) / step), 0); + var range = Array(length); + + for (var idx = 0; idx < length; idx++, start += step) { + range[idx] = start; + } + + return range; +} + +// Chunk a single array into multiple arrays, each containing `count` or fewer +// items. +function chunk(array, count) { + if (count == null || count < 1) return []; + var result = []; + var i = 0, length = array.length; + while (i < length) { + result.push(slice.call(array, i, i += count)); + } + return result; +} + +// Helper function to continue chaining intermediate results. +function chainResult(instance, obj) { + return instance._chain ? _$1(obj).chain() : obj; +} + +// Add your own custom functions to the Underscore object. +function mixin(obj) { + each(functions(obj), function(name) { + var func = _$1[name] = obj[name]; + _$1.prototype[name] = function() { + var args = [this._wrapped]; + push.apply(args, arguments); + return chainResult(this, func.apply(_$1, args)); + }; + }); + return _$1; +} + +// Add all mutator `Array` functions to the wrapper. +each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { + var method = ArrayProto[name]; + _$1.prototype[name] = function() { + var obj = this._wrapped; + if (obj != null) { + method.apply(obj, arguments); + if ((name === 'shift' || name === 'splice') && obj.length === 0) { + delete obj[0]; + } + } + return chainResult(this, obj); + }; +}); + +// Add all accessor `Array` functions to the wrapper. +each(['concat', 'join', 'slice'], function(name) { + var method = ArrayProto[name]; + _$1.prototype[name] = function() { + var obj = this._wrapped; + if (obj != null) obj = method.apply(obj, arguments); + return chainResult(this, obj); + }; +}); + +// Named Exports + +var allExports = { + __proto__: null, + VERSION: VERSION, + restArguments: restArguments, + isObject: isObject, + isNull: isNull, + isUndefined: isUndefined, + isBoolean: isBoolean, + isElement: isElement, + isString: isString, + isNumber: isNumber, + isDate: isDate, + isRegExp: isRegExp, + isError: isError, + isSymbol: isSymbol, + isArrayBuffer: isArrayBuffer, + isDataView: isDataView$1, + isArray: isArray, + isFunction: isFunction$1, + isArguments: isArguments$1, + isFinite: isFinite$1, + isNaN: isNaN$1, + isTypedArray: isTypedArray$1, + isEmpty: isEmpty, + isMatch: isMatch, + isEqual: isEqual, + isMap: isMap, + isWeakMap: isWeakMap, + isSet: isSet, + isWeakSet: isWeakSet, + keys: keys, + allKeys: allKeys, + values: values, + pairs: pairs, + invert: invert, + functions: functions, + methods: functions, + extend: extend, + extendOwn: extendOwn, + assign: extendOwn, + defaults: defaults, + create: create, + clone: clone, + tap: tap, + get: get, + has: has, + mapObject: mapObject, + identity: identity, + constant: constant, + noop: noop, + toPath: toPath$1, + property: property, + propertyOf: propertyOf, + matcher: matcher, + matches: matcher, + times: times, + random: random, + now: now, + escape: _escape, + unescape: _unescape, + templateSettings: templateSettings, + template: template, + result: result, + uniqueId: uniqueId, + chain: chain, + iteratee: iteratee, + partial: partial, + bind: bind, + bindAll: bindAll, + memoize: memoize, + delay: delay, + defer: defer, + throttle: throttle, + debounce: debounce, + wrap: wrap, + negate: negate, + compose: compose, + after: after, + before: before, + once: once, + findKey: findKey, + findIndex: findIndex, + findLastIndex: findLastIndex, + sortedIndex: sortedIndex, + indexOf: indexOf, + lastIndexOf: lastIndexOf, + find: find, + detect: find, + findWhere: findWhere, + each: each, + forEach: each, + map: map, + collect: map, + reduce: reduce, + foldl: reduce, + inject: reduce, + reduceRight: reduceRight, + foldr: reduceRight, + filter: filter, + select: filter, + reject: reject, + every: every, + all: every, + some: some, + any: some, + contains: contains, + includes: contains, + include: contains, + invoke: invoke, + pluck: pluck, + where: where, + max: max, + min: min, + shuffle: shuffle, + sample: sample, + sortBy: sortBy, + groupBy: groupBy, + indexBy: indexBy, + countBy: countBy, + partition: partition, + toArray: toArray, + size: size, + pick: pick, + omit: omit, + first: first, + head: first, + take: first, + initial: initial, + last: last, + rest: rest, + tail: rest, + drop: rest, + compact: compact, + flatten: flatten, + without: without, + uniq: uniq, + unique: uniq, + union: union, + intersection: intersection, + difference: difference, + unzip: unzip, + transpose: unzip, + zip: zip, + object: object, + range: range, + chunk: chunk, + mixin: mixin, + 'default': _$1 +}; + +// Default Export + +// Add all of the Underscore functions to the wrapper object. +var _ = mixin(allExports); +// Legacy Node.js API. +_._ = _; + +exports.VERSION = VERSION; +exports._ = _; +exports._escape = _escape; +exports._unescape = _unescape; +exports.after = after; +exports.allKeys = allKeys; +exports.before = before; +exports.bind = bind; +exports.bindAll = bindAll; +exports.chain = chain; +exports.chunk = chunk; +exports.clone = clone; +exports.compact = compact; +exports.compose = compose; +exports.constant = constant; +exports.contains = contains; +exports.countBy = countBy; +exports.create = create; +exports.debounce = debounce; +exports.defaults = defaults; +exports.defer = defer; +exports.delay = delay; +exports.difference = difference; +exports.each = each; +exports.every = every; +exports.extend = extend; +exports.extendOwn = extendOwn; +exports.filter = filter; +exports.find = find; +exports.findIndex = findIndex; +exports.findKey = findKey; +exports.findLastIndex = findLastIndex; +exports.findWhere = findWhere; +exports.first = first; +exports.flatten = flatten; +exports.functions = functions; +exports.get = get; +exports.groupBy = groupBy; +exports.has = has; +exports.identity = identity; +exports.indexBy = indexBy; +exports.indexOf = indexOf; +exports.initial = initial; +exports.intersection = intersection; +exports.invert = invert; +exports.invoke = invoke; +exports.isArguments = isArguments$1; +exports.isArray = isArray; +exports.isArrayBuffer = isArrayBuffer; +exports.isBoolean = isBoolean; +exports.isDataView = isDataView$1; +exports.isDate = isDate; +exports.isElement = isElement; +exports.isEmpty = isEmpty; +exports.isEqual = isEqual; +exports.isError = isError; +exports.isFinite = isFinite$1; +exports.isFunction = isFunction$1; +exports.isMap = isMap; +exports.isMatch = isMatch; +exports.isNaN = isNaN$1; +exports.isNull = isNull; +exports.isNumber = isNumber; +exports.isObject = isObject; +exports.isRegExp = isRegExp; +exports.isSet = isSet; +exports.isString = isString; +exports.isSymbol = isSymbol; +exports.isTypedArray = isTypedArray$1; +exports.isUndefined = isUndefined; +exports.isWeakMap = isWeakMap; +exports.isWeakSet = isWeakSet; +exports.iteratee = iteratee; +exports.keys = keys; +exports.last = last; +exports.lastIndexOf = lastIndexOf; +exports.map = map; +exports.mapObject = mapObject; +exports.matcher = matcher; +exports.max = max; +exports.memoize = memoize; +exports.min = min; +exports.mixin = mixin; +exports.negate = negate; +exports.noop = noop; +exports.now = now; +exports.object = object; +exports.omit = omit; +exports.once = once; +exports.pairs = pairs; +exports.partial = partial; +exports.partition = partition; +exports.pick = pick; +exports.pluck = pluck; +exports.property = property; +exports.propertyOf = propertyOf; +exports.random = random; +exports.range = range; +exports.reduce = reduce; +exports.reduceRight = reduceRight; +exports.reject = reject; +exports.rest = rest; +exports.restArguments = restArguments; +exports.result = result; +exports.sample = sample; +exports.shuffle = shuffle; +exports.size = size; +exports.some = some; +exports.sortBy = sortBy; +exports.sortedIndex = sortedIndex; +exports.tap = tap; +exports.template = template; +exports.templateSettings = templateSettings; +exports.throttle = throttle; +exports.times = times; +exports.toArray = toArray; +exports.toPath = toPath$1; +exports.union = union; +exports.uniq = uniq; +exports.uniqueId = uniqueId; +exports.unzip = unzip; +exports.values = values; +exports.where = where; +exports.without = without; +exports.wrap = wrap; +exports.zip = zip; +//# sourceMappingURL=underscore-node-f.cjs.map + + +/***/ }), + +/***/ 57005: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Underscore.js 1.13.1 +// https://underscorejs.org +// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. + +var underscoreNodeF = __nccwpck_require__(44702); + + + +module.exports = underscoreNodeF._; +//# sourceMappingURL=underscore-node.cjs.map + + +/***/ }), + +/***/ 894: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}'); + +/***/ }), + +/***/ 96273: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}'); + +/***/ }), + +/***/ 6680: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}'); + +/***/ }), + +/***/ 83932: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"afterRequest.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["lastAccess","eTag","hitCount"],"properties":{"expires":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"lastAccess":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"eTag":{"type":"string"},"hitCount":{"type":"integer"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 36136: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"beforeRequest.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["lastAccess","eTag","hitCount"],"properties":{"expires":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"lastAccess":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"eTag":{"type":"string"},"hitCount":{"type":"integer"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 805: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"browser.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 51632: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"cache.json#","$schema":"http://json-schema.org/draft-06/schema#","properties":{"beforeRequest":{"oneOf":[{"type":"null"},{"$ref":"beforeRequest.json#"}]},"afterRequest":{"oneOf":[{"type":"null"},{"$ref":"afterRequest.json#"}]},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 61567: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"content.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["size","mimeType"],"properties":{"size":{"type":"integer"},"compression":{"type":"integer"},"mimeType":{"type":"string"},"text":{"type":"string"},"encoding":{"type":"string"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 25725: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"cookie.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"path":{"type":"string"},"domain":{"type":"string"},"expires":{"type":["string","null"],"format":"date-time"},"httpOnly":{"type":"boolean"},"secure":{"type":"boolean"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 47218: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"creator.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 74560: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"entry.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["startedDateTime","time","request","response","cache","timings"],"properties":{"pageref":{"type":"string"},"startedDateTime":{"type":"string","format":"date-time","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))"},"time":{"type":"number","min":0},"request":{"$ref":"request.json#"},"response":{"$ref":"response.json#"},"cache":{"$ref":"cache.json#"},"timings":{"$ref":"timings.json#"},"serverIPAddress":{"type":"string","oneOf":[{"format":"ipv4"},{"format":"ipv6"}]},"connection":{"type":"string"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 75579: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"har.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["log"],"properties":{"log":{"$ref":"log.json#"}}}'); + +/***/ }), + +/***/ 75147: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"header.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 53013: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"log.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["version","creator","entries"],"properties":{"version":{"type":"string"},"creator":{"$ref":"creator.json#"},"browser":{"$ref":"browser.json#"},"pages":{"type":"array","items":{"$ref":"page.json#"}},"entries":{"type":"array","items":{"$ref":"entry.json#"}},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 34777: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"page.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["startedDateTime","id","title","pageTimings"],"properties":{"startedDateTime":{"type":"string","format":"date-time","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))"},"id":{"type":"string","unique":true},"title":{"type":"string"},"pageTimings":{"$ref":"pageTimings.json#"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 5538: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"pageTimings.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","properties":{"onContentLoad":{"type":"number","min":-1},"onLoad":{"type":"number","min":-1},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 12096: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"postData.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["mimeType"],"properties":{"mimeType":{"type":"string"},"text":{"type":"string"},"params":{"type":"array","required":["name"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"comment":{"type":"string"}}},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 21251: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"query.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 99646: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"request.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["method","url","httpVersion","cookies","headers","queryString","headersSize","bodySize"],"properties":{"method":{"type":"string"},"url":{"type":"string","format":"uri"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"cookie.json#"}},"headers":{"type":"array","items":{"$ref":"header.json#"}},"queryString":{"type":"array","items":{"$ref":"query.json#"}},"postData":{"$ref":"postData.json#"},"headersSize":{"type":"integer"},"bodySize":{"type":"integer"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 9103: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"response.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["status","statusText","httpVersion","cookies","headers","content","redirectURL","headersSize","bodySize"],"properties":{"status":{"type":"integer"},"statusText":{"type":"string"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"cookie.json#"}},"headers":{"type":"array","items":{"$ref":"header.json#"}},"content":{"$ref":"content.json#"},"redirectURL":{"type":"string"},"headersSize":{"type":"integer"},"bodySize":{"type":"integer"},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 22007: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"$id":"timings.json#","$schema":"http://json-schema.org/draft-06/schema#","required":["send","wait","receive"],"properties":{"dns":{"type":"number","min":-1},"connect":{"type":"number","min":-1},"blocked":{"type":"number","min":-1},"send":{"type":"number","min":-1},"wait":{"type":"number","min":-1},"receive":{"type":"number","min":-1},"ssl":{"type":"number","min":-1},"comment":{"type":"string"}}}'); + +/***/ }), + +/***/ 53765: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","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/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+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-dynamic-event-message":{"source":"iana"},"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","charset":"UTF-8","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/cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"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/dots+cbor":{"source":"iana"},"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","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","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","charset":"UTF-8","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/lpf+zip":{"source":"iana","compressible":false},"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","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","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","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"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","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","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","charset":"UTF-8","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/pvd+json":{"source":"iana","compressible":true},"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/sbe":{"source":"iana"},"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-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"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/td+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.dbf":{"source":"iana"},"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.dvbisl+xml":{"source":"iana","compressible":true},"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.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"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","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","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.sar":{"source":"iana"},"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.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"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.snesdev-page-table":{"source":"iana"},"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","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","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","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","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","charset":"UTF-8","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-pki-message":{"source":"iana"},"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":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"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/mhas":{"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/tetra_acelp_bb":{"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/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"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","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"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","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"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","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"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}}'); + +/***/ }), + +/***/ 82696: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"name":"openid-client","version":"4.9.1","description":"OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs","keywords":["auth","authentication","basic","certified","client","connect","dynamic","electron","hybrid","identity","implicit","oauth","oauth2","oidc","openid","passport","relying party","strategy"],"homepage":"https://github.com/panva/node-openid-client","repository":"panva/node-openid-client","funding":{"url":"https://github.com/sponsors/panva"},"license":"MIT","author":"Filip Skokan ","exports":{"import":"./lib/index.mjs","require":"./lib/index.js"},"main":"lib/index.js","types":"types/index.d.ts","files":["lib","types/index.d.ts"],"scripts":{"coverage":"nyc mocha test/**/*.test.js","lint":"eslint lib test","lint-fix":"eslint lib test --fix","test":"mocha test/**/*.test.js"},"nyc":{"reporter":["lcov","text-summary"]},"dependencies":{"aggregate-error":"^3.1.0","got":"^11.8.0","jose":"^2.0.5","lru-cache":"^6.0.0","make-error":"^1.3.6","object-hash":"^2.0.1","oidc-token-hash":"^5.0.1"},"devDependencies":{"@types/passport":"^1.0.4","base64url":"^3.0.1","chai":"^4.2.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.1","mocha":"^8.2.0","nock":"^13.0.2","nyc":"^15.1.0","readable-mock-req":"^0.2.2","sinon":"^9.2.0","timekeeper":"^2.2.0"},"engines":{"node":"^10.19.0 || >=12.0.0 < 13 || >=13.7.0 < 14 || >= 14.2.0"},"standard-version":{"scripts":{"postchangelog":"sed -i \'\' -e \'s/### \\\\[/## [/g\' CHANGELOG.md"},"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","hidden":true},{"type":"docs","hidden":true},{"type":"style","hidden":true},{"type":"refactor","section":"Refactor","hidden":true},{"type":"perf","section":"Performance","hidden":false},{"type":"test","hidden":true}]}}'); + +/***/ }), + +/***/ 3704: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('["ac","com.ac","edu.ac","gov.ac","net.ac","mil.ac","org.ac","ad","nom.ad","ae","co.ae","net.ae","org.ae","sch.ae","ac.ae","gov.ae","mil.ae","aero","accident-investigation.aero","accident-prevention.aero","aerobatic.aero","aeroclub.aero","aerodrome.aero","agents.aero","aircraft.aero","airline.aero","airport.aero","air-surveillance.aero","airtraffic.aero","air-traffic-control.aero","ambulance.aero","amusement.aero","association.aero","author.aero","ballooning.aero","broker.aero","caa.aero","cargo.aero","catering.aero","certification.aero","championship.aero","charter.aero","civilaviation.aero","club.aero","conference.aero","consultant.aero","consulting.aero","control.aero","council.aero","crew.aero","design.aero","dgca.aero","educator.aero","emergency.aero","engine.aero","engineer.aero","entertainment.aero","equipment.aero","exchange.aero","express.aero","federation.aero","flight.aero","freight.aero","fuel.aero","gliding.aero","government.aero","groundhandling.aero","group.aero","hanggliding.aero","homebuilt.aero","insurance.aero","journal.aero","journalist.aero","leasing.aero","logistics.aero","magazine.aero","maintenance.aero","media.aero","microlight.aero","modelling.aero","navigation.aero","parachuting.aero","paragliding.aero","passenger-association.aero","pilot.aero","press.aero","production.aero","recreation.aero","repbody.aero","res.aero","research.aero","rotorcraft.aero","safety.aero","scientist.aero","services.aero","show.aero","skydiving.aero","software.aero","student.aero","trader.aero","trading.aero","trainer.aero","union.aero","workinggroup.aero","works.aero","af","gov.af","com.af","org.af","net.af","edu.af","ag","com.ag","org.ag","net.ag","co.ag","nom.ag","ai","off.ai","com.ai","net.ai","org.ai","al","com.al","edu.al","gov.al","mil.al","net.al","org.al","am","co.am","com.am","commune.am","net.am","org.am","ao","ed.ao","gv.ao","og.ao","co.ao","pb.ao","it.ao","aq","ar","com.ar","edu.ar","gob.ar","gov.ar","int.ar","mil.ar","musica.ar","net.ar","org.ar","tur.ar","arpa","e164.arpa","in-addr.arpa","ip6.arpa","iris.arpa","uri.arpa","urn.arpa","as","gov.as","asia","at","ac.at","co.at","gv.at","or.at","au","com.au","net.au","org.au","edu.au","gov.au","asn.au","id.au","info.au","conf.au","oz.au","act.au","nsw.au","nt.au","qld.au","sa.au","tas.au","vic.au","wa.au","act.edu.au","catholic.edu.au","nsw.edu.au","nt.edu.au","qld.edu.au","sa.edu.au","tas.edu.au","vic.edu.au","wa.edu.au","qld.gov.au","sa.gov.au","tas.gov.au","vic.gov.au","wa.gov.au","education.tas.edu.au","schools.nsw.edu.au","aw","com.aw","ax","az","com.az","net.az","int.az","gov.az","org.az","edu.az","info.az","pp.az","mil.az","name.az","pro.az","biz.az","ba","com.ba","edu.ba","gov.ba","mil.ba","net.ba","org.ba","bb","biz.bb","co.bb","com.bb","edu.bb","gov.bb","info.bb","net.bb","org.bb","store.bb","tv.bb","*.bd","be","ac.be","bf","gov.bf","bg","a.bg","b.bg","c.bg","d.bg","e.bg","f.bg","g.bg","h.bg","i.bg","j.bg","k.bg","l.bg","m.bg","n.bg","o.bg","p.bg","q.bg","r.bg","s.bg","t.bg","u.bg","v.bg","w.bg","x.bg","y.bg","z.bg","0.bg","1.bg","2.bg","3.bg","4.bg","5.bg","6.bg","7.bg","8.bg","9.bg","bh","com.bh","edu.bh","net.bh","org.bh","gov.bh","bi","co.bi","com.bi","edu.bi","or.bi","org.bi","biz","bj","asso.bj","barreau.bj","gouv.bj","bm","com.bm","edu.bm","gov.bm","net.bm","org.bm","bn","com.bn","edu.bn","gov.bn","net.bn","org.bn","bo","com.bo","edu.bo","gob.bo","int.bo","org.bo","net.bo","mil.bo","tv.bo","web.bo","academia.bo","agro.bo","arte.bo","blog.bo","bolivia.bo","ciencia.bo","cooperativa.bo","democracia.bo","deporte.bo","ecologia.bo","economia.bo","empresa.bo","indigena.bo","industria.bo","info.bo","medicina.bo","movimiento.bo","musica.bo","natural.bo","nombre.bo","noticias.bo","patria.bo","politica.bo","profesional.bo","plurinacional.bo","pueblo.bo","revista.bo","salud.bo","tecnologia.bo","tksat.bo","transporte.bo","wiki.bo","br","9guacu.br","abc.br","adm.br","adv.br","agr.br","aju.br","am.br","anani.br","aparecida.br","arq.br","art.br","ato.br","b.br","barueri.br","belem.br","bhz.br","bio.br","blog.br","bmd.br","boavista.br","bsb.br","campinagrande.br","campinas.br","caxias.br","cim.br","cng.br","cnt.br","com.br","contagem.br","coop.br","cri.br","cuiaba.br","curitiba.br","def.br","ecn.br","eco.br","edu.br","emp.br","eng.br","esp.br","etc.br","eti.br","far.br","feira.br","flog.br","floripa.br","fm.br","fnd.br","fortal.br","fot.br","foz.br","fst.br","g12.br","ggf.br","goiania.br","gov.br","ac.gov.br","al.gov.br","am.gov.br","ap.gov.br","ba.gov.br","ce.gov.br","df.gov.br","es.gov.br","go.gov.br","ma.gov.br","mg.gov.br","ms.gov.br","mt.gov.br","pa.gov.br","pb.gov.br","pe.gov.br","pi.gov.br","pr.gov.br","rj.gov.br","rn.gov.br","ro.gov.br","rr.gov.br","rs.gov.br","sc.gov.br","se.gov.br","sp.gov.br","to.gov.br","gru.br","imb.br","ind.br","inf.br","jab.br","jampa.br","jdf.br","joinville.br","jor.br","jus.br","leg.br","lel.br","londrina.br","macapa.br","maceio.br","manaus.br","maringa.br","mat.br","med.br","mil.br","morena.br","mp.br","mus.br","natal.br","net.br","niteroi.br","*.nom.br","not.br","ntr.br","odo.br","ong.br","org.br","osasco.br","palmas.br","poa.br","ppg.br","pro.br","psc.br","psi.br","pvh.br","qsl.br","radio.br","rec.br","recife.br","ribeirao.br","rio.br","riobranco.br","riopreto.br","salvador.br","sampa.br","santamaria.br","santoandre.br","saobernardo.br","saogonca.br","sjc.br","slg.br","slz.br","sorocaba.br","srv.br","taxi.br","tc.br","teo.br","the.br","tmp.br","trd.br","tur.br","tv.br","udi.br","vet.br","vix.br","vlog.br","wiki.br","zlg.br","bs","com.bs","net.bs","org.bs","edu.bs","gov.bs","bt","com.bt","edu.bt","gov.bt","net.bt","org.bt","bv","bw","co.bw","org.bw","by","gov.by","mil.by","com.by","of.by","bz","com.bz","net.bz","org.bz","edu.bz","gov.bz","ca","ab.ca","bc.ca","mb.ca","nb.ca","nf.ca","nl.ca","ns.ca","nt.ca","nu.ca","on.ca","pe.ca","qc.ca","sk.ca","yk.ca","gc.ca","cat","cc","cd","gov.cd","cf","cg","ch","ci","org.ci","or.ci","com.ci","co.ci","edu.ci","ed.ci","ac.ci","net.ci","go.ci","asso.ci","aéroport.ci","int.ci","presse.ci","md.ci","gouv.ci","*.ck","!www.ck","cl","aprendemas.cl","co.cl","gob.cl","gov.cl","mil.cl","cm","co.cm","com.cm","gov.cm","net.cm","cn","ac.cn","com.cn","edu.cn","gov.cn","net.cn","org.cn","mil.cn","公司.cn","网络.cn","網絡.cn","ah.cn","bj.cn","cq.cn","fj.cn","gd.cn","gs.cn","gz.cn","gx.cn","ha.cn","hb.cn","he.cn","hi.cn","hl.cn","hn.cn","jl.cn","js.cn","jx.cn","ln.cn","nm.cn","nx.cn","qh.cn","sc.cn","sd.cn","sh.cn","sn.cn","sx.cn","tj.cn","xj.cn","xz.cn","yn.cn","zj.cn","hk.cn","mo.cn","tw.cn","co","arts.co","com.co","edu.co","firm.co","gov.co","info.co","int.co","mil.co","net.co","nom.co","org.co","rec.co","web.co","com","coop","cr","ac.cr","co.cr","ed.cr","fi.cr","go.cr","or.cr","sa.cr","cu","com.cu","edu.cu","org.cu","net.cu","gov.cu","inf.cu","cv","cw","com.cw","edu.cw","net.cw","org.cw","cx","gov.cx","cy","ac.cy","biz.cy","com.cy","ekloges.cy","gov.cy","ltd.cy","name.cy","net.cy","org.cy","parliament.cy","press.cy","pro.cy","tm.cy","cz","de","dj","dk","dm","com.dm","net.dm","org.dm","edu.dm","gov.dm","do","art.do","com.do","edu.do","gob.do","gov.do","mil.do","net.do","org.do","sld.do","web.do","dz","com.dz","org.dz","net.dz","gov.dz","edu.dz","asso.dz","pol.dz","art.dz","ec","com.ec","info.ec","net.ec","fin.ec","k12.ec","med.ec","pro.ec","org.ec","edu.ec","gov.ec","gob.ec","mil.ec","edu","ee","edu.ee","gov.ee","riik.ee","lib.ee","med.ee","com.ee","pri.ee","aip.ee","org.ee","fie.ee","eg","com.eg","edu.eg","eun.eg","gov.eg","mil.eg","name.eg","net.eg","org.eg","sci.eg","*.er","es","com.es","nom.es","org.es","gob.es","edu.es","et","com.et","gov.et","org.et","edu.et","biz.et","name.et","info.et","net.et","eu","fi","aland.fi","fj","ac.fj","biz.fj","com.fj","gov.fj","info.fj","mil.fj","name.fj","net.fj","org.fj","pro.fj","*.fk","fm","fo","fr","asso.fr","com.fr","gouv.fr","nom.fr","prd.fr","tm.fr","aeroport.fr","avocat.fr","avoues.fr","cci.fr","chambagri.fr","chirurgiens-dentistes.fr","experts-comptables.fr","geometre-expert.fr","greta.fr","huissier-justice.fr","medecin.fr","notaires.fr","pharmacien.fr","port.fr","veterinaire.fr","ga","gb","gd","ge","com.ge","edu.ge","gov.ge","org.ge","mil.ge","net.ge","pvt.ge","gf","gg","co.gg","net.gg","org.gg","gh","com.gh","edu.gh","gov.gh","org.gh","mil.gh","gi","com.gi","ltd.gi","gov.gi","mod.gi","edu.gi","org.gi","gl","co.gl","com.gl","edu.gl","net.gl","org.gl","gm","gn","ac.gn","com.gn","edu.gn","gov.gn","org.gn","net.gn","gov","gp","com.gp","net.gp","mobi.gp","edu.gp","org.gp","asso.gp","gq","gr","com.gr","edu.gr","net.gr","org.gr","gov.gr","gs","gt","com.gt","edu.gt","gob.gt","ind.gt","mil.gt","net.gt","org.gt","gu","com.gu","edu.gu","gov.gu","guam.gu","info.gu","net.gu","org.gu","web.gu","gw","gy","co.gy","com.gy","edu.gy","gov.gy","net.gy","org.gy","hk","com.hk","edu.hk","gov.hk","idv.hk","net.hk","org.hk","公司.hk","教育.hk","敎育.hk","政府.hk","個人.hk","个人.hk","箇人.hk","網络.hk","网络.hk","组織.hk","網絡.hk","网絡.hk","组织.hk","組織.hk","組织.hk","hm","hn","com.hn","edu.hn","org.hn","net.hn","mil.hn","gob.hn","hr","iz.hr","from.hr","name.hr","com.hr","ht","com.ht","shop.ht","firm.ht","info.ht","adult.ht","net.ht","pro.ht","org.ht","med.ht","art.ht","coop.ht","pol.ht","asso.ht","edu.ht","rel.ht","gouv.ht","perso.ht","hu","co.hu","info.hu","org.hu","priv.hu","sport.hu","tm.hu","2000.hu","agrar.hu","bolt.hu","casino.hu","city.hu","erotica.hu","erotika.hu","film.hu","forum.hu","games.hu","hotel.hu","ingatlan.hu","jogasz.hu","konyvelo.hu","lakas.hu","media.hu","news.hu","reklam.hu","sex.hu","shop.hu","suli.hu","szex.hu","tozsde.hu","utazas.hu","video.hu","id","ac.id","biz.id","co.id","desa.id","go.id","mil.id","my.id","net.id","or.id","ponpes.id","sch.id","web.id","ie","gov.ie","il","ac.il","co.il","gov.il","idf.il","k12.il","muni.il","net.il","org.il","im","ac.im","co.im","com.im","ltd.co.im","net.im","org.im","plc.co.im","tt.im","tv.im","in","co.in","firm.in","net.in","org.in","gen.in","ind.in","nic.in","ac.in","edu.in","res.in","gov.in","mil.in","info","int","eu.int","io","com.io","iq","gov.iq","edu.iq","mil.iq","com.iq","org.iq","net.iq","ir","ac.ir","co.ir","gov.ir","id.ir","net.ir","org.ir","sch.ir","ایران.ir","ايران.ir","is","net.is","com.is","edu.is","gov.is","org.is","int.is","it","gov.it","edu.it","abr.it","abruzzo.it","aosta-valley.it","aostavalley.it","bas.it","basilicata.it","cal.it","calabria.it","cam.it","campania.it","emilia-romagna.it","emiliaromagna.it","emr.it","friuli-v-giulia.it","friuli-ve-giulia.it","friuli-vegiulia.it","friuli-venezia-giulia.it","friuli-veneziagiulia.it","friuli-vgiulia.it","friuliv-giulia.it","friulive-giulia.it","friulivegiulia.it","friulivenezia-giulia.it","friuliveneziagiulia.it","friulivgiulia.it","fvg.it","laz.it","lazio.it","lig.it","liguria.it","lom.it","lombardia.it","lombardy.it","lucania.it","mar.it","marche.it","mol.it","molise.it","piedmont.it","piemonte.it","pmn.it","pug.it","puglia.it","sar.it","sardegna.it","sardinia.it","sic.it","sicilia.it","sicily.it","taa.it","tos.it","toscana.it","trentin-sud-tirol.it","trentin-süd-tirol.it","trentin-sudtirol.it","trentin-südtirol.it","trentin-sued-tirol.it","trentin-suedtirol.it","trentino-a-adige.it","trentino-aadige.it","trentino-alto-adige.it","trentino-altoadige.it","trentino-s-tirol.it","trentino-stirol.it","trentino-sud-tirol.it","trentino-süd-tirol.it","trentino-sudtirol.it","trentino-südtirol.it","trentino-sued-tirol.it","trentino-suedtirol.it","trentino.it","trentinoa-adige.it","trentinoaadige.it","trentinoalto-adige.it","trentinoaltoadige.it","trentinos-tirol.it","trentinostirol.it","trentinosud-tirol.it","trentinosüd-tirol.it","trentinosudtirol.it","trentinosüdtirol.it","trentinosued-tirol.it","trentinosuedtirol.it","trentinsud-tirol.it","trentinsüd-tirol.it","trentinsudtirol.it","trentinsüdtirol.it","trentinsued-tirol.it","trentinsuedtirol.it","tuscany.it","umb.it","umbria.it","val-d-aosta.it","val-daosta.it","vald-aosta.it","valdaosta.it","valle-aosta.it","valle-d-aosta.it","valle-daosta.it","valleaosta.it","valled-aosta.it","valledaosta.it","vallee-aoste.it","vallée-aoste.it","vallee-d-aoste.it","vallée-d-aoste.it","valleeaoste.it","valléeaoste.it","valleedaoste.it","valléedaoste.it","vao.it","vda.it","ven.it","veneto.it","ag.it","agrigento.it","al.it","alessandria.it","alto-adige.it","altoadige.it","an.it","ancona.it","andria-barletta-trani.it","andria-trani-barletta.it","andriabarlettatrani.it","andriatranibarletta.it","ao.it","aosta.it","aoste.it","ap.it","aq.it","aquila.it","ar.it","arezzo.it","ascoli-piceno.it","ascolipiceno.it","asti.it","at.it","av.it","avellino.it","ba.it","balsan-sudtirol.it","balsan-südtirol.it","balsan-suedtirol.it","balsan.it","bari.it","barletta-trani-andria.it","barlettatraniandria.it","belluno.it","benevento.it","bergamo.it","bg.it","bi.it","biella.it","bl.it","bn.it","bo.it","bologna.it","bolzano-altoadige.it","bolzano.it","bozen-sudtirol.it","bozen-südtirol.it","bozen-suedtirol.it","bozen.it","br.it","brescia.it","brindisi.it","bs.it","bt.it","bulsan-sudtirol.it","bulsan-südtirol.it","bulsan-suedtirol.it","bulsan.it","bz.it","ca.it","cagliari.it","caltanissetta.it","campidano-medio.it","campidanomedio.it","campobasso.it","carbonia-iglesias.it","carboniaiglesias.it","carrara-massa.it","carraramassa.it","caserta.it","catania.it","catanzaro.it","cb.it","ce.it","cesena-forli.it","cesena-forlì.it","cesenaforli.it","cesenaforlì.it","ch.it","chieti.it","ci.it","cl.it","cn.it","co.it","como.it","cosenza.it","cr.it","cremona.it","crotone.it","cs.it","ct.it","cuneo.it","cz.it","dell-ogliastra.it","dellogliastra.it","en.it","enna.it","fc.it","fe.it","fermo.it","ferrara.it","fg.it","fi.it","firenze.it","florence.it","fm.it","foggia.it","forli-cesena.it","forlì-cesena.it","forlicesena.it","forlìcesena.it","fr.it","frosinone.it","ge.it","genoa.it","genova.it","go.it","gorizia.it","gr.it","grosseto.it","iglesias-carbonia.it","iglesiascarbonia.it","im.it","imperia.it","is.it","isernia.it","kr.it","la-spezia.it","laquila.it","laspezia.it","latina.it","lc.it","le.it","lecce.it","lecco.it","li.it","livorno.it","lo.it","lodi.it","lt.it","lu.it","lucca.it","macerata.it","mantova.it","massa-carrara.it","massacarrara.it","matera.it","mb.it","mc.it","me.it","medio-campidano.it","mediocampidano.it","messina.it","mi.it","milan.it","milano.it","mn.it","mo.it","modena.it","monza-brianza.it","monza-e-della-brianza.it","monza.it","monzabrianza.it","monzaebrianza.it","monzaedellabrianza.it","ms.it","mt.it","na.it","naples.it","napoli.it","no.it","novara.it","nu.it","nuoro.it","og.it","ogliastra.it","olbia-tempio.it","olbiatempio.it","or.it","oristano.it","ot.it","pa.it","padova.it","padua.it","palermo.it","parma.it","pavia.it","pc.it","pd.it","pe.it","perugia.it","pesaro-urbino.it","pesarourbino.it","pescara.it","pg.it","pi.it","piacenza.it","pisa.it","pistoia.it","pn.it","po.it","pordenone.it","potenza.it","pr.it","prato.it","pt.it","pu.it","pv.it","pz.it","ra.it","ragusa.it","ravenna.it","rc.it","re.it","reggio-calabria.it","reggio-emilia.it","reggiocalabria.it","reggioemilia.it","rg.it","ri.it","rieti.it","rimini.it","rm.it","rn.it","ro.it","roma.it","rome.it","rovigo.it","sa.it","salerno.it","sassari.it","savona.it","si.it","siena.it","siracusa.it","so.it","sondrio.it","sp.it","sr.it","ss.it","suedtirol.it","südtirol.it","sv.it","ta.it","taranto.it","te.it","tempio-olbia.it","tempioolbia.it","teramo.it","terni.it","tn.it","to.it","torino.it","tp.it","tr.it","trani-andria-barletta.it","trani-barletta-andria.it","traniandriabarletta.it","tranibarlettaandria.it","trapani.it","trento.it","treviso.it","trieste.it","ts.it","turin.it","tv.it","ud.it","udine.it","urbino-pesaro.it","urbinopesaro.it","va.it","varese.it","vb.it","vc.it","ve.it","venezia.it","venice.it","verbania.it","vercelli.it","verona.it","vi.it","vibo-valentia.it","vibovalentia.it","vicenza.it","viterbo.it","vr.it","vs.it","vt.it","vv.it","je","co.je","net.je","org.je","*.jm","jo","com.jo","org.jo","net.jo","edu.jo","sch.jo","gov.jo","mil.jo","name.jo","jobs","jp","ac.jp","ad.jp","co.jp","ed.jp","go.jp","gr.jp","lg.jp","ne.jp","or.jp","aichi.jp","akita.jp","aomori.jp","chiba.jp","ehime.jp","fukui.jp","fukuoka.jp","fukushima.jp","gifu.jp","gunma.jp","hiroshima.jp","hokkaido.jp","hyogo.jp","ibaraki.jp","ishikawa.jp","iwate.jp","kagawa.jp","kagoshima.jp","kanagawa.jp","kochi.jp","kumamoto.jp","kyoto.jp","mie.jp","miyagi.jp","miyazaki.jp","nagano.jp","nagasaki.jp","nara.jp","niigata.jp","oita.jp","okayama.jp","okinawa.jp","osaka.jp","saga.jp","saitama.jp","shiga.jp","shimane.jp","shizuoka.jp","tochigi.jp","tokushima.jp","tokyo.jp","tottori.jp","toyama.jp","wakayama.jp","yamagata.jp","yamaguchi.jp","yamanashi.jp","栃木.jp","愛知.jp","愛媛.jp","兵庫.jp","熊本.jp","茨城.jp","北海道.jp","千葉.jp","和歌山.jp","長崎.jp","長野.jp","新潟.jp","青森.jp","静岡.jp","東京.jp","石川.jp","埼玉.jp","三重.jp","京都.jp","佐賀.jp","大分.jp","大阪.jp","奈良.jp","宮城.jp","宮崎.jp","富山.jp","山口.jp","山形.jp","山梨.jp","岩手.jp","岐阜.jp","岡山.jp","島根.jp","広島.jp","徳島.jp","沖縄.jp","滋賀.jp","神奈川.jp","福井.jp","福岡.jp","福島.jp","秋田.jp","群馬.jp","香川.jp","高知.jp","鳥取.jp","鹿児島.jp","*.kawasaki.jp","*.kitakyushu.jp","*.kobe.jp","*.nagoya.jp","*.sapporo.jp","*.sendai.jp","*.yokohama.jp","!city.kawasaki.jp","!city.kitakyushu.jp","!city.kobe.jp","!city.nagoya.jp","!city.sapporo.jp","!city.sendai.jp","!city.yokohama.jp","aisai.aichi.jp","ama.aichi.jp","anjo.aichi.jp","asuke.aichi.jp","chiryu.aichi.jp","chita.aichi.jp","fuso.aichi.jp","gamagori.aichi.jp","handa.aichi.jp","hazu.aichi.jp","hekinan.aichi.jp","higashiura.aichi.jp","ichinomiya.aichi.jp","inazawa.aichi.jp","inuyama.aichi.jp","isshiki.aichi.jp","iwakura.aichi.jp","kanie.aichi.jp","kariya.aichi.jp","kasugai.aichi.jp","kira.aichi.jp","kiyosu.aichi.jp","komaki.aichi.jp","konan.aichi.jp","kota.aichi.jp","mihama.aichi.jp","miyoshi.aichi.jp","nishio.aichi.jp","nisshin.aichi.jp","obu.aichi.jp","oguchi.aichi.jp","oharu.aichi.jp","okazaki.aichi.jp","owariasahi.aichi.jp","seto.aichi.jp","shikatsu.aichi.jp","shinshiro.aichi.jp","shitara.aichi.jp","tahara.aichi.jp","takahama.aichi.jp","tobishima.aichi.jp","toei.aichi.jp","togo.aichi.jp","tokai.aichi.jp","tokoname.aichi.jp","toyoake.aichi.jp","toyohashi.aichi.jp","toyokawa.aichi.jp","toyone.aichi.jp","toyota.aichi.jp","tsushima.aichi.jp","yatomi.aichi.jp","akita.akita.jp","daisen.akita.jp","fujisato.akita.jp","gojome.akita.jp","hachirogata.akita.jp","happou.akita.jp","higashinaruse.akita.jp","honjo.akita.jp","honjyo.akita.jp","ikawa.akita.jp","kamikoani.akita.jp","kamioka.akita.jp","katagami.akita.jp","kazuno.akita.jp","kitaakita.akita.jp","kosaka.akita.jp","kyowa.akita.jp","misato.akita.jp","mitane.akita.jp","moriyoshi.akita.jp","nikaho.akita.jp","noshiro.akita.jp","odate.akita.jp","oga.akita.jp","ogata.akita.jp","semboku.akita.jp","yokote.akita.jp","yurihonjo.akita.jp","aomori.aomori.jp","gonohe.aomori.jp","hachinohe.aomori.jp","hashikami.aomori.jp","hiranai.aomori.jp","hirosaki.aomori.jp","itayanagi.aomori.jp","kuroishi.aomori.jp","misawa.aomori.jp","mutsu.aomori.jp","nakadomari.aomori.jp","noheji.aomori.jp","oirase.aomori.jp","owani.aomori.jp","rokunohe.aomori.jp","sannohe.aomori.jp","shichinohe.aomori.jp","shingo.aomori.jp","takko.aomori.jp","towada.aomori.jp","tsugaru.aomori.jp","tsuruta.aomori.jp","abiko.chiba.jp","asahi.chiba.jp","chonan.chiba.jp","chosei.chiba.jp","choshi.chiba.jp","chuo.chiba.jp","funabashi.chiba.jp","futtsu.chiba.jp","hanamigawa.chiba.jp","ichihara.chiba.jp","ichikawa.chiba.jp","ichinomiya.chiba.jp","inzai.chiba.jp","isumi.chiba.jp","kamagaya.chiba.jp","kamogawa.chiba.jp","kashiwa.chiba.jp","katori.chiba.jp","katsuura.chiba.jp","kimitsu.chiba.jp","kisarazu.chiba.jp","kozaki.chiba.jp","kujukuri.chiba.jp","kyonan.chiba.jp","matsudo.chiba.jp","midori.chiba.jp","mihama.chiba.jp","minamiboso.chiba.jp","mobara.chiba.jp","mutsuzawa.chiba.jp","nagara.chiba.jp","nagareyama.chiba.jp","narashino.chiba.jp","narita.chiba.jp","noda.chiba.jp","oamishirasato.chiba.jp","omigawa.chiba.jp","onjuku.chiba.jp","otaki.chiba.jp","sakae.chiba.jp","sakura.chiba.jp","shimofusa.chiba.jp","shirako.chiba.jp","shiroi.chiba.jp","shisui.chiba.jp","sodegaura.chiba.jp","sosa.chiba.jp","tako.chiba.jp","tateyama.chiba.jp","togane.chiba.jp","tohnosho.chiba.jp","tomisato.chiba.jp","urayasu.chiba.jp","yachimata.chiba.jp","yachiyo.chiba.jp","yokaichiba.chiba.jp","yokoshibahikari.chiba.jp","yotsukaido.chiba.jp","ainan.ehime.jp","honai.ehime.jp","ikata.ehime.jp","imabari.ehime.jp","iyo.ehime.jp","kamijima.ehime.jp","kihoku.ehime.jp","kumakogen.ehime.jp","masaki.ehime.jp","matsuno.ehime.jp","matsuyama.ehime.jp","namikata.ehime.jp","niihama.ehime.jp","ozu.ehime.jp","saijo.ehime.jp","seiyo.ehime.jp","shikokuchuo.ehime.jp","tobe.ehime.jp","toon.ehime.jp","uchiko.ehime.jp","uwajima.ehime.jp","yawatahama.ehime.jp","echizen.fukui.jp","eiheiji.fukui.jp","fukui.fukui.jp","ikeda.fukui.jp","katsuyama.fukui.jp","mihama.fukui.jp","minamiechizen.fukui.jp","obama.fukui.jp","ohi.fukui.jp","ono.fukui.jp","sabae.fukui.jp","sakai.fukui.jp","takahama.fukui.jp","tsuruga.fukui.jp","wakasa.fukui.jp","ashiya.fukuoka.jp","buzen.fukuoka.jp","chikugo.fukuoka.jp","chikuho.fukuoka.jp","chikujo.fukuoka.jp","chikushino.fukuoka.jp","chikuzen.fukuoka.jp","chuo.fukuoka.jp","dazaifu.fukuoka.jp","fukuchi.fukuoka.jp","hakata.fukuoka.jp","higashi.fukuoka.jp","hirokawa.fukuoka.jp","hisayama.fukuoka.jp","iizuka.fukuoka.jp","inatsuki.fukuoka.jp","kaho.fukuoka.jp","kasuga.fukuoka.jp","kasuya.fukuoka.jp","kawara.fukuoka.jp","keisen.fukuoka.jp","koga.fukuoka.jp","kurate.fukuoka.jp","kurogi.fukuoka.jp","kurume.fukuoka.jp","minami.fukuoka.jp","miyako.fukuoka.jp","miyama.fukuoka.jp","miyawaka.fukuoka.jp","mizumaki.fukuoka.jp","munakata.fukuoka.jp","nakagawa.fukuoka.jp","nakama.fukuoka.jp","nishi.fukuoka.jp","nogata.fukuoka.jp","ogori.fukuoka.jp","okagaki.fukuoka.jp","okawa.fukuoka.jp","oki.fukuoka.jp","omuta.fukuoka.jp","onga.fukuoka.jp","onojo.fukuoka.jp","oto.fukuoka.jp","saigawa.fukuoka.jp","sasaguri.fukuoka.jp","shingu.fukuoka.jp","shinyoshitomi.fukuoka.jp","shonai.fukuoka.jp","soeda.fukuoka.jp","sue.fukuoka.jp","tachiarai.fukuoka.jp","tagawa.fukuoka.jp","takata.fukuoka.jp","toho.fukuoka.jp","toyotsu.fukuoka.jp","tsuiki.fukuoka.jp","ukiha.fukuoka.jp","umi.fukuoka.jp","usui.fukuoka.jp","yamada.fukuoka.jp","yame.fukuoka.jp","yanagawa.fukuoka.jp","yukuhashi.fukuoka.jp","aizubange.fukushima.jp","aizumisato.fukushima.jp","aizuwakamatsu.fukushima.jp","asakawa.fukushima.jp","bandai.fukushima.jp","date.fukushima.jp","fukushima.fukushima.jp","furudono.fukushima.jp","futaba.fukushima.jp","hanawa.fukushima.jp","higashi.fukushima.jp","hirata.fukushima.jp","hirono.fukushima.jp","iitate.fukushima.jp","inawashiro.fukushima.jp","ishikawa.fukushima.jp","iwaki.fukushima.jp","izumizaki.fukushima.jp","kagamiishi.fukushima.jp","kaneyama.fukushima.jp","kawamata.fukushima.jp","kitakata.fukushima.jp","kitashiobara.fukushima.jp","koori.fukushima.jp","koriyama.fukushima.jp","kunimi.fukushima.jp","miharu.fukushima.jp","mishima.fukushima.jp","namie.fukushima.jp","nango.fukushima.jp","nishiaizu.fukushima.jp","nishigo.fukushima.jp","okuma.fukushima.jp","omotego.fukushima.jp","ono.fukushima.jp","otama.fukushima.jp","samegawa.fukushima.jp","shimogo.fukushima.jp","shirakawa.fukushima.jp","showa.fukushima.jp","soma.fukushima.jp","sukagawa.fukushima.jp","taishin.fukushima.jp","tamakawa.fukushima.jp","tanagura.fukushima.jp","tenei.fukushima.jp","yabuki.fukushima.jp","yamato.fukushima.jp","yamatsuri.fukushima.jp","yanaizu.fukushima.jp","yugawa.fukushima.jp","anpachi.gifu.jp","ena.gifu.jp","gifu.gifu.jp","ginan.gifu.jp","godo.gifu.jp","gujo.gifu.jp","hashima.gifu.jp","hichiso.gifu.jp","hida.gifu.jp","higashishirakawa.gifu.jp","ibigawa.gifu.jp","ikeda.gifu.jp","kakamigahara.gifu.jp","kani.gifu.jp","kasahara.gifu.jp","kasamatsu.gifu.jp","kawaue.gifu.jp","kitagata.gifu.jp","mino.gifu.jp","minokamo.gifu.jp","mitake.gifu.jp","mizunami.gifu.jp","motosu.gifu.jp","nakatsugawa.gifu.jp","ogaki.gifu.jp","sakahogi.gifu.jp","seki.gifu.jp","sekigahara.gifu.jp","shirakawa.gifu.jp","tajimi.gifu.jp","takayama.gifu.jp","tarui.gifu.jp","toki.gifu.jp","tomika.gifu.jp","wanouchi.gifu.jp","yamagata.gifu.jp","yaotsu.gifu.jp","yoro.gifu.jp","annaka.gunma.jp","chiyoda.gunma.jp","fujioka.gunma.jp","higashiagatsuma.gunma.jp","isesaki.gunma.jp","itakura.gunma.jp","kanna.gunma.jp","kanra.gunma.jp","katashina.gunma.jp","kawaba.gunma.jp","kiryu.gunma.jp","kusatsu.gunma.jp","maebashi.gunma.jp","meiwa.gunma.jp","midori.gunma.jp","minakami.gunma.jp","naganohara.gunma.jp","nakanojo.gunma.jp","nanmoku.gunma.jp","numata.gunma.jp","oizumi.gunma.jp","ora.gunma.jp","ota.gunma.jp","shibukawa.gunma.jp","shimonita.gunma.jp","shinto.gunma.jp","showa.gunma.jp","takasaki.gunma.jp","takayama.gunma.jp","tamamura.gunma.jp","tatebayashi.gunma.jp","tomioka.gunma.jp","tsukiyono.gunma.jp","tsumagoi.gunma.jp","ueno.gunma.jp","yoshioka.gunma.jp","asaminami.hiroshima.jp","daiwa.hiroshima.jp","etajima.hiroshima.jp","fuchu.hiroshima.jp","fukuyama.hiroshima.jp","hatsukaichi.hiroshima.jp","higashihiroshima.hiroshima.jp","hongo.hiroshima.jp","jinsekikogen.hiroshima.jp","kaita.hiroshima.jp","kui.hiroshima.jp","kumano.hiroshima.jp","kure.hiroshima.jp","mihara.hiroshima.jp","miyoshi.hiroshima.jp","naka.hiroshima.jp","onomichi.hiroshima.jp","osakikamijima.hiroshima.jp","otake.hiroshima.jp","saka.hiroshima.jp","sera.hiroshima.jp","seranishi.hiroshima.jp","shinichi.hiroshima.jp","shobara.hiroshima.jp","takehara.hiroshima.jp","abashiri.hokkaido.jp","abira.hokkaido.jp","aibetsu.hokkaido.jp","akabira.hokkaido.jp","akkeshi.hokkaido.jp","asahikawa.hokkaido.jp","ashibetsu.hokkaido.jp","ashoro.hokkaido.jp","assabu.hokkaido.jp","atsuma.hokkaido.jp","bibai.hokkaido.jp","biei.hokkaido.jp","bifuka.hokkaido.jp","bihoro.hokkaido.jp","biratori.hokkaido.jp","chippubetsu.hokkaido.jp","chitose.hokkaido.jp","date.hokkaido.jp","ebetsu.hokkaido.jp","embetsu.hokkaido.jp","eniwa.hokkaido.jp","erimo.hokkaido.jp","esan.hokkaido.jp","esashi.hokkaido.jp","fukagawa.hokkaido.jp","fukushima.hokkaido.jp","furano.hokkaido.jp","furubira.hokkaido.jp","haboro.hokkaido.jp","hakodate.hokkaido.jp","hamatonbetsu.hokkaido.jp","hidaka.hokkaido.jp","higashikagura.hokkaido.jp","higashikawa.hokkaido.jp","hiroo.hokkaido.jp","hokuryu.hokkaido.jp","hokuto.hokkaido.jp","honbetsu.hokkaido.jp","horokanai.hokkaido.jp","horonobe.hokkaido.jp","ikeda.hokkaido.jp","imakane.hokkaido.jp","ishikari.hokkaido.jp","iwamizawa.hokkaido.jp","iwanai.hokkaido.jp","kamifurano.hokkaido.jp","kamikawa.hokkaido.jp","kamishihoro.hokkaido.jp","kamisunagawa.hokkaido.jp","kamoenai.hokkaido.jp","kayabe.hokkaido.jp","kembuchi.hokkaido.jp","kikonai.hokkaido.jp","kimobetsu.hokkaido.jp","kitahiroshima.hokkaido.jp","kitami.hokkaido.jp","kiyosato.hokkaido.jp","koshimizu.hokkaido.jp","kunneppu.hokkaido.jp","kuriyama.hokkaido.jp","kuromatsunai.hokkaido.jp","kushiro.hokkaido.jp","kutchan.hokkaido.jp","kyowa.hokkaido.jp","mashike.hokkaido.jp","matsumae.hokkaido.jp","mikasa.hokkaido.jp","minamifurano.hokkaido.jp","mombetsu.hokkaido.jp","moseushi.hokkaido.jp","mukawa.hokkaido.jp","muroran.hokkaido.jp","naie.hokkaido.jp","nakagawa.hokkaido.jp","nakasatsunai.hokkaido.jp","nakatombetsu.hokkaido.jp","nanae.hokkaido.jp","nanporo.hokkaido.jp","nayoro.hokkaido.jp","nemuro.hokkaido.jp","niikappu.hokkaido.jp","niki.hokkaido.jp","nishiokoppe.hokkaido.jp","noboribetsu.hokkaido.jp","numata.hokkaido.jp","obihiro.hokkaido.jp","obira.hokkaido.jp","oketo.hokkaido.jp","okoppe.hokkaido.jp","otaru.hokkaido.jp","otobe.hokkaido.jp","otofuke.hokkaido.jp","otoineppu.hokkaido.jp","oumu.hokkaido.jp","ozora.hokkaido.jp","pippu.hokkaido.jp","rankoshi.hokkaido.jp","rebun.hokkaido.jp","rikubetsu.hokkaido.jp","rishiri.hokkaido.jp","rishirifuji.hokkaido.jp","saroma.hokkaido.jp","sarufutsu.hokkaido.jp","shakotan.hokkaido.jp","shari.hokkaido.jp","shibecha.hokkaido.jp","shibetsu.hokkaido.jp","shikabe.hokkaido.jp","shikaoi.hokkaido.jp","shimamaki.hokkaido.jp","shimizu.hokkaido.jp","shimokawa.hokkaido.jp","shinshinotsu.hokkaido.jp","shintoku.hokkaido.jp","shiranuka.hokkaido.jp","shiraoi.hokkaido.jp","shiriuchi.hokkaido.jp","sobetsu.hokkaido.jp","sunagawa.hokkaido.jp","taiki.hokkaido.jp","takasu.hokkaido.jp","takikawa.hokkaido.jp","takinoue.hokkaido.jp","teshikaga.hokkaido.jp","tobetsu.hokkaido.jp","tohma.hokkaido.jp","tomakomai.hokkaido.jp","tomari.hokkaido.jp","toya.hokkaido.jp","toyako.hokkaido.jp","toyotomi.hokkaido.jp","toyoura.hokkaido.jp","tsubetsu.hokkaido.jp","tsukigata.hokkaido.jp","urakawa.hokkaido.jp","urausu.hokkaido.jp","uryu.hokkaido.jp","utashinai.hokkaido.jp","wakkanai.hokkaido.jp","wassamu.hokkaido.jp","yakumo.hokkaido.jp","yoichi.hokkaido.jp","aioi.hyogo.jp","akashi.hyogo.jp","ako.hyogo.jp","amagasaki.hyogo.jp","aogaki.hyogo.jp","asago.hyogo.jp","ashiya.hyogo.jp","awaji.hyogo.jp","fukusaki.hyogo.jp","goshiki.hyogo.jp","harima.hyogo.jp","himeji.hyogo.jp","ichikawa.hyogo.jp","inagawa.hyogo.jp","itami.hyogo.jp","kakogawa.hyogo.jp","kamigori.hyogo.jp","kamikawa.hyogo.jp","kasai.hyogo.jp","kasuga.hyogo.jp","kawanishi.hyogo.jp","miki.hyogo.jp","minamiawaji.hyogo.jp","nishinomiya.hyogo.jp","nishiwaki.hyogo.jp","ono.hyogo.jp","sanda.hyogo.jp","sannan.hyogo.jp","sasayama.hyogo.jp","sayo.hyogo.jp","shingu.hyogo.jp","shinonsen.hyogo.jp","shiso.hyogo.jp","sumoto.hyogo.jp","taishi.hyogo.jp","taka.hyogo.jp","takarazuka.hyogo.jp","takasago.hyogo.jp","takino.hyogo.jp","tamba.hyogo.jp","tatsuno.hyogo.jp","toyooka.hyogo.jp","yabu.hyogo.jp","yashiro.hyogo.jp","yoka.hyogo.jp","yokawa.hyogo.jp","ami.ibaraki.jp","asahi.ibaraki.jp","bando.ibaraki.jp","chikusei.ibaraki.jp","daigo.ibaraki.jp","fujishiro.ibaraki.jp","hitachi.ibaraki.jp","hitachinaka.ibaraki.jp","hitachiomiya.ibaraki.jp","hitachiota.ibaraki.jp","ibaraki.ibaraki.jp","ina.ibaraki.jp","inashiki.ibaraki.jp","itako.ibaraki.jp","iwama.ibaraki.jp","joso.ibaraki.jp","kamisu.ibaraki.jp","kasama.ibaraki.jp","kashima.ibaraki.jp","kasumigaura.ibaraki.jp","koga.ibaraki.jp","miho.ibaraki.jp","mito.ibaraki.jp","moriya.ibaraki.jp","naka.ibaraki.jp","namegata.ibaraki.jp","oarai.ibaraki.jp","ogawa.ibaraki.jp","omitama.ibaraki.jp","ryugasaki.ibaraki.jp","sakai.ibaraki.jp","sakuragawa.ibaraki.jp","shimodate.ibaraki.jp","shimotsuma.ibaraki.jp","shirosato.ibaraki.jp","sowa.ibaraki.jp","suifu.ibaraki.jp","takahagi.ibaraki.jp","tamatsukuri.ibaraki.jp","tokai.ibaraki.jp","tomobe.ibaraki.jp","tone.ibaraki.jp","toride.ibaraki.jp","tsuchiura.ibaraki.jp","tsukuba.ibaraki.jp","uchihara.ibaraki.jp","ushiku.ibaraki.jp","yachiyo.ibaraki.jp","yamagata.ibaraki.jp","yawara.ibaraki.jp","yuki.ibaraki.jp","anamizu.ishikawa.jp","hakui.ishikawa.jp","hakusan.ishikawa.jp","kaga.ishikawa.jp","kahoku.ishikawa.jp","kanazawa.ishikawa.jp","kawakita.ishikawa.jp","komatsu.ishikawa.jp","nakanoto.ishikawa.jp","nanao.ishikawa.jp","nomi.ishikawa.jp","nonoichi.ishikawa.jp","noto.ishikawa.jp","shika.ishikawa.jp","suzu.ishikawa.jp","tsubata.ishikawa.jp","tsurugi.ishikawa.jp","uchinada.ishikawa.jp","wajima.ishikawa.jp","fudai.iwate.jp","fujisawa.iwate.jp","hanamaki.iwate.jp","hiraizumi.iwate.jp","hirono.iwate.jp","ichinohe.iwate.jp","ichinoseki.iwate.jp","iwaizumi.iwate.jp","iwate.iwate.jp","joboji.iwate.jp","kamaishi.iwate.jp","kanegasaki.iwate.jp","karumai.iwate.jp","kawai.iwate.jp","kitakami.iwate.jp","kuji.iwate.jp","kunohe.iwate.jp","kuzumaki.iwate.jp","miyako.iwate.jp","mizusawa.iwate.jp","morioka.iwate.jp","ninohe.iwate.jp","noda.iwate.jp","ofunato.iwate.jp","oshu.iwate.jp","otsuchi.iwate.jp","rikuzentakata.iwate.jp","shiwa.iwate.jp","shizukuishi.iwate.jp","sumita.iwate.jp","tanohata.iwate.jp","tono.iwate.jp","yahaba.iwate.jp","yamada.iwate.jp","ayagawa.kagawa.jp","higashikagawa.kagawa.jp","kanonji.kagawa.jp","kotohira.kagawa.jp","manno.kagawa.jp","marugame.kagawa.jp","mitoyo.kagawa.jp","naoshima.kagawa.jp","sanuki.kagawa.jp","tadotsu.kagawa.jp","takamatsu.kagawa.jp","tonosho.kagawa.jp","uchinomi.kagawa.jp","utazu.kagawa.jp","zentsuji.kagawa.jp","akune.kagoshima.jp","amami.kagoshima.jp","hioki.kagoshima.jp","isa.kagoshima.jp","isen.kagoshima.jp","izumi.kagoshima.jp","kagoshima.kagoshima.jp","kanoya.kagoshima.jp","kawanabe.kagoshima.jp","kinko.kagoshima.jp","kouyama.kagoshima.jp","makurazaki.kagoshima.jp","matsumoto.kagoshima.jp","minamitane.kagoshima.jp","nakatane.kagoshima.jp","nishinoomote.kagoshima.jp","satsumasendai.kagoshima.jp","soo.kagoshima.jp","tarumizu.kagoshima.jp","yusui.kagoshima.jp","aikawa.kanagawa.jp","atsugi.kanagawa.jp","ayase.kanagawa.jp","chigasaki.kanagawa.jp","ebina.kanagawa.jp","fujisawa.kanagawa.jp","hadano.kanagawa.jp","hakone.kanagawa.jp","hiratsuka.kanagawa.jp","isehara.kanagawa.jp","kaisei.kanagawa.jp","kamakura.kanagawa.jp","kiyokawa.kanagawa.jp","matsuda.kanagawa.jp","minamiashigara.kanagawa.jp","miura.kanagawa.jp","nakai.kanagawa.jp","ninomiya.kanagawa.jp","odawara.kanagawa.jp","oi.kanagawa.jp","oiso.kanagawa.jp","sagamihara.kanagawa.jp","samukawa.kanagawa.jp","tsukui.kanagawa.jp","yamakita.kanagawa.jp","yamato.kanagawa.jp","yokosuka.kanagawa.jp","yugawara.kanagawa.jp","zama.kanagawa.jp","zushi.kanagawa.jp","aki.kochi.jp","geisei.kochi.jp","hidaka.kochi.jp","higashitsuno.kochi.jp","ino.kochi.jp","kagami.kochi.jp","kami.kochi.jp","kitagawa.kochi.jp","kochi.kochi.jp","mihara.kochi.jp","motoyama.kochi.jp","muroto.kochi.jp","nahari.kochi.jp","nakamura.kochi.jp","nankoku.kochi.jp","nishitosa.kochi.jp","niyodogawa.kochi.jp","ochi.kochi.jp","okawa.kochi.jp","otoyo.kochi.jp","otsuki.kochi.jp","sakawa.kochi.jp","sukumo.kochi.jp","susaki.kochi.jp","tosa.kochi.jp","tosashimizu.kochi.jp","toyo.kochi.jp","tsuno.kochi.jp","umaji.kochi.jp","yasuda.kochi.jp","yusuhara.kochi.jp","amakusa.kumamoto.jp","arao.kumamoto.jp","aso.kumamoto.jp","choyo.kumamoto.jp","gyokuto.kumamoto.jp","kamiamakusa.kumamoto.jp","kikuchi.kumamoto.jp","kumamoto.kumamoto.jp","mashiki.kumamoto.jp","mifune.kumamoto.jp","minamata.kumamoto.jp","minamioguni.kumamoto.jp","nagasu.kumamoto.jp","nishihara.kumamoto.jp","oguni.kumamoto.jp","ozu.kumamoto.jp","sumoto.kumamoto.jp","takamori.kumamoto.jp","uki.kumamoto.jp","uto.kumamoto.jp","yamaga.kumamoto.jp","yamato.kumamoto.jp","yatsushiro.kumamoto.jp","ayabe.kyoto.jp","fukuchiyama.kyoto.jp","higashiyama.kyoto.jp","ide.kyoto.jp","ine.kyoto.jp","joyo.kyoto.jp","kameoka.kyoto.jp","kamo.kyoto.jp","kita.kyoto.jp","kizu.kyoto.jp","kumiyama.kyoto.jp","kyotamba.kyoto.jp","kyotanabe.kyoto.jp","kyotango.kyoto.jp","maizuru.kyoto.jp","minami.kyoto.jp","minamiyamashiro.kyoto.jp","miyazu.kyoto.jp","muko.kyoto.jp","nagaokakyo.kyoto.jp","nakagyo.kyoto.jp","nantan.kyoto.jp","oyamazaki.kyoto.jp","sakyo.kyoto.jp","seika.kyoto.jp","tanabe.kyoto.jp","uji.kyoto.jp","ujitawara.kyoto.jp","wazuka.kyoto.jp","yamashina.kyoto.jp","yawata.kyoto.jp","asahi.mie.jp","inabe.mie.jp","ise.mie.jp","kameyama.mie.jp","kawagoe.mie.jp","kiho.mie.jp","kisosaki.mie.jp","kiwa.mie.jp","komono.mie.jp","kumano.mie.jp","kuwana.mie.jp","matsusaka.mie.jp","meiwa.mie.jp","mihama.mie.jp","minamiise.mie.jp","misugi.mie.jp","miyama.mie.jp","nabari.mie.jp","shima.mie.jp","suzuka.mie.jp","tado.mie.jp","taiki.mie.jp","taki.mie.jp","tamaki.mie.jp","toba.mie.jp","tsu.mie.jp","udono.mie.jp","ureshino.mie.jp","watarai.mie.jp","yokkaichi.mie.jp","furukawa.miyagi.jp","higashimatsushima.miyagi.jp","ishinomaki.miyagi.jp","iwanuma.miyagi.jp","kakuda.miyagi.jp","kami.miyagi.jp","kawasaki.miyagi.jp","marumori.miyagi.jp","matsushima.miyagi.jp","minamisanriku.miyagi.jp","misato.miyagi.jp","murata.miyagi.jp","natori.miyagi.jp","ogawara.miyagi.jp","ohira.miyagi.jp","onagawa.miyagi.jp","osaki.miyagi.jp","rifu.miyagi.jp","semine.miyagi.jp","shibata.miyagi.jp","shichikashuku.miyagi.jp","shikama.miyagi.jp","shiogama.miyagi.jp","shiroishi.miyagi.jp","tagajo.miyagi.jp","taiwa.miyagi.jp","tome.miyagi.jp","tomiya.miyagi.jp","wakuya.miyagi.jp","watari.miyagi.jp","yamamoto.miyagi.jp","zao.miyagi.jp","aya.miyazaki.jp","ebino.miyazaki.jp","gokase.miyazaki.jp","hyuga.miyazaki.jp","kadogawa.miyazaki.jp","kawaminami.miyazaki.jp","kijo.miyazaki.jp","kitagawa.miyazaki.jp","kitakata.miyazaki.jp","kitaura.miyazaki.jp","kobayashi.miyazaki.jp","kunitomi.miyazaki.jp","kushima.miyazaki.jp","mimata.miyazaki.jp","miyakonojo.miyazaki.jp","miyazaki.miyazaki.jp","morotsuka.miyazaki.jp","nichinan.miyazaki.jp","nishimera.miyazaki.jp","nobeoka.miyazaki.jp","saito.miyazaki.jp","shiiba.miyazaki.jp","shintomi.miyazaki.jp","takaharu.miyazaki.jp","takanabe.miyazaki.jp","takazaki.miyazaki.jp","tsuno.miyazaki.jp","achi.nagano.jp","agematsu.nagano.jp","anan.nagano.jp","aoki.nagano.jp","asahi.nagano.jp","azumino.nagano.jp","chikuhoku.nagano.jp","chikuma.nagano.jp","chino.nagano.jp","fujimi.nagano.jp","hakuba.nagano.jp","hara.nagano.jp","hiraya.nagano.jp","iida.nagano.jp","iijima.nagano.jp","iiyama.nagano.jp","iizuna.nagano.jp","ikeda.nagano.jp","ikusaka.nagano.jp","ina.nagano.jp","karuizawa.nagano.jp","kawakami.nagano.jp","kiso.nagano.jp","kisofukushima.nagano.jp","kitaaiki.nagano.jp","komagane.nagano.jp","komoro.nagano.jp","matsukawa.nagano.jp","matsumoto.nagano.jp","miasa.nagano.jp","minamiaiki.nagano.jp","minamimaki.nagano.jp","minamiminowa.nagano.jp","minowa.nagano.jp","miyada.nagano.jp","miyota.nagano.jp","mochizuki.nagano.jp","nagano.nagano.jp","nagawa.nagano.jp","nagiso.nagano.jp","nakagawa.nagano.jp","nakano.nagano.jp","nozawaonsen.nagano.jp","obuse.nagano.jp","ogawa.nagano.jp","okaya.nagano.jp","omachi.nagano.jp","omi.nagano.jp","ookuwa.nagano.jp","ooshika.nagano.jp","otaki.nagano.jp","otari.nagano.jp","sakae.nagano.jp","sakaki.nagano.jp","saku.nagano.jp","sakuho.nagano.jp","shimosuwa.nagano.jp","shinanomachi.nagano.jp","shiojiri.nagano.jp","suwa.nagano.jp","suzaka.nagano.jp","takagi.nagano.jp","takamori.nagano.jp","takayama.nagano.jp","tateshina.nagano.jp","tatsuno.nagano.jp","togakushi.nagano.jp","togura.nagano.jp","tomi.nagano.jp","ueda.nagano.jp","wada.nagano.jp","yamagata.nagano.jp","yamanouchi.nagano.jp","yasaka.nagano.jp","yasuoka.nagano.jp","chijiwa.nagasaki.jp","futsu.nagasaki.jp","goto.nagasaki.jp","hasami.nagasaki.jp","hirado.nagasaki.jp","iki.nagasaki.jp","isahaya.nagasaki.jp","kawatana.nagasaki.jp","kuchinotsu.nagasaki.jp","matsuura.nagasaki.jp","nagasaki.nagasaki.jp","obama.nagasaki.jp","omura.nagasaki.jp","oseto.nagasaki.jp","saikai.nagasaki.jp","sasebo.nagasaki.jp","seihi.nagasaki.jp","shimabara.nagasaki.jp","shinkamigoto.nagasaki.jp","togitsu.nagasaki.jp","tsushima.nagasaki.jp","unzen.nagasaki.jp","ando.nara.jp","gose.nara.jp","heguri.nara.jp","higashiyoshino.nara.jp","ikaruga.nara.jp","ikoma.nara.jp","kamikitayama.nara.jp","kanmaki.nara.jp","kashiba.nara.jp","kashihara.nara.jp","katsuragi.nara.jp","kawai.nara.jp","kawakami.nara.jp","kawanishi.nara.jp","koryo.nara.jp","kurotaki.nara.jp","mitsue.nara.jp","miyake.nara.jp","nara.nara.jp","nosegawa.nara.jp","oji.nara.jp","ouda.nara.jp","oyodo.nara.jp","sakurai.nara.jp","sango.nara.jp","shimoichi.nara.jp","shimokitayama.nara.jp","shinjo.nara.jp","soni.nara.jp","takatori.nara.jp","tawaramoto.nara.jp","tenkawa.nara.jp","tenri.nara.jp","uda.nara.jp","yamatokoriyama.nara.jp","yamatotakada.nara.jp","yamazoe.nara.jp","yoshino.nara.jp","aga.niigata.jp","agano.niigata.jp","gosen.niigata.jp","itoigawa.niigata.jp","izumozaki.niigata.jp","joetsu.niigata.jp","kamo.niigata.jp","kariwa.niigata.jp","kashiwazaki.niigata.jp","minamiuonuma.niigata.jp","mitsuke.niigata.jp","muika.niigata.jp","murakami.niigata.jp","myoko.niigata.jp","nagaoka.niigata.jp","niigata.niigata.jp","ojiya.niigata.jp","omi.niigata.jp","sado.niigata.jp","sanjo.niigata.jp","seiro.niigata.jp","seirou.niigata.jp","sekikawa.niigata.jp","shibata.niigata.jp","tagami.niigata.jp","tainai.niigata.jp","tochio.niigata.jp","tokamachi.niigata.jp","tsubame.niigata.jp","tsunan.niigata.jp","uonuma.niigata.jp","yahiko.niigata.jp","yoita.niigata.jp","yuzawa.niigata.jp","beppu.oita.jp","bungoono.oita.jp","bungotakada.oita.jp","hasama.oita.jp","hiji.oita.jp","himeshima.oita.jp","hita.oita.jp","kamitsue.oita.jp","kokonoe.oita.jp","kuju.oita.jp","kunisaki.oita.jp","kusu.oita.jp","oita.oita.jp","saiki.oita.jp","taketa.oita.jp","tsukumi.oita.jp","usa.oita.jp","usuki.oita.jp","yufu.oita.jp","akaiwa.okayama.jp","asakuchi.okayama.jp","bizen.okayama.jp","hayashima.okayama.jp","ibara.okayama.jp","kagamino.okayama.jp","kasaoka.okayama.jp","kibichuo.okayama.jp","kumenan.okayama.jp","kurashiki.okayama.jp","maniwa.okayama.jp","misaki.okayama.jp","nagi.okayama.jp","niimi.okayama.jp","nishiawakura.okayama.jp","okayama.okayama.jp","satosho.okayama.jp","setouchi.okayama.jp","shinjo.okayama.jp","shoo.okayama.jp","soja.okayama.jp","takahashi.okayama.jp","tamano.okayama.jp","tsuyama.okayama.jp","wake.okayama.jp","yakage.okayama.jp","aguni.okinawa.jp","ginowan.okinawa.jp","ginoza.okinawa.jp","gushikami.okinawa.jp","haebaru.okinawa.jp","higashi.okinawa.jp","hirara.okinawa.jp","iheya.okinawa.jp","ishigaki.okinawa.jp","ishikawa.okinawa.jp","itoman.okinawa.jp","izena.okinawa.jp","kadena.okinawa.jp","kin.okinawa.jp","kitadaito.okinawa.jp","kitanakagusuku.okinawa.jp","kumejima.okinawa.jp","kunigami.okinawa.jp","minamidaito.okinawa.jp","motobu.okinawa.jp","nago.okinawa.jp","naha.okinawa.jp","nakagusuku.okinawa.jp","nakijin.okinawa.jp","nanjo.okinawa.jp","nishihara.okinawa.jp","ogimi.okinawa.jp","okinawa.okinawa.jp","onna.okinawa.jp","shimoji.okinawa.jp","taketomi.okinawa.jp","tarama.okinawa.jp","tokashiki.okinawa.jp","tomigusuku.okinawa.jp","tonaki.okinawa.jp","urasoe.okinawa.jp","uruma.okinawa.jp","yaese.okinawa.jp","yomitan.okinawa.jp","yonabaru.okinawa.jp","yonaguni.okinawa.jp","zamami.okinawa.jp","abeno.osaka.jp","chihayaakasaka.osaka.jp","chuo.osaka.jp","daito.osaka.jp","fujiidera.osaka.jp","habikino.osaka.jp","hannan.osaka.jp","higashiosaka.osaka.jp","higashisumiyoshi.osaka.jp","higashiyodogawa.osaka.jp","hirakata.osaka.jp","ibaraki.osaka.jp","ikeda.osaka.jp","izumi.osaka.jp","izumiotsu.osaka.jp","izumisano.osaka.jp","kadoma.osaka.jp","kaizuka.osaka.jp","kanan.osaka.jp","kashiwara.osaka.jp","katano.osaka.jp","kawachinagano.osaka.jp","kishiwada.osaka.jp","kita.osaka.jp","kumatori.osaka.jp","matsubara.osaka.jp","minato.osaka.jp","minoh.osaka.jp","misaki.osaka.jp","moriguchi.osaka.jp","neyagawa.osaka.jp","nishi.osaka.jp","nose.osaka.jp","osakasayama.osaka.jp","sakai.osaka.jp","sayama.osaka.jp","sennan.osaka.jp","settsu.osaka.jp","shijonawate.osaka.jp","shimamoto.osaka.jp","suita.osaka.jp","tadaoka.osaka.jp","taishi.osaka.jp","tajiri.osaka.jp","takaishi.osaka.jp","takatsuki.osaka.jp","tondabayashi.osaka.jp","toyonaka.osaka.jp","toyono.osaka.jp","yao.osaka.jp","ariake.saga.jp","arita.saga.jp","fukudomi.saga.jp","genkai.saga.jp","hamatama.saga.jp","hizen.saga.jp","imari.saga.jp","kamimine.saga.jp","kanzaki.saga.jp","karatsu.saga.jp","kashima.saga.jp","kitagata.saga.jp","kitahata.saga.jp","kiyama.saga.jp","kouhoku.saga.jp","kyuragi.saga.jp","nishiarita.saga.jp","ogi.saga.jp","omachi.saga.jp","ouchi.saga.jp","saga.saga.jp","shiroishi.saga.jp","taku.saga.jp","tara.saga.jp","tosu.saga.jp","yoshinogari.saga.jp","arakawa.saitama.jp","asaka.saitama.jp","chichibu.saitama.jp","fujimi.saitama.jp","fujimino.saitama.jp","fukaya.saitama.jp","hanno.saitama.jp","hanyu.saitama.jp","hasuda.saitama.jp","hatogaya.saitama.jp","hatoyama.saitama.jp","hidaka.saitama.jp","higashichichibu.saitama.jp","higashimatsuyama.saitama.jp","honjo.saitama.jp","ina.saitama.jp","iruma.saitama.jp","iwatsuki.saitama.jp","kamiizumi.saitama.jp","kamikawa.saitama.jp","kamisato.saitama.jp","kasukabe.saitama.jp","kawagoe.saitama.jp","kawaguchi.saitama.jp","kawajima.saitama.jp","kazo.saitama.jp","kitamoto.saitama.jp","koshigaya.saitama.jp","kounosu.saitama.jp","kuki.saitama.jp","kumagaya.saitama.jp","matsubushi.saitama.jp","minano.saitama.jp","misato.saitama.jp","miyashiro.saitama.jp","miyoshi.saitama.jp","moroyama.saitama.jp","nagatoro.saitama.jp","namegawa.saitama.jp","niiza.saitama.jp","ogano.saitama.jp","ogawa.saitama.jp","ogose.saitama.jp","okegawa.saitama.jp","omiya.saitama.jp","otaki.saitama.jp","ranzan.saitama.jp","ryokami.saitama.jp","saitama.saitama.jp","sakado.saitama.jp","satte.saitama.jp","sayama.saitama.jp","shiki.saitama.jp","shiraoka.saitama.jp","soka.saitama.jp","sugito.saitama.jp","toda.saitama.jp","tokigawa.saitama.jp","tokorozawa.saitama.jp","tsurugashima.saitama.jp","urawa.saitama.jp","warabi.saitama.jp","yashio.saitama.jp","yokoze.saitama.jp","yono.saitama.jp","yorii.saitama.jp","yoshida.saitama.jp","yoshikawa.saitama.jp","yoshimi.saitama.jp","aisho.shiga.jp","gamo.shiga.jp","higashiomi.shiga.jp","hikone.shiga.jp","koka.shiga.jp","konan.shiga.jp","kosei.shiga.jp","koto.shiga.jp","kusatsu.shiga.jp","maibara.shiga.jp","moriyama.shiga.jp","nagahama.shiga.jp","nishiazai.shiga.jp","notogawa.shiga.jp","omihachiman.shiga.jp","otsu.shiga.jp","ritto.shiga.jp","ryuoh.shiga.jp","takashima.shiga.jp","takatsuki.shiga.jp","torahime.shiga.jp","toyosato.shiga.jp","yasu.shiga.jp","akagi.shimane.jp","ama.shimane.jp","gotsu.shimane.jp","hamada.shimane.jp","higashiizumo.shimane.jp","hikawa.shimane.jp","hikimi.shimane.jp","izumo.shimane.jp","kakinoki.shimane.jp","masuda.shimane.jp","matsue.shimane.jp","misato.shimane.jp","nishinoshima.shimane.jp","ohda.shimane.jp","okinoshima.shimane.jp","okuizumo.shimane.jp","shimane.shimane.jp","tamayu.shimane.jp","tsuwano.shimane.jp","unnan.shimane.jp","yakumo.shimane.jp","yasugi.shimane.jp","yatsuka.shimane.jp","arai.shizuoka.jp","atami.shizuoka.jp","fuji.shizuoka.jp","fujieda.shizuoka.jp","fujikawa.shizuoka.jp","fujinomiya.shizuoka.jp","fukuroi.shizuoka.jp","gotemba.shizuoka.jp","haibara.shizuoka.jp","hamamatsu.shizuoka.jp","higashiizu.shizuoka.jp","ito.shizuoka.jp","iwata.shizuoka.jp","izu.shizuoka.jp","izunokuni.shizuoka.jp","kakegawa.shizuoka.jp","kannami.shizuoka.jp","kawanehon.shizuoka.jp","kawazu.shizuoka.jp","kikugawa.shizuoka.jp","kosai.shizuoka.jp","makinohara.shizuoka.jp","matsuzaki.shizuoka.jp","minamiizu.shizuoka.jp","mishima.shizuoka.jp","morimachi.shizuoka.jp","nishiizu.shizuoka.jp","numazu.shizuoka.jp","omaezaki.shizuoka.jp","shimada.shizuoka.jp","shimizu.shizuoka.jp","shimoda.shizuoka.jp","shizuoka.shizuoka.jp","susono.shizuoka.jp","yaizu.shizuoka.jp","yoshida.shizuoka.jp","ashikaga.tochigi.jp","bato.tochigi.jp","haga.tochigi.jp","ichikai.tochigi.jp","iwafune.tochigi.jp","kaminokawa.tochigi.jp","kanuma.tochigi.jp","karasuyama.tochigi.jp","kuroiso.tochigi.jp","mashiko.tochigi.jp","mibu.tochigi.jp","moka.tochigi.jp","motegi.tochigi.jp","nasu.tochigi.jp","nasushiobara.tochigi.jp","nikko.tochigi.jp","nishikata.tochigi.jp","nogi.tochigi.jp","ohira.tochigi.jp","ohtawara.tochigi.jp","oyama.tochigi.jp","sakura.tochigi.jp","sano.tochigi.jp","shimotsuke.tochigi.jp","shioya.tochigi.jp","takanezawa.tochigi.jp","tochigi.tochigi.jp","tsuga.tochigi.jp","ujiie.tochigi.jp","utsunomiya.tochigi.jp","yaita.tochigi.jp","aizumi.tokushima.jp","anan.tokushima.jp","ichiba.tokushima.jp","itano.tokushima.jp","kainan.tokushima.jp","komatsushima.tokushima.jp","matsushige.tokushima.jp","mima.tokushima.jp","minami.tokushima.jp","miyoshi.tokushima.jp","mugi.tokushima.jp","nakagawa.tokushima.jp","naruto.tokushima.jp","sanagochi.tokushima.jp","shishikui.tokushima.jp","tokushima.tokushima.jp","wajiki.tokushima.jp","adachi.tokyo.jp","akiruno.tokyo.jp","akishima.tokyo.jp","aogashima.tokyo.jp","arakawa.tokyo.jp","bunkyo.tokyo.jp","chiyoda.tokyo.jp","chofu.tokyo.jp","chuo.tokyo.jp","edogawa.tokyo.jp","fuchu.tokyo.jp","fussa.tokyo.jp","hachijo.tokyo.jp","hachioji.tokyo.jp","hamura.tokyo.jp","higashikurume.tokyo.jp","higashimurayama.tokyo.jp","higashiyamato.tokyo.jp","hino.tokyo.jp","hinode.tokyo.jp","hinohara.tokyo.jp","inagi.tokyo.jp","itabashi.tokyo.jp","katsushika.tokyo.jp","kita.tokyo.jp","kiyose.tokyo.jp","kodaira.tokyo.jp","koganei.tokyo.jp","kokubunji.tokyo.jp","komae.tokyo.jp","koto.tokyo.jp","kouzushima.tokyo.jp","kunitachi.tokyo.jp","machida.tokyo.jp","meguro.tokyo.jp","minato.tokyo.jp","mitaka.tokyo.jp","mizuho.tokyo.jp","musashimurayama.tokyo.jp","musashino.tokyo.jp","nakano.tokyo.jp","nerima.tokyo.jp","ogasawara.tokyo.jp","okutama.tokyo.jp","ome.tokyo.jp","oshima.tokyo.jp","ota.tokyo.jp","setagaya.tokyo.jp","shibuya.tokyo.jp","shinagawa.tokyo.jp","shinjuku.tokyo.jp","suginami.tokyo.jp","sumida.tokyo.jp","tachikawa.tokyo.jp","taito.tokyo.jp","tama.tokyo.jp","toshima.tokyo.jp","chizu.tottori.jp","hino.tottori.jp","kawahara.tottori.jp","koge.tottori.jp","kotoura.tottori.jp","misasa.tottori.jp","nanbu.tottori.jp","nichinan.tottori.jp","sakaiminato.tottori.jp","tottori.tottori.jp","wakasa.tottori.jp","yazu.tottori.jp","yonago.tottori.jp","asahi.toyama.jp","fuchu.toyama.jp","fukumitsu.toyama.jp","funahashi.toyama.jp","himi.toyama.jp","imizu.toyama.jp","inami.toyama.jp","johana.toyama.jp","kamiichi.toyama.jp","kurobe.toyama.jp","nakaniikawa.toyama.jp","namerikawa.toyama.jp","nanto.toyama.jp","nyuzen.toyama.jp","oyabe.toyama.jp","taira.toyama.jp","takaoka.toyama.jp","tateyama.toyama.jp","toga.toyama.jp","tonami.toyama.jp","toyama.toyama.jp","unazuki.toyama.jp","uozu.toyama.jp","yamada.toyama.jp","arida.wakayama.jp","aridagawa.wakayama.jp","gobo.wakayama.jp","hashimoto.wakayama.jp","hidaka.wakayama.jp","hirogawa.wakayama.jp","inami.wakayama.jp","iwade.wakayama.jp","kainan.wakayama.jp","kamitonda.wakayama.jp","katsuragi.wakayama.jp","kimino.wakayama.jp","kinokawa.wakayama.jp","kitayama.wakayama.jp","koya.wakayama.jp","koza.wakayama.jp","kozagawa.wakayama.jp","kudoyama.wakayama.jp","kushimoto.wakayama.jp","mihama.wakayama.jp","misato.wakayama.jp","nachikatsuura.wakayama.jp","shingu.wakayama.jp","shirahama.wakayama.jp","taiji.wakayama.jp","tanabe.wakayama.jp","wakayama.wakayama.jp","yuasa.wakayama.jp","yura.wakayama.jp","asahi.yamagata.jp","funagata.yamagata.jp","higashine.yamagata.jp","iide.yamagata.jp","kahoku.yamagata.jp","kaminoyama.yamagata.jp","kaneyama.yamagata.jp","kawanishi.yamagata.jp","mamurogawa.yamagata.jp","mikawa.yamagata.jp","murayama.yamagata.jp","nagai.yamagata.jp","nakayama.yamagata.jp","nanyo.yamagata.jp","nishikawa.yamagata.jp","obanazawa.yamagata.jp","oe.yamagata.jp","oguni.yamagata.jp","ohkura.yamagata.jp","oishida.yamagata.jp","sagae.yamagata.jp","sakata.yamagata.jp","sakegawa.yamagata.jp","shinjo.yamagata.jp","shirataka.yamagata.jp","shonai.yamagata.jp","takahata.yamagata.jp","tendo.yamagata.jp","tozawa.yamagata.jp","tsuruoka.yamagata.jp","yamagata.yamagata.jp","yamanobe.yamagata.jp","yonezawa.yamagata.jp","yuza.yamagata.jp","abu.yamaguchi.jp","hagi.yamaguchi.jp","hikari.yamaguchi.jp","hofu.yamaguchi.jp","iwakuni.yamaguchi.jp","kudamatsu.yamaguchi.jp","mitou.yamaguchi.jp","nagato.yamaguchi.jp","oshima.yamaguchi.jp","shimonoseki.yamaguchi.jp","shunan.yamaguchi.jp","tabuse.yamaguchi.jp","tokuyama.yamaguchi.jp","toyota.yamaguchi.jp","ube.yamaguchi.jp","yuu.yamaguchi.jp","chuo.yamanashi.jp","doshi.yamanashi.jp","fuefuki.yamanashi.jp","fujikawa.yamanashi.jp","fujikawaguchiko.yamanashi.jp","fujiyoshida.yamanashi.jp","hayakawa.yamanashi.jp","hokuto.yamanashi.jp","ichikawamisato.yamanashi.jp","kai.yamanashi.jp","kofu.yamanashi.jp","koshu.yamanashi.jp","kosuge.yamanashi.jp","minami-alps.yamanashi.jp","minobu.yamanashi.jp","nakamichi.yamanashi.jp","nanbu.yamanashi.jp","narusawa.yamanashi.jp","nirasaki.yamanashi.jp","nishikatsura.yamanashi.jp","oshino.yamanashi.jp","otsuki.yamanashi.jp","showa.yamanashi.jp","tabayama.yamanashi.jp","tsuru.yamanashi.jp","uenohara.yamanashi.jp","yamanakako.yamanashi.jp","yamanashi.yamanashi.jp","ke","ac.ke","co.ke","go.ke","info.ke","me.ke","mobi.ke","ne.ke","or.ke","sc.ke","kg","org.kg","net.kg","com.kg","edu.kg","gov.kg","mil.kg","*.kh","ki","edu.ki","biz.ki","net.ki","org.ki","gov.ki","info.ki","com.ki","km","org.km","nom.km","gov.km","prd.km","tm.km","edu.km","mil.km","ass.km","com.km","coop.km","asso.km","presse.km","medecin.km","notaires.km","pharmaciens.km","veterinaire.km","gouv.km","kn","net.kn","org.kn","edu.kn","gov.kn","kp","com.kp","edu.kp","gov.kp","org.kp","rep.kp","tra.kp","kr","ac.kr","co.kr","es.kr","go.kr","hs.kr","kg.kr","mil.kr","ms.kr","ne.kr","or.kr","pe.kr","re.kr","sc.kr","busan.kr","chungbuk.kr","chungnam.kr","daegu.kr","daejeon.kr","gangwon.kr","gwangju.kr","gyeongbuk.kr","gyeonggi.kr","gyeongnam.kr","incheon.kr","jeju.kr","jeonbuk.kr","jeonnam.kr","seoul.kr","ulsan.kr","kw","com.kw","edu.kw","emb.kw","gov.kw","ind.kw","net.kw","org.kw","ky","edu.ky","gov.ky","com.ky","org.ky","net.ky","kz","org.kz","edu.kz","net.kz","gov.kz","mil.kz","com.kz","la","int.la","net.la","info.la","edu.la","gov.la","per.la","com.la","org.la","lb","com.lb","edu.lb","gov.lb","net.lb","org.lb","lc","com.lc","net.lc","co.lc","org.lc","edu.lc","gov.lc","li","lk","gov.lk","sch.lk","net.lk","int.lk","com.lk","org.lk","edu.lk","ngo.lk","soc.lk","web.lk","ltd.lk","assn.lk","grp.lk","hotel.lk","ac.lk","lr","com.lr","edu.lr","gov.lr","org.lr","net.lr","ls","ac.ls","biz.ls","co.ls","edu.ls","gov.ls","info.ls","net.ls","org.ls","sc.ls","lt","gov.lt","lu","lv","com.lv","edu.lv","gov.lv","org.lv","mil.lv","id.lv","net.lv","asn.lv","conf.lv","ly","com.ly","net.ly","gov.ly","plc.ly","edu.ly","sch.ly","med.ly","org.ly","id.ly","ma","co.ma","net.ma","gov.ma","org.ma","ac.ma","press.ma","mc","tm.mc","asso.mc","md","me","co.me","net.me","org.me","edu.me","ac.me","gov.me","its.me","priv.me","mg","org.mg","nom.mg","gov.mg","prd.mg","tm.mg","edu.mg","mil.mg","com.mg","co.mg","mh","mil","mk","com.mk","org.mk","net.mk","edu.mk","gov.mk","inf.mk","name.mk","ml","com.ml","edu.ml","gouv.ml","gov.ml","net.ml","org.ml","presse.ml","*.mm","mn","gov.mn","edu.mn","org.mn","mo","com.mo","net.mo","org.mo","edu.mo","gov.mo","mobi","mp","mq","mr","gov.mr","ms","com.ms","edu.ms","gov.ms","net.ms","org.ms","mt","com.mt","edu.mt","net.mt","org.mt","mu","com.mu","net.mu","org.mu","gov.mu","ac.mu","co.mu","or.mu","museum","academy.museum","agriculture.museum","air.museum","airguard.museum","alabama.museum","alaska.museum","amber.museum","ambulance.museum","american.museum","americana.museum","americanantiques.museum","americanart.museum","amsterdam.museum","and.museum","annefrank.museum","anthro.museum","anthropology.museum","antiques.museum","aquarium.museum","arboretum.museum","archaeological.museum","archaeology.museum","architecture.museum","art.museum","artanddesign.museum","artcenter.museum","artdeco.museum","arteducation.museum","artgallery.museum","arts.museum","artsandcrafts.museum","asmatart.museum","assassination.museum","assisi.museum","association.museum","astronomy.museum","atlanta.museum","austin.museum","australia.museum","automotive.museum","aviation.museum","axis.museum","badajoz.museum","baghdad.museum","bahn.museum","bale.museum","baltimore.museum","barcelona.museum","baseball.museum","basel.museum","baths.museum","bauern.museum","beauxarts.museum","beeldengeluid.museum","bellevue.museum","bergbau.museum","berkeley.museum","berlin.museum","bern.museum","bible.museum","bilbao.museum","bill.museum","birdart.museum","birthplace.museum","bonn.museum","boston.museum","botanical.museum","botanicalgarden.museum","botanicgarden.museum","botany.museum","brandywinevalley.museum","brasil.museum","bristol.museum","british.museum","britishcolumbia.museum","broadcast.museum","brunel.museum","brussel.museum","brussels.museum","bruxelles.museum","building.museum","burghof.museum","bus.museum","bushey.museum","cadaques.museum","california.museum","cambridge.museum","can.museum","canada.museum","capebreton.museum","carrier.museum","cartoonart.museum","casadelamoneda.museum","castle.museum","castres.museum","celtic.museum","center.museum","chattanooga.museum","cheltenham.museum","chesapeakebay.museum","chicago.museum","children.museum","childrens.museum","childrensgarden.museum","chiropractic.museum","chocolate.museum","christiansburg.museum","cincinnati.museum","cinema.museum","circus.museum","civilisation.museum","civilization.museum","civilwar.museum","clinton.museum","clock.museum","coal.museum","coastaldefence.museum","cody.museum","coldwar.museum","collection.museum","colonialwilliamsburg.museum","coloradoplateau.museum","columbia.museum","columbus.museum","communication.museum","communications.museum","community.museum","computer.museum","computerhistory.museum","comunicações.museum","contemporary.museum","contemporaryart.museum","convent.museum","copenhagen.museum","corporation.museum","correios-e-telecomunicações.museum","corvette.museum","costume.museum","countryestate.museum","county.museum","crafts.museum","cranbrook.museum","creation.museum","cultural.museum","culturalcenter.museum","culture.museum","cyber.museum","cymru.museum","dali.museum","dallas.museum","database.museum","ddr.museum","decorativearts.museum","delaware.museum","delmenhorst.museum","denmark.museum","depot.museum","design.museum","detroit.museum","dinosaur.museum","discovery.museum","dolls.museum","donostia.museum","durham.museum","eastafrica.museum","eastcoast.museum","education.museum","educational.museum","egyptian.museum","eisenbahn.museum","elburg.museum","elvendrell.museum","embroidery.museum","encyclopedic.museum","england.museum","entomology.museum","environment.museum","environmentalconservation.museum","epilepsy.museum","essex.museum","estate.museum","ethnology.museum","exeter.museum","exhibition.museum","family.museum","farm.museum","farmequipment.museum","farmers.museum","farmstead.museum","field.museum","figueres.museum","filatelia.museum","film.museum","fineart.museum","finearts.museum","finland.museum","flanders.museum","florida.museum","force.museum","fortmissoula.museum","fortworth.museum","foundation.museum","francaise.museum","frankfurt.museum","franziskaner.museum","freemasonry.museum","freiburg.museum","fribourg.museum","frog.museum","fundacio.museum","furniture.museum","gallery.museum","garden.museum","gateway.museum","geelvinck.museum","gemological.museum","geology.museum","georgia.museum","giessen.museum","glas.museum","glass.museum","gorge.museum","grandrapids.museum","graz.museum","guernsey.museum","halloffame.museum","hamburg.museum","handson.museum","harvestcelebration.museum","hawaii.museum","health.museum","heimatunduhren.museum","hellas.museum","helsinki.museum","hembygdsforbund.museum","heritage.museum","histoire.museum","historical.museum","historicalsociety.museum","historichouses.museum","historisch.museum","historisches.museum","history.museum","historyofscience.museum","horology.museum","house.museum","humanities.museum","illustration.museum","imageandsound.museum","indian.museum","indiana.museum","indianapolis.museum","indianmarket.museum","intelligence.museum","interactive.museum","iraq.museum","iron.museum","isleofman.museum","jamison.museum","jefferson.museum","jerusalem.museum","jewelry.museum","jewish.museum","jewishart.museum","jfk.museum","journalism.museum","judaica.museum","judygarland.museum","juedisches.museum","juif.museum","karate.museum","karikatur.museum","kids.museum","koebenhavn.museum","koeln.museum","kunst.museum","kunstsammlung.museum","kunstunddesign.museum","labor.museum","labour.museum","lajolla.museum","lancashire.museum","landes.museum","lans.museum","läns.museum","larsson.museum","lewismiller.museum","lincoln.museum","linz.museum","living.museum","livinghistory.museum","localhistory.museum","london.museum","losangeles.museum","louvre.museum","loyalist.museum","lucerne.museum","luxembourg.museum","luzern.museum","mad.museum","madrid.museum","mallorca.museum","manchester.museum","mansion.museum","mansions.museum","manx.museum","marburg.museum","maritime.museum","maritimo.museum","maryland.museum","marylhurst.museum","media.museum","medical.museum","medizinhistorisches.museum","meeres.museum","memorial.museum","mesaverde.museum","michigan.museum","midatlantic.museum","military.museum","mill.museum","miners.museum","mining.museum","minnesota.museum","missile.museum","missoula.museum","modern.museum","moma.museum","money.museum","monmouth.museum","monticello.museum","montreal.museum","moscow.museum","motorcycle.museum","muenchen.museum","muenster.museum","mulhouse.museum","muncie.museum","museet.museum","museumcenter.museum","museumvereniging.museum","music.museum","national.museum","nationalfirearms.museum","nationalheritage.museum","nativeamerican.museum","naturalhistory.museum","naturalhistorymuseum.museum","naturalsciences.museum","nature.museum","naturhistorisches.museum","natuurwetenschappen.museum","naumburg.museum","naval.museum","nebraska.museum","neues.museum","newhampshire.museum","newjersey.museum","newmexico.museum","newport.museum","newspaper.museum","newyork.museum","niepce.museum","norfolk.museum","north.museum","nrw.museum","nyc.museum","nyny.museum","oceanographic.museum","oceanographique.museum","omaha.museum","online.museum","ontario.museum","openair.museum","oregon.museum","oregontrail.museum","otago.museum","oxford.museum","pacific.museum","paderborn.museum","palace.museum","paleo.museum","palmsprings.museum","panama.museum","paris.museum","pasadena.museum","pharmacy.museum","philadelphia.museum","philadelphiaarea.museum","philately.museum","phoenix.museum","photography.museum","pilots.museum","pittsburgh.museum","planetarium.museum","plantation.museum","plants.museum","plaza.museum","portal.museum","portland.museum","portlligat.museum","posts-and-telecommunications.museum","preservation.museum","presidio.museum","press.museum","project.museum","public.museum","pubol.museum","quebec.museum","railroad.museum","railway.museum","research.museum","resistance.museum","riodejaneiro.museum","rochester.museum","rockart.museum","roma.museum","russia.museum","saintlouis.museum","salem.museum","salvadordali.museum","salzburg.museum","sandiego.museum","sanfrancisco.museum","santabarbara.museum","santacruz.museum","santafe.museum","saskatchewan.museum","satx.museum","savannahga.museum","schlesisches.museum","schoenbrunn.museum","schokoladen.museum","school.museum","schweiz.museum","science.museum","scienceandhistory.museum","scienceandindustry.museum","sciencecenter.museum","sciencecenters.museum","science-fiction.museum","sciencehistory.museum","sciences.museum","sciencesnaturelles.museum","scotland.museum","seaport.museum","settlement.museum","settlers.museum","shell.museum","sherbrooke.museum","sibenik.museum","silk.museum","ski.museum","skole.museum","society.museum","sologne.museum","soundandvision.museum","southcarolina.museum","southwest.museum","space.museum","spy.museum","square.museum","stadt.museum","stalbans.museum","starnberg.museum","state.museum","stateofdelaware.museum","station.museum","steam.museum","steiermark.museum","stjohn.museum","stockholm.museum","stpetersburg.museum","stuttgart.museum","suisse.museum","surgeonshall.museum","surrey.museum","svizzera.museum","sweden.museum","sydney.museum","tank.museum","tcm.museum","technology.museum","telekommunikation.museum","television.museum","texas.museum","textile.museum","theater.museum","time.museum","timekeeping.museum","topology.museum","torino.museum","touch.museum","town.museum","transport.museum","tree.museum","trolley.museum","trust.museum","trustee.museum","uhren.museum","ulm.museum","undersea.museum","university.museum","usa.museum","usantiques.museum","usarts.museum","uscountryestate.museum","usculture.museum","usdecorativearts.museum","usgarden.museum","ushistory.museum","ushuaia.museum","uslivinghistory.museum","utah.museum","uvic.museum","valley.museum","vantaa.museum","versailles.museum","viking.museum","village.museum","virginia.museum","virtual.museum","virtuel.museum","vlaanderen.museum","volkenkunde.museum","wales.museum","wallonie.museum","war.museum","washingtondc.museum","watchandclock.museum","watch-and-clock.museum","western.museum","westfalen.museum","whaling.museum","wildlife.museum","williamsburg.museum","windmill.museum","workshop.museum","york.museum","yorkshire.museum","yosemite.museum","youth.museum","zoological.museum","zoology.museum","ירושלים.museum","иком.museum","mv","aero.mv","biz.mv","com.mv","coop.mv","edu.mv","gov.mv","info.mv","int.mv","mil.mv","museum.mv","name.mv","net.mv","org.mv","pro.mv","mw","ac.mw","biz.mw","co.mw","com.mw","coop.mw","edu.mw","gov.mw","int.mw","museum.mw","net.mw","org.mw","mx","com.mx","org.mx","gob.mx","edu.mx","net.mx","my","com.my","net.my","org.my","gov.my","edu.my","mil.my","name.my","mz","ac.mz","adv.mz","co.mz","edu.mz","gov.mz","mil.mz","net.mz","org.mz","na","info.na","pro.na","name.na","school.na","or.na","dr.na","us.na","mx.na","ca.na","in.na","cc.na","tv.na","ws.na","mobi.na","co.na","com.na","org.na","name","nc","asso.nc","nom.nc","ne","net","nf","com.nf","net.nf","per.nf","rec.nf","web.nf","arts.nf","firm.nf","info.nf","other.nf","store.nf","ng","com.ng","edu.ng","gov.ng","i.ng","mil.ng","mobi.ng","name.ng","net.ng","org.ng","sch.ng","ni","ac.ni","biz.ni","co.ni","com.ni","edu.ni","gob.ni","in.ni","info.ni","int.ni","mil.ni","net.ni","nom.ni","org.ni","web.ni","nl","no","fhs.no","vgs.no","fylkesbibl.no","folkebibl.no","museum.no","idrett.no","priv.no","mil.no","stat.no","dep.no","kommune.no","herad.no","aa.no","ah.no","bu.no","fm.no","hl.no","hm.no","jan-mayen.no","mr.no","nl.no","nt.no","of.no","ol.no","oslo.no","rl.no","sf.no","st.no","svalbard.no","tm.no","tr.no","va.no","vf.no","gs.aa.no","gs.ah.no","gs.bu.no","gs.fm.no","gs.hl.no","gs.hm.no","gs.jan-mayen.no","gs.mr.no","gs.nl.no","gs.nt.no","gs.of.no","gs.ol.no","gs.oslo.no","gs.rl.no","gs.sf.no","gs.st.no","gs.svalbard.no","gs.tm.no","gs.tr.no","gs.va.no","gs.vf.no","akrehamn.no","åkrehamn.no","algard.no","ålgård.no","arna.no","brumunddal.no","bryne.no","bronnoysund.no","brønnøysund.no","drobak.no","drøbak.no","egersund.no","fetsund.no","floro.no","florø.no","fredrikstad.no","hokksund.no","honefoss.no","hønefoss.no","jessheim.no","jorpeland.no","jørpeland.no","kirkenes.no","kopervik.no","krokstadelva.no","langevag.no","langevåg.no","leirvik.no","mjondalen.no","mjøndalen.no","mo-i-rana.no","mosjoen.no","mosjøen.no","nesoddtangen.no","orkanger.no","osoyro.no","osøyro.no","raholt.no","råholt.no","sandnessjoen.no","sandnessjøen.no","skedsmokorset.no","slattum.no","spjelkavik.no","stathelle.no","stavern.no","stjordalshalsen.no","stjørdalshalsen.no","tananger.no","tranby.no","vossevangen.no","afjord.no","åfjord.no","agdenes.no","al.no","ål.no","alesund.no","ålesund.no","alstahaug.no","alta.no","áltá.no","alaheadju.no","álaheadju.no","alvdal.no","amli.no","åmli.no","amot.no","åmot.no","andebu.no","andoy.no","andøy.no","andasuolo.no","ardal.no","årdal.no","aremark.no","arendal.no","ås.no","aseral.no","åseral.no","asker.no","askim.no","askvoll.no","askoy.no","askøy.no","asnes.no","åsnes.no","audnedaln.no","aukra.no","aure.no","aurland.no","aurskog-holand.no","aurskog-høland.no","austevoll.no","austrheim.no","averoy.no","averøy.no","balestrand.no","ballangen.no","balat.no","bálát.no","balsfjord.no","bahccavuotna.no","báhccavuotna.no","bamble.no","bardu.no","beardu.no","beiarn.no","bajddar.no","bájddar.no","baidar.no","báidár.no","berg.no","bergen.no","berlevag.no","berlevåg.no","bearalvahki.no","bearalváhki.no","bindal.no","birkenes.no","bjarkoy.no","bjarkøy.no","bjerkreim.no","bjugn.no","bodo.no","bodø.no","badaddja.no","bådåddjå.no","budejju.no","bokn.no","bremanger.no","bronnoy.no","brønnøy.no","bygland.no","bykle.no","barum.no","bærum.no","bo.telemark.no","bø.telemark.no","bo.nordland.no","bø.nordland.no","bievat.no","bievát.no","bomlo.no","bømlo.no","batsfjord.no","båtsfjord.no","bahcavuotna.no","báhcavuotna.no","dovre.no","drammen.no","drangedal.no","dyroy.no","dyrøy.no","donna.no","dønna.no","eid.no","eidfjord.no","eidsberg.no","eidskog.no","eidsvoll.no","eigersund.no","elverum.no","enebakk.no","engerdal.no","etne.no","etnedal.no","evenes.no","evenassi.no","evenášši.no","evje-og-hornnes.no","farsund.no","fauske.no","fuossko.no","fuoisku.no","fedje.no","fet.no","finnoy.no","finnøy.no","fitjar.no","fjaler.no","fjell.no","flakstad.no","flatanger.no","flekkefjord.no","flesberg.no","flora.no","fla.no","flå.no","folldal.no","forsand.no","fosnes.no","frei.no","frogn.no","froland.no","frosta.no","frana.no","fræna.no","froya.no","frøya.no","fusa.no","fyresdal.no","forde.no","førde.no","gamvik.no","gangaviika.no","gáŋgaviika.no","gaular.no","gausdal.no","gildeskal.no","gildeskål.no","giske.no","gjemnes.no","gjerdrum.no","gjerstad.no","gjesdal.no","gjovik.no","gjøvik.no","gloppen.no","gol.no","gran.no","grane.no","granvin.no","gratangen.no","grimstad.no","grong.no","kraanghke.no","kråanghke.no","grue.no","gulen.no","hadsel.no","halden.no","halsa.no","hamar.no","hamaroy.no","habmer.no","hábmer.no","hapmir.no","hápmir.no","hammerfest.no","hammarfeasta.no","hámmárfeasta.no","haram.no","hareid.no","harstad.no","hasvik.no","aknoluokta.no","ákŋoluokta.no","hattfjelldal.no","aarborte.no","haugesund.no","hemne.no","hemnes.no","hemsedal.no","heroy.more-og-romsdal.no","herøy.møre-og-romsdal.no","heroy.nordland.no","herøy.nordland.no","hitra.no","hjartdal.no","hjelmeland.no","hobol.no","hobøl.no","hof.no","hol.no","hole.no","holmestrand.no","holtalen.no","holtålen.no","hornindal.no","horten.no","hurdal.no","hurum.no","hvaler.no","hyllestad.no","hagebostad.no","hægebostad.no","hoyanger.no","høyanger.no","hoylandet.no","høylandet.no","ha.no","hå.no","ibestad.no","inderoy.no","inderøy.no","iveland.no","jevnaker.no","jondal.no","jolster.no","jølster.no","karasjok.no","karasjohka.no","kárášjohka.no","karlsoy.no","galsa.no","gálsá.no","karmoy.no","karmøy.no","kautokeino.no","guovdageaidnu.no","klepp.no","klabu.no","klæbu.no","kongsberg.no","kongsvinger.no","kragero.no","kragerø.no","kristiansand.no","kristiansund.no","krodsherad.no","krødsherad.no","kvalsund.no","rahkkeravju.no","ráhkkerávju.no","kvam.no","kvinesdal.no","kvinnherad.no","kviteseid.no","kvitsoy.no","kvitsøy.no","kvafjord.no","kvæfjord.no","giehtavuoatna.no","kvanangen.no","kvænangen.no","navuotna.no","návuotna.no","kafjord.no","kåfjord.no","gaivuotna.no","gáivuotna.no","larvik.no","lavangen.no","lavagis.no","loabat.no","loabát.no","lebesby.no","davvesiida.no","leikanger.no","leirfjord.no","leka.no","leksvik.no","lenvik.no","leangaviika.no","leaŋgaviika.no","lesja.no","levanger.no","lier.no","lierne.no","lillehammer.no","lillesand.no","lindesnes.no","lindas.no","lindås.no","lom.no","loppa.no","lahppi.no","láhppi.no","lund.no","lunner.no","luroy.no","lurøy.no","luster.no","lyngdal.no","lyngen.no","ivgu.no","lardal.no","lerdal.no","lærdal.no","lodingen.no","lødingen.no","lorenskog.no","lørenskog.no","loten.no","løten.no","malvik.no","masoy.no","måsøy.no","muosat.no","muosát.no","mandal.no","marker.no","marnardal.no","masfjorden.no","meland.no","meldal.no","melhus.no","meloy.no","meløy.no","meraker.no","meråker.no","moareke.no","moåreke.no","midsund.no","midtre-gauldal.no","modalen.no","modum.no","molde.no","moskenes.no","moss.no","mosvik.no","malselv.no","målselv.no","malatvuopmi.no","málatvuopmi.no","namdalseid.no","aejrie.no","namsos.no","namsskogan.no","naamesjevuemie.no","nååmesjevuemie.no","laakesvuemie.no","nannestad.no","narvik.no","narviika.no","naustdal.no","nedre-eiker.no","nes.akershus.no","nes.buskerud.no","nesna.no","nesodden.no","nesseby.no","unjarga.no","unjárga.no","nesset.no","nissedal.no","nittedal.no","nord-aurdal.no","nord-fron.no","nord-odal.no","norddal.no","nordkapp.no","davvenjarga.no","davvenjárga.no","nordre-land.no","nordreisa.no","raisa.no","ráisa.no","nore-og-uvdal.no","notodden.no","naroy.no","nærøy.no","notteroy.no","nøtterøy.no","odda.no","oksnes.no","øksnes.no","oppdal.no","oppegard.no","oppegård.no","orkdal.no","orland.no","ørland.no","orskog.no","ørskog.no","orsta.no","ørsta.no","os.hedmark.no","os.hordaland.no","osen.no","osteroy.no","osterøy.no","ostre-toten.no","østre-toten.no","overhalla.no","ovre-eiker.no","øvre-eiker.no","oyer.no","øyer.no","oygarden.no","øygarden.no","oystre-slidre.no","øystre-slidre.no","porsanger.no","porsangu.no","porsáŋgu.no","porsgrunn.no","radoy.no","radøy.no","rakkestad.no","rana.no","ruovat.no","randaberg.no","rauma.no","rendalen.no","rennebu.no","rennesoy.no","rennesøy.no","rindal.no","ringebu.no","ringerike.no","ringsaker.no","rissa.no","risor.no","risør.no","roan.no","rollag.no","rygge.no","ralingen.no","rælingen.no","rodoy.no","rødøy.no","romskog.no","rømskog.no","roros.no","røros.no","rost.no","røst.no","royken.no","røyken.no","royrvik.no","røyrvik.no","rade.no","råde.no","salangen.no","siellak.no","saltdal.no","salat.no","sálát.no","sálat.no","samnanger.no","sande.more-og-romsdal.no","sande.møre-og-romsdal.no","sande.vestfold.no","sandefjord.no","sandnes.no","sandoy.no","sandøy.no","sarpsborg.no","sauda.no","sauherad.no","sel.no","selbu.no","selje.no","seljord.no","sigdal.no","siljan.no","sirdal.no","skaun.no","skedsmo.no","ski.no","skien.no","skiptvet.no","skjervoy.no","skjervøy.no","skierva.no","skiervá.no","skjak.no","skjåk.no","skodje.no","skanland.no","skånland.no","skanit.no","skánit.no","smola.no","smøla.no","snillfjord.no","snasa.no","snåsa.no","snoasa.no","snaase.no","snåase.no","sogndal.no","sokndal.no","sola.no","solund.no","songdalen.no","sortland.no","spydeberg.no","stange.no","stavanger.no","steigen.no","steinkjer.no","stjordal.no","stjørdal.no","stokke.no","stor-elvdal.no","stord.no","stordal.no","storfjord.no","omasvuotna.no","strand.no","stranda.no","stryn.no","sula.no","suldal.no","sund.no","sunndal.no","surnadal.no","sveio.no","svelvik.no","sykkylven.no","sogne.no","søgne.no","somna.no","sømna.no","sondre-land.no","søndre-land.no","sor-aurdal.no","sør-aurdal.no","sor-fron.no","sør-fron.no","sor-odal.no","sør-odal.no","sor-varanger.no","sør-varanger.no","matta-varjjat.no","mátta-várjjat.no","sorfold.no","sørfold.no","sorreisa.no","sørreisa.no","sorum.no","sørum.no","tana.no","deatnu.no","time.no","tingvoll.no","tinn.no","tjeldsund.no","dielddanuorri.no","tjome.no","tjøme.no","tokke.no","tolga.no","torsken.no","tranoy.no","tranøy.no","tromso.no","tromsø.no","tromsa.no","romsa.no","trondheim.no","troandin.no","trysil.no","trana.no","træna.no","trogstad.no","trøgstad.no","tvedestrand.no","tydal.no","tynset.no","tysfjord.no","divtasvuodna.no","divttasvuotna.no","tysnes.no","tysvar.no","tysvær.no","tonsberg.no","tønsberg.no","ullensaker.no","ullensvang.no","ulvik.no","utsira.no","vadso.no","vadsø.no","cahcesuolo.no","čáhcesuolo.no","vaksdal.no","valle.no","vang.no","vanylven.no","vardo.no","vardø.no","varggat.no","várggát.no","vefsn.no","vaapste.no","vega.no","vegarshei.no","vegårshei.no","vennesla.no","verdal.no","verran.no","vestby.no","vestnes.no","vestre-slidre.no","vestre-toten.no","vestvagoy.no","vestvågøy.no","vevelstad.no","vik.no","vikna.no","vindafjord.no","volda.no","voss.no","varoy.no","værøy.no","vagan.no","vågan.no","voagat.no","vagsoy.no","vågsøy.no","vaga.no","vågå.no","valer.ostfold.no","våler.østfold.no","valer.hedmark.no","våler.hedmark.no","*.np","nr","biz.nr","info.nr","gov.nr","edu.nr","org.nr","net.nr","com.nr","nu","nz","ac.nz","co.nz","cri.nz","geek.nz","gen.nz","govt.nz","health.nz","iwi.nz","kiwi.nz","maori.nz","mil.nz","māori.nz","net.nz","org.nz","parliament.nz","school.nz","om","co.om","com.om","edu.om","gov.om","med.om","museum.om","net.om","org.om","pro.om","onion","org","pa","ac.pa","gob.pa","com.pa","org.pa","sld.pa","edu.pa","net.pa","ing.pa","abo.pa","med.pa","nom.pa","pe","edu.pe","gob.pe","nom.pe","mil.pe","org.pe","com.pe","net.pe","pf","com.pf","org.pf","edu.pf","*.pg","ph","com.ph","net.ph","org.ph","gov.ph","edu.ph","ngo.ph","mil.ph","i.ph","pk","com.pk","net.pk","edu.pk","org.pk","fam.pk","biz.pk","web.pk","gov.pk","gob.pk","gok.pk","gon.pk","gop.pk","gos.pk","info.pk","pl","com.pl","net.pl","org.pl","aid.pl","agro.pl","atm.pl","auto.pl","biz.pl","edu.pl","gmina.pl","gsm.pl","info.pl","mail.pl","miasta.pl","media.pl","mil.pl","nieruchomosci.pl","nom.pl","pc.pl","powiat.pl","priv.pl","realestate.pl","rel.pl","sex.pl","shop.pl","sklep.pl","sos.pl","szkola.pl","targi.pl","tm.pl","tourism.pl","travel.pl","turystyka.pl","gov.pl","ap.gov.pl","ic.gov.pl","is.gov.pl","us.gov.pl","kmpsp.gov.pl","kppsp.gov.pl","kwpsp.gov.pl","psp.gov.pl","wskr.gov.pl","kwp.gov.pl","mw.gov.pl","ug.gov.pl","um.gov.pl","umig.gov.pl","ugim.gov.pl","upow.gov.pl","uw.gov.pl","starostwo.gov.pl","pa.gov.pl","po.gov.pl","psse.gov.pl","pup.gov.pl","rzgw.gov.pl","sa.gov.pl","so.gov.pl","sr.gov.pl","wsa.gov.pl","sko.gov.pl","uzs.gov.pl","wiih.gov.pl","winb.gov.pl","pinb.gov.pl","wios.gov.pl","witd.gov.pl","wzmiuw.gov.pl","piw.gov.pl","wiw.gov.pl","griw.gov.pl","wif.gov.pl","oum.gov.pl","sdn.gov.pl","zp.gov.pl","uppo.gov.pl","mup.gov.pl","wuoz.gov.pl","konsulat.gov.pl","oirm.gov.pl","augustow.pl","babia-gora.pl","bedzin.pl","beskidy.pl","bialowieza.pl","bialystok.pl","bielawa.pl","bieszczady.pl","boleslawiec.pl","bydgoszcz.pl","bytom.pl","cieszyn.pl","czeladz.pl","czest.pl","dlugoleka.pl","elblag.pl","elk.pl","glogow.pl","gniezno.pl","gorlice.pl","grajewo.pl","ilawa.pl","jaworzno.pl","jelenia-gora.pl","jgora.pl","kalisz.pl","kazimierz-dolny.pl","karpacz.pl","kartuzy.pl","kaszuby.pl","katowice.pl","kepno.pl","ketrzyn.pl","klodzko.pl","kobierzyce.pl","kolobrzeg.pl","konin.pl","konskowola.pl","kutno.pl","lapy.pl","lebork.pl","legnica.pl","lezajsk.pl","limanowa.pl","lomza.pl","lowicz.pl","lubin.pl","lukow.pl","malbork.pl","malopolska.pl","mazowsze.pl","mazury.pl","mielec.pl","mielno.pl","mragowo.pl","naklo.pl","nowaruda.pl","nysa.pl","olawa.pl","olecko.pl","olkusz.pl","olsztyn.pl","opoczno.pl","opole.pl","ostroda.pl","ostroleka.pl","ostrowiec.pl","ostrowwlkp.pl","pila.pl","pisz.pl","podhale.pl","podlasie.pl","polkowice.pl","pomorze.pl","pomorskie.pl","prochowice.pl","pruszkow.pl","przeworsk.pl","pulawy.pl","radom.pl","rawa-maz.pl","rybnik.pl","rzeszow.pl","sanok.pl","sejny.pl","slask.pl","slupsk.pl","sosnowiec.pl","stalowa-wola.pl","skoczow.pl","starachowice.pl","stargard.pl","suwalki.pl","swidnica.pl","swiebodzin.pl","swinoujscie.pl","szczecin.pl","szczytno.pl","tarnobrzeg.pl","tgory.pl","turek.pl","tychy.pl","ustka.pl","walbrzych.pl","warmia.pl","warszawa.pl","waw.pl","wegrow.pl","wielun.pl","wlocl.pl","wloclawek.pl","wodzislaw.pl","wolomin.pl","wroclaw.pl","zachpomor.pl","zagan.pl","zarow.pl","zgora.pl","zgorzelec.pl","pm","pn","gov.pn","co.pn","org.pn","edu.pn","net.pn","post","pr","com.pr","net.pr","org.pr","gov.pr","edu.pr","isla.pr","pro.pr","biz.pr","info.pr","name.pr","est.pr","prof.pr","ac.pr","pro","aaa.pro","aca.pro","acct.pro","avocat.pro","bar.pro","cpa.pro","eng.pro","jur.pro","law.pro","med.pro","recht.pro","ps","edu.ps","gov.ps","sec.ps","plo.ps","com.ps","org.ps","net.ps","pt","net.pt","gov.pt","org.pt","edu.pt","int.pt","publ.pt","com.pt","nome.pt","pw","co.pw","ne.pw","or.pw","ed.pw","go.pw","belau.pw","py","com.py","coop.py","edu.py","gov.py","mil.py","net.py","org.py","qa","com.qa","edu.qa","gov.qa","mil.qa","name.qa","net.qa","org.qa","sch.qa","re","asso.re","com.re","nom.re","ro","arts.ro","com.ro","firm.ro","info.ro","nom.ro","nt.ro","org.ro","rec.ro","store.ro","tm.ro","www.ro","rs","ac.rs","co.rs","edu.rs","gov.rs","in.rs","org.rs","ru","rw","ac.rw","co.rw","coop.rw","gov.rw","mil.rw","net.rw","org.rw","sa","com.sa","net.sa","org.sa","gov.sa","med.sa","pub.sa","edu.sa","sch.sa","sb","com.sb","edu.sb","gov.sb","net.sb","org.sb","sc","com.sc","gov.sc","net.sc","org.sc","edu.sc","sd","com.sd","net.sd","org.sd","edu.sd","med.sd","tv.sd","gov.sd","info.sd","se","a.se","ac.se","b.se","bd.se","brand.se","c.se","d.se","e.se","f.se","fh.se","fhsk.se","fhv.se","g.se","h.se","i.se","k.se","komforb.se","kommunalforbund.se","komvux.se","l.se","lanbib.se","m.se","n.se","naturbruksgymn.se","o.se","org.se","p.se","parti.se","pp.se","press.se","r.se","s.se","t.se","tm.se","u.se","w.se","x.se","y.se","z.se","sg","com.sg","net.sg","org.sg","gov.sg","edu.sg","per.sg","sh","com.sh","net.sh","gov.sh","org.sh","mil.sh","si","sj","sk","sl","com.sl","net.sl","edu.sl","gov.sl","org.sl","sm","sn","art.sn","com.sn","edu.sn","gouv.sn","org.sn","perso.sn","univ.sn","so","com.so","edu.so","gov.so","me.so","net.so","org.so","sr","ss","biz.ss","com.ss","edu.ss","gov.ss","net.ss","org.ss","st","co.st","com.st","consulado.st","edu.st","embaixada.st","gov.st","mil.st","net.st","org.st","principe.st","saotome.st","store.st","su","sv","com.sv","edu.sv","gob.sv","org.sv","red.sv","sx","gov.sx","sy","edu.sy","gov.sy","net.sy","mil.sy","com.sy","org.sy","sz","co.sz","ac.sz","org.sz","tc","td","tel","tf","tg","th","ac.th","co.th","go.th","in.th","mi.th","net.th","or.th","tj","ac.tj","biz.tj","co.tj","com.tj","edu.tj","go.tj","gov.tj","int.tj","mil.tj","name.tj","net.tj","nic.tj","org.tj","test.tj","web.tj","tk","tl","gov.tl","tm","com.tm","co.tm","org.tm","net.tm","nom.tm","gov.tm","mil.tm","edu.tm","tn","com.tn","ens.tn","fin.tn","gov.tn","ind.tn","intl.tn","nat.tn","net.tn","org.tn","info.tn","perso.tn","tourism.tn","edunet.tn","rnrt.tn","rns.tn","rnu.tn","mincom.tn","agrinet.tn","defense.tn","turen.tn","to","com.to","gov.to","net.to","org.to","edu.to","mil.to","tr","av.tr","bbs.tr","bel.tr","biz.tr","com.tr","dr.tr","edu.tr","gen.tr","gov.tr","info.tr","mil.tr","k12.tr","kep.tr","name.tr","net.tr","org.tr","pol.tr","tel.tr","tsk.tr","tv.tr","web.tr","nc.tr","gov.nc.tr","tt","co.tt","com.tt","org.tt","net.tt","biz.tt","info.tt","pro.tt","int.tt","coop.tt","jobs.tt","mobi.tt","travel.tt","museum.tt","aero.tt","name.tt","gov.tt","edu.tt","tv","tw","edu.tw","gov.tw","mil.tw","com.tw","net.tw","org.tw","idv.tw","game.tw","ebiz.tw","club.tw","網路.tw","組織.tw","商業.tw","tz","ac.tz","co.tz","go.tz","hotel.tz","info.tz","me.tz","mil.tz","mobi.tz","ne.tz","or.tz","sc.tz","tv.tz","ua","com.ua","edu.ua","gov.ua","in.ua","net.ua","org.ua","cherkassy.ua","cherkasy.ua","chernigov.ua","chernihiv.ua","chernivtsi.ua","chernovtsy.ua","ck.ua","cn.ua","cr.ua","crimea.ua","cv.ua","dn.ua","dnepropetrovsk.ua","dnipropetrovsk.ua","dominic.ua","donetsk.ua","dp.ua","if.ua","ivano-frankivsk.ua","kh.ua","kharkiv.ua","kharkov.ua","kherson.ua","khmelnitskiy.ua","khmelnytskyi.ua","kiev.ua","kirovograd.ua","km.ua","kr.ua","krym.ua","ks.ua","kv.ua","kyiv.ua","lg.ua","lt.ua","lugansk.ua","lutsk.ua","lv.ua","lviv.ua","mk.ua","mykolaiv.ua","nikolaev.ua","od.ua","odesa.ua","odessa.ua","pl.ua","poltava.ua","rivne.ua","rovno.ua","rv.ua","sb.ua","sebastopol.ua","sevastopol.ua","sm.ua","sumy.ua","te.ua","ternopil.ua","uz.ua","uzhgorod.ua","vinnica.ua","vinnytsia.ua","vn.ua","volyn.ua","yalta.ua","zaporizhzhe.ua","zaporizhzhia.ua","zhitomir.ua","zhytomyr.ua","zp.ua","zt.ua","ug","co.ug","or.ug","ac.ug","sc.ug","go.ug","ne.ug","com.ug","org.ug","uk","ac.uk","co.uk","gov.uk","ltd.uk","me.uk","net.uk","nhs.uk","org.uk","plc.uk","police.uk","*.sch.uk","us","dni.us","fed.us","isa.us","kids.us","nsn.us","ak.us","al.us","ar.us","as.us","az.us","ca.us","co.us","ct.us","dc.us","de.us","fl.us","ga.us","gu.us","hi.us","ia.us","id.us","il.us","in.us","ks.us","ky.us","la.us","ma.us","md.us","me.us","mi.us","mn.us","mo.us","ms.us","mt.us","nc.us","nd.us","ne.us","nh.us","nj.us","nm.us","nv.us","ny.us","oh.us","ok.us","or.us","pa.us","pr.us","ri.us","sc.us","sd.us","tn.us","tx.us","ut.us","vi.us","vt.us","va.us","wa.us","wi.us","wv.us","wy.us","k12.ak.us","k12.al.us","k12.ar.us","k12.as.us","k12.az.us","k12.ca.us","k12.co.us","k12.ct.us","k12.dc.us","k12.de.us","k12.fl.us","k12.ga.us","k12.gu.us","k12.ia.us","k12.id.us","k12.il.us","k12.in.us","k12.ks.us","k12.ky.us","k12.la.us","k12.ma.us","k12.md.us","k12.me.us","k12.mi.us","k12.mn.us","k12.mo.us","k12.ms.us","k12.mt.us","k12.nc.us","k12.ne.us","k12.nh.us","k12.nj.us","k12.nm.us","k12.nv.us","k12.ny.us","k12.oh.us","k12.ok.us","k12.or.us","k12.pa.us","k12.pr.us","k12.ri.us","k12.sc.us","k12.tn.us","k12.tx.us","k12.ut.us","k12.vi.us","k12.vt.us","k12.va.us","k12.wa.us","k12.wi.us","k12.wy.us","cc.ak.us","cc.al.us","cc.ar.us","cc.as.us","cc.az.us","cc.ca.us","cc.co.us","cc.ct.us","cc.dc.us","cc.de.us","cc.fl.us","cc.ga.us","cc.gu.us","cc.hi.us","cc.ia.us","cc.id.us","cc.il.us","cc.in.us","cc.ks.us","cc.ky.us","cc.la.us","cc.ma.us","cc.md.us","cc.me.us","cc.mi.us","cc.mn.us","cc.mo.us","cc.ms.us","cc.mt.us","cc.nc.us","cc.nd.us","cc.ne.us","cc.nh.us","cc.nj.us","cc.nm.us","cc.nv.us","cc.ny.us","cc.oh.us","cc.ok.us","cc.or.us","cc.pa.us","cc.pr.us","cc.ri.us","cc.sc.us","cc.sd.us","cc.tn.us","cc.tx.us","cc.ut.us","cc.vi.us","cc.vt.us","cc.va.us","cc.wa.us","cc.wi.us","cc.wv.us","cc.wy.us","lib.ak.us","lib.al.us","lib.ar.us","lib.as.us","lib.az.us","lib.ca.us","lib.co.us","lib.ct.us","lib.dc.us","lib.fl.us","lib.ga.us","lib.gu.us","lib.hi.us","lib.ia.us","lib.id.us","lib.il.us","lib.in.us","lib.ks.us","lib.ky.us","lib.la.us","lib.ma.us","lib.md.us","lib.me.us","lib.mi.us","lib.mn.us","lib.mo.us","lib.ms.us","lib.mt.us","lib.nc.us","lib.nd.us","lib.ne.us","lib.nh.us","lib.nj.us","lib.nm.us","lib.nv.us","lib.ny.us","lib.oh.us","lib.ok.us","lib.or.us","lib.pa.us","lib.pr.us","lib.ri.us","lib.sc.us","lib.sd.us","lib.tn.us","lib.tx.us","lib.ut.us","lib.vi.us","lib.vt.us","lib.va.us","lib.wa.us","lib.wi.us","lib.wy.us","pvt.k12.ma.us","chtr.k12.ma.us","paroch.k12.ma.us","ann-arbor.mi.us","cog.mi.us","dst.mi.us","eaton.mi.us","gen.mi.us","mus.mi.us","tec.mi.us","washtenaw.mi.us","uy","com.uy","edu.uy","gub.uy","mil.uy","net.uy","org.uy","uz","co.uz","com.uz","net.uz","org.uz","va","vc","com.vc","net.vc","org.vc","gov.vc","mil.vc","edu.vc","ve","arts.ve","co.ve","com.ve","e12.ve","edu.ve","firm.ve","gob.ve","gov.ve","info.ve","int.ve","mil.ve","net.ve","org.ve","rec.ve","store.ve","tec.ve","web.ve","vg","vi","co.vi","com.vi","k12.vi","net.vi","org.vi","vn","com.vn","net.vn","org.vn","edu.vn","gov.vn","int.vn","ac.vn","biz.vn","info.vn","name.vn","pro.vn","health.vn","vu","com.vu","edu.vu","net.vu","org.vu","wf","ws","com.ws","net.ws","org.ws","gov.ws","edu.ws","yt","امارات","հայ","বাংলা","бг","бел","中国","中國","الجزائر","مصر","ею","ευ","موريتانيا","გე","ελ","香港","公司.香港","教育.香港","政府.香港","個人.香港","網絡.香港","組織.香港","ಭಾರತ","ଭାରତ","ভাৰত","भारतम्","भारोत","ڀارت","ഭാരതം","भारत","بارت","بھارت","భారత్","ભારત","ਭਾਰਤ","ভারত","இந்தியா","ایران","ايران","عراق","الاردن","한국","қаз","ලංකා","இலங்கை","المغرب","мкд","мон","澳門","澳门","مليسيا","عمان","پاکستان","پاكستان","فلسطين","срб","пр.срб","орг.срб","обр.срб","од.срб","упр.срб","ак.срб","рф","قطر","السعودية","السعودیة","السعودیۃ","السعوديه","سودان","新加坡","சிங்கப்பூர்","سورية","سوريا","ไทย","ศึกษา.ไทย","ธุรกิจ.ไทย","รัฐบาล.ไทย","ทหาร.ไทย","เน็ต.ไทย","องค์กร.ไทย","تونس","台灣","台湾","臺灣","укр","اليمن","xxx","*.ye","ac.za","agric.za","alt.za","co.za","edu.za","gov.za","grondar.za","law.za","mil.za","net.za","ngo.za","nic.za","nis.za","nom.za","org.za","school.za","tm.za","web.za","zm","ac.zm","biz.zm","co.zm","com.zm","edu.zm","gov.zm","info.zm","mil.zm","net.zm","org.zm","sch.zm","zw","ac.zw","co.zw","gov.zw","mil.zw","org.zw","aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","academy","accenture","accountant","accountants","aco","actor","adac","ads","adult","aeg","aetna","afamilycompany","afl","africa","agakhan","agency","aig","aigo","airbus","airforce","airtel","akdn","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","aol","apartments","app","apple","aquarelle","arab","aramco","archi","army","art","arte","asda","associates","athleta","attorney","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aws","axa","azure","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bbc","bbt","bbva","bcg","bcn","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bharti","bible","bid","bike","bing","bingo","bio","black","blackfriday","blockbuster","blog","bloomberg","blue","bms","bmw","bnpparibas","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","bradesco","bridgestone","broadway","broker","brother","brussels","budapest","bugatti","build","builders","business","buy","buzz","bzh","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","caseih","cash","casino","catering","catholic","cba","cbn","cbre","cbs","ceb","center","ceo","cern","cfa","cfd","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","coach","codes","coffee","college","cologne","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","corsica","country","coupon","coupons","courses","cpa","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cuisinella","cymru","cyou","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dnp","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","duck","dunlop","dupont","durban","dvag","dvr","earth","eat","eco","edeka","education","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","ericsson","erni","esq","estate","esurance","etisalat","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","flickr","flights","flir","florist","flowers","fly","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gbiz","gdn","gea","gent","genting","george","ggee","gift","gifts","gives","giving","glade","glass","gle","global","globo","gmail","gmbh","gmo","gmx","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","grainger","graphics","gratis","green","gripe","grocery","group","guardian","gucci","guge","guide","guitars","guru","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hkt","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hsbc","hughes","hyatt","hyundai","ibm","icbc","ice","icu","ieee","ifm","ikano","imamat","imdb","immo","immobilien","inc","industries","infiniti","ing","ink","institute","insurance","insure","intel","international","intuit","investments","ipiranga","irish","ismaili","ist","istanbul","itau","itv","iveco","jaguar","java","jcb","jcp","jeep","jetzt","jewelry","jio","jll","jmp","jnj","joburg","jot","joy","jpmorgan","jprs","juegos","juniper","kaufen","kddi","kerryhotels","kerrylogistics","kerryproperties","kfh","kia","kim","kinder","kindle","kitchen","kiwi","koeln","komatsu","kosher","kpmg","kpn","krd","kred","kuokgroup","kyoto","lacaixa","lamborghini","lamer","lancaster","lancia","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","llc","llp","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","ltd","ltda","lundbeck","lupin","luxe","luxury","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mckinsey","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","metlife","miami","microsoft","mini","mint","mit","mitsubishi","mlb","mls","mma","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","msd","mtn","mtr","mutual","nab","nadex","nagoya","nationwide","natura","navy","nba","nec","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nfl","ngo","nhk","nico","nike","nikon","ninja","nissan","nissay","nokia","northwesternmutual","norton","now","nowruz","nowtv","nra","nrw","ntt","nyc","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","organic","origins","osaka","otsuka","ott","ovh","page","panasonic","paris","pars","partners","parts","party","passagens","pay","pccw","pet","pfizer","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","place","play","playstation","plumbing","plus","pnc","pohl","poker","politie","porn","pramerica","praxi","press","prime","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","pub","pwc","qpon","quebec","quest","qvc","racing","radio","raid","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","rocher","rocks","rodeo","rogers","room","rsvp","rugby","ruhr","run","rwe","ryukyu","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sbi","sbs","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","silk","sina","singles","site","ski","skin","sky","skype","sling","smart","smile","sncf","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","spreadbetting","srl","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","sucks","supplies","supply","support","surf","surgery","suzuki","swatch","swiftcover","swiss","sydney","symantec","systems","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tci","tdk","team","tech","technology","temasek","tennis","teva","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tjmaxx","tjx","tkmaxx","tmall","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tube","tui","tunes","tushu","tvs","ubank","ubs","unicom","university","uno","uol","ups","vacations","vana","vanguard","vegas","ventures","verisign","versicherung","vet","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vodka","volkswagen","volvo","vote","voting","voto","voyage","vuelos","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","慈善","集团","在线","大众汽车","点看","คอม","八卦","موقع","公益","公司","香格里拉","网站","移动","我爱你","москва","католик","онлайн","сайт","联通","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","アマゾン","삼성","商标","商店","商城","дети","ポイント","新闻","工行","家電","كوم","中文网","中信","娱乐","谷歌","電訊盈科","购物","クラウド","通販","网店","संगठन","餐厅","网络","ком","亚马逊","诺基亚","食品","飞利浦","手表","手机","ارامكو","العليان","اتصالات","بازار","ابوظبي","كاثوليك","همراه","닷컴","政府","شبكة","بيتك","عرب","机构","组织机构","健康","招聘","рус","珠宝","大拿","みんな","グーグル","世界","書籍","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","广东","政务","xyz","yachts","yahoo","yamaxun","yandex","yodobashi","yoga","yokohama","you","youtube","yun","zappos","zara","zero","zip","zone","zuerich","cc.ua","inf.ua","ltd.ua","adobeaemcloud.com","adobeaemcloud.net","*.dev.adobeaemcloud.com","beep.pl","barsy.ca","*.compute.estate","*.alces.network","altervista.org","alwaysdata.net","cloudfront.net","*.compute.amazonaws.com","*.compute-1.amazonaws.com","*.compute.amazonaws.com.cn","us-east-1.amazonaws.com","cn-north-1.eb.amazonaws.com.cn","cn-northwest-1.eb.amazonaws.com.cn","elasticbeanstalk.com","ap-northeast-1.elasticbeanstalk.com","ap-northeast-2.elasticbeanstalk.com","ap-northeast-3.elasticbeanstalk.com","ap-south-1.elasticbeanstalk.com","ap-southeast-1.elasticbeanstalk.com","ap-southeast-2.elasticbeanstalk.com","ca-central-1.elasticbeanstalk.com","eu-central-1.elasticbeanstalk.com","eu-west-1.elasticbeanstalk.com","eu-west-2.elasticbeanstalk.com","eu-west-3.elasticbeanstalk.com","sa-east-1.elasticbeanstalk.com","us-east-1.elasticbeanstalk.com","us-east-2.elasticbeanstalk.com","us-gov-west-1.elasticbeanstalk.com","us-west-1.elasticbeanstalk.com","us-west-2.elasticbeanstalk.com","*.elb.amazonaws.com","*.elb.amazonaws.com.cn","s3.amazonaws.com","s3-ap-northeast-1.amazonaws.com","s3-ap-northeast-2.amazonaws.com","s3-ap-south-1.amazonaws.com","s3-ap-southeast-1.amazonaws.com","s3-ap-southeast-2.amazonaws.com","s3-ca-central-1.amazonaws.com","s3-eu-central-1.amazonaws.com","s3-eu-west-1.amazonaws.com","s3-eu-west-2.amazonaws.com","s3-eu-west-3.amazonaws.com","s3-external-1.amazonaws.com","s3-fips-us-gov-west-1.amazonaws.com","s3-sa-east-1.amazonaws.com","s3-us-gov-west-1.amazonaws.com","s3-us-east-2.amazonaws.com","s3-us-west-1.amazonaws.com","s3-us-west-2.amazonaws.com","s3.ap-northeast-2.amazonaws.com","s3.ap-south-1.amazonaws.com","s3.cn-north-1.amazonaws.com.cn","s3.ca-central-1.amazonaws.com","s3.eu-central-1.amazonaws.com","s3.eu-west-2.amazonaws.com","s3.eu-west-3.amazonaws.com","s3.us-east-2.amazonaws.com","s3.dualstack.ap-northeast-1.amazonaws.com","s3.dualstack.ap-northeast-2.amazonaws.com","s3.dualstack.ap-south-1.amazonaws.com","s3.dualstack.ap-southeast-1.amazonaws.com","s3.dualstack.ap-southeast-2.amazonaws.com","s3.dualstack.ca-central-1.amazonaws.com","s3.dualstack.eu-central-1.amazonaws.com","s3.dualstack.eu-west-1.amazonaws.com","s3.dualstack.eu-west-2.amazonaws.com","s3.dualstack.eu-west-3.amazonaws.com","s3.dualstack.sa-east-1.amazonaws.com","s3.dualstack.us-east-1.amazonaws.com","s3.dualstack.us-east-2.amazonaws.com","s3-website-us-east-1.amazonaws.com","s3-website-us-west-1.amazonaws.com","s3-website-us-west-2.amazonaws.com","s3-website-ap-northeast-1.amazonaws.com","s3-website-ap-southeast-1.amazonaws.com","s3-website-ap-southeast-2.amazonaws.com","s3-website-eu-west-1.amazonaws.com","s3-website-sa-east-1.amazonaws.com","s3-website.ap-northeast-2.amazonaws.com","s3-website.ap-south-1.amazonaws.com","s3-website.ca-central-1.amazonaws.com","s3-website.eu-central-1.amazonaws.com","s3-website.eu-west-2.amazonaws.com","s3-website.eu-west-3.amazonaws.com","s3-website.us-east-2.amazonaws.com","amsw.nl","t3l3p0rt.net","tele.amune.org","apigee.io","on-aptible.com","user.aseinet.ne.jp","gv.vc","d.gv.vc","user.party.eus","pimienta.org","poivron.org","potager.org","sweetpepper.org","myasustor.com","myfritz.net","*.awdev.ca","*.advisor.ws","b-data.io","backplaneapp.io","balena-devices.com","app.banzaicloud.io","betainabox.com","bnr.la","blackbaudcdn.net","boomla.net","boxfuse.io","square7.ch","bplaced.com","bplaced.de","square7.de","bplaced.net","square7.net","browsersafetymark.io","uk0.bigv.io","dh.bytemark.co.uk","vm.bytemark.co.uk","mycd.eu","carrd.co","crd.co","uwu.ai","ae.org","ar.com","br.com","cn.com","com.de","com.se","de.com","eu.com","gb.com","gb.net","hu.com","hu.net","jp.net","jpn.com","kr.com","mex.com","no.com","qc.com","ru.com","sa.com","se.net","uk.com","uk.net","us.com","uy.com","za.bz","za.com","africa.com","gr.com","in.net","us.org","co.com","c.la","certmgr.org","xenapponazure.com","discourse.group","discourse.team","virtueeldomein.nl","cleverapps.io","*.lcl.dev","*.stg.dev","c66.me","cloud66.ws","cloud66.zone","jdevcloud.com","wpdevcloud.com","cloudaccess.host","freesite.host","cloudaccess.net","cloudcontrolled.com","cloudcontrolapp.com","cloudera.site","trycloudflare.com","workers.dev","wnext.app","co.ca","*.otap.co","co.cz","c.cdn77.org","cdn77-ssl.net","r.cdn77.net","rsc.cdn77.org","ssl.origin.cdn77-secure.org","cloudns.asia","cloudns.biz","cloudns.club","cloudns.cc","cloudns.eu","cloudns.in","cloudns.info","cloudns.org","cloudns.pro","cloudns.pw","cloudns.us","cloudeity.net","cnpy.gdn","co.nl","co.no","webhosting.be","hosting-cluster.nl","ac.ru","edu.ru","gov.ru","int.ru","mil.ru","test.ru","dyn.cosidns.de","dynamisches-dns.de","dnsupdater.de","internet-dns.de","l-o-g-i-n.de","dynamic-dns.info","feste-ip.net","knx-server.net","static-access.net","realm.cz","*.cryptonomic.net","cupcake.is","*.customer-oci.com","*.oci.customer-oci.com","*.ocp.customer-oci.com","*.ocs.customer-oci.com","cyon.link","cyon.site","daplie.me","localhost.daplie.me","dattolocal.com","dattorelay.com","dattoweb.com","mydatto.com","dattolocal.net","mydatto.net","biz.dk","co.dk","firm.dk","reg.dk","store.dk","*.dapps.earth","*.bzz.dapps.earth","builtwithdark.com","edgestack.me","debian.net","dedyn.io","dnshome.de","online.th","shop.th","drayddns.com","dreamhosters.com","mydrobo.com","drud.io","drud.us","duckdns.org","dy.fi","tunk.org","dyndns-at-home.com","dyndns-at-work.com","dyndns-blog.com","dyndns-free.com","dyndns-home.com","dyndns-ip.com","dyndns-mail.com","dyndns-office.com","dyndns-pics.com","dyndns-remote.com","dyndns-server.com","dyndns-web.com","dyndns-wiki.com","dyndns-work.com","dyndns.biz","dyndns.info","dyndns.org","dyndns.tv","at-band-camp.net","ath.cx","barrel-of-knowledge.info","barrell-of-knowledge.info","better-than.tv","blogdns.com","blogdns.net","blogdns.org","blogsite.org","boldlygoingnowhere.org","broke-it.net","buyshouses.net","cechire.com","dnsalias.com","dnsalias.net","dnsalias.org","dnsdojo.com","dnsdojo.net","dnsdojo.org","does-it.net","doesntexist.com","doesntexist.org","dontexist.com","dontexist.net","dontexist.org","doomdns.com","doomdns.org","dvrdns.org","dyn-o-saur.com","dynalias.com","dynalias.net","dynalias.org","dynathome.net","dyndns.ws","endofinternet.net","endofinternet.org","endoftheinternet.org","est-a-la-maison.com","est-a-la-masion.com","est-le-patron.com","est-mon-blogueur.com","for-better.biz","for-more.biz","for-our.info","for-some.biz","for-the.biz","forgot.her.name","forgot.his.name","from-ak.com","from-al.com","from-ar.com","from-az.net","from-ca.com","from-co.net","from-ct.com","from-dc.com","from-de.com","from-fl.com","from-ga.com","from-hi.com","from-ia.com","from-id.com","from-il.com","from-in.com","from-ks.com","from-ky.com","from-la.net","from-ma.com","from-md.com","from-me.org","from-mi.com","from-mn.com","from-mo.com","from-ms.com","from-mt.com","from-nc.com","from-nd.com","from-ne.com","from-nh.com","from-nj.com","from-nm.com","from-nv.com","from-ny.net","from-oh.com","from-ok.com","from-or.com","from-pa.com","from-pr.com","from-ri.com","from-sc.com","from-sd.com","from-tn.com","from-tx.com","from-ut.com","from-va.com","from-vt.com","from-wa.com","from-wi.com","from-wv.com","from-wy.com","ftpaccess.cc","fuettertdasnetz.de","game-host.org","game-server.cc","getmyip.com","gets-it.net","go.dyndns.org","gotdns.com","gotdns.org","groks-the.info","groks-this.info","ham-radio-op.net","here-for-more.info","hobby-site.com","hobby-site.org","home.dyndns.org","homedns.org","homeftp.net","homeftp.org","homeip.net","homelinux.com","homelinux.net","homelinux.org","homeunix.com","homeunix.net","homeunix.org","iamallama.com","in-the-band.net","is-a-anarchist.com","is-a-blogger.com","is-a-bookkeeper.com","is-a-bruinsfan.org","is-a-bulls-fan.com","is-a-candidate.org","is-a-caterer.com","is-a-celticsfan.org","is-a-chef.com","is-a-chef.net","is-a-chef.org","is-a-conservative.com","is-a-cpa.com","is-a-cubicle-slave.com","is-a-democrat.com","is-a-designer.com","is-a-doctor.com","is-a-financialadvisor.com","is-a-geek.com","is-a-geek.net","is-a-geek.org","is-a-green.com","is-a-guru.com","is-a-hard-worker.com","is-a-hunter.com","is-a-knight.org","is-a-landscaper.com","is-a-lawyer.com","is-a-liberal.com","is-a-libertarian.com","is-a-linux-user.org","is-a-llama.com","is-a-musician.com","is-a-nascarfan.com","is-a-nurse.com","is-a-painter.com","is-a-patsfan.org","is-a-personaltrainer.com","is-a-photographer.com","is-a-player.com","is-a-republican.com","is-a-rockstar.com","is-a-socialist.com","is-a-soxfan.org","is-a-student.com","is-a-teacher.com","is-a-techie.com","is-a-therapist.com","is-an-accountant.com","is-an-actor.com","is-an-actress.com","is-an-anarchist.com","is-an-artist.com","is-an-engineer.com","is-an-entertainer.com","is-by.us","is-certified.com","is-found.org","is-gone.com","is-into-anime.com","is-into-cars.com","is-into-cartoons.com","is-into-games.com","is-leet.com","is-lost.org","is-not-certified.com","is-saved.org","is-slick.com","is-uberleet.com","is-very-bad.org","is-very-evil.org","is-very-good.org","is-very-nice.org","is-very-sweet.org","is-with-theband.com","isa-geek.com","isa-geek.net","isa-geek.org","isa-hockeynut.com","issmarterthanyou.com","isteingeek.de","istmein.de","kicks-ass.net","kicks-ass.org","knowsitall.info","land-4-sale.us","lebtimnetz.de","leitungsen.de","likes-pie.com","likescandy.com","merseine.nu","mine.nu","misconfused.org","mypets.ws","myphotos.cc","neat-url.com","office-on-the.net","on-the-web.tv","podzone.net","podzone.org","readmyblog.org","saves-the-whales.com","scrapper-site.net","scrapping.cc","selfip.biz","selfip.com","selfip.info","selfip.net","selfip.org","sells-for-less.com","sells-for-u.com","sells-it.net","sellsyourhome.org","servebbs.com","servebbs.net","servebbs.org","serveftp.net","serveftp.org","servegame.org","shacknet.nu","simple-url.com","space-to-rent.com","stuff-4-sale.org","stuff-4-sale.us","teaches-yoga.com","thruhere.net","traeumtgerade.de","webhop.biz","webhop.info","webhop.net","webhop.org","worse-than.tv","writesthisblog.com","ddnss.de","dyn.ddnss.de","dyndns.ddnss.de","dyndns1.de","dyn-ip24.de","home-webserver.de","dyn.home-webserver.de","myhome-server.de","ddnss.org","definima.net","definima.io","bci.dnstrace.pro","ddnsfree.com","ddnsgeek.com","giize.com","gleeze.com","kozow.com","loseyourip.com","ooguy.com","theworkpc.com","casacam.net","dynu.net","accesscam.org","camdvr.org","freeddns.org","mywire.org","webredirect.org","myddns.rocks","blogsite.xyz","dynv6.net","e4.cz","en-root.fr","mytuleap.com","onred.one","staging.onred.one","enonic.io","customer.enonic.io","eu.org","al.eu.org","asso.eu.org","at.eu.org","au.eu.org","be.eu.org","bg.eu.org","ca.eu.org","cd.eu.org","ch.eu.org","cn.eu.org","cy.eu.org","cz.eu.org","de.eu.org","dk.eu.org","edu.eu.org","ee.eu.org","es.eu.org","fi.eu.org","fr.eu.org","gr.eu.org","hr.eu.org","hu.eu.org","ie.eu.org","il.eu.org","in.eu.org","int.eu.org","is.eu.org","it.eu.org","jp.eu.org","kr.eu.org","lt.eu.org","lu.eu.org","lv.eu.org","mc.eu.org","me.eu.org","mk.eu.org","mt.eu.org","my.eu.org","net.eu.org","ng.eu.org","nl.eu.org","no.eu.org","nz.eu.org","paris.eu.org","pl.eu.org","pt.eu.org","q-a.eu.org","ro.eu.org","ru.eu.org","se.eu.org","si.eu.org","sk.eu.org","tr.eu.org","uk.eu.org","us.eu.org","eu-1.evennode.com","eu-2.evennode.com","eu-3.evennode.com","eu-4.evennode.com","us-1.evennode.com","us-2.evennode.com","us-3.evennode.com","us-4.evennode.com","twmail.cc","twmail.net","twmail.org","mymailer.com.tw","url.tw","apps.fbsbx.com","ru.net","adygeya.ru","bashkiria.ru","bir.ru","cbg.ru","com.ru","dagestan.ru","grozny.ru","kalmykia.ru","kustanai.ru","marine.ru","mordovia.ru","msk.ru","mytis.ru","nalchik.ru","nov.ru","pyatigorsk.ru","spb.ru","vladikavkaz.ru","vladimir.ru","abkhazia.su","adygeya.su","aktyubinsk.su","arkhangelsk.su","armenia.su","ashgabad.su","azerbaijan.su","balashov.su","bashkiria.su","bryansk.su","bukhara.su","chimkent.su","dagestan.su","east-kazakhstan.su","exnet.su","georgia.su","grozny.su","ivanovo.su","jambyl.su","kalmykia.su","kaluga.su","karacol.su","karaganda.su","karelia.su","khakassia.su","krasnodar.su","kurgan.su","kustanai.su","lenug.su","mangyshlak.su","mordovia.su","msk.su","murmansk.su","nalchik.su","navoi.su","north-kazakhstan.su","nov.su","obninsk.su","penza.su","pokrovsk.su","sochi.su","spb.su","tashkent.su","termez.su","togliatti.su","troitsk.su","tselinograd.su","tula.su","tuva.su","vladikavkaz.su","vladimir.su","vologda.su","channelsdvr.net","u.channelsdvr.net","fastly-terrarium.com","fastlylb.net","map.fastlylb.net","freetls.fastly.net","map.fastly.net","a.prod.fastly.net","global.prod.fastly.net","a.ssl.fastly.net","b.ssl.fastly.net","global.ssl.fastly.net","fastpanel.direct","fastvps-server.com","fhapp.xyz","fedorainfracloud.org","fedorapeople.org","cloud.fedoraproject.org","app.os.fedoraproject.org","app.os.stg.fedoraproject.org","mydobiss.com","filegear.me","filegear-au.me","filegear-de.me","filegear-gb.me","filegear-ie.me","filegear-jp.me","filegear-sg.me","firebaseapp.com","flynnhub.com","flynnhosting.net","0e.vc","freebox-os.com","freeboxos.com","fbx-os.fr","fbxos.fr","freebox-os.fr","freeboxos.fr","freedesktop.org","*.futurecms.at","*.ex.futurecms.at","*.in.futurecms.at","futurehosting.at","futuremailing.at","*.ex.ortsinfo.at","*.kunden.ortsinfo.at","*.statics.cloud","service.gov.uk","gehirn.ne.jp","usercontent.jp","gentapps.com","lab.ms","github.io","githubusercontent.com","gitlab.io","glitch.me","lolipop.io","cloudapps.digital","london.cloudapps.digital","homeoffice.gov.uk","ro.im","shop.ro","goip.de","run.app","a.run.app","web.app","*.0emm.com","appspot.com","*.r.appspot.com","blogspot.ae","blogspot.al","blogspot.am","blogspot.ba","blogspot.be","blogspot.bg","blogspot.bj","blogspot.ca","blogspot.cf","blogspot.ch","blogspot.cl","blogspot.co.at","blogspot.co.id","blogspot.co.il","blogspot.co.ke","blogspot.co.nz","blogspot.co.uk","blogspot.co.za","blogspot.com","blogspot.com.ar","blogspot.com.au","blogspot.com.br","blogspot.com.by","blogspot.com.co","blogspot.com.cy","blogspot.com.ee","blogspot.com.eg","blogspot.com.es","blogspot.com.mt","blogspot.com.ng","blogspot.com.tr","blogspot.com.uy","blogspot.cv","blogspot.cz","blogspot.de","blogspot.dk","blogspot.fi","blogspot.fr","blogspot.gr","blogspot.hk","blogspot.hr","blogspot.hu","blogspot.ie","blogspot.in","blogspot.is","blogspot.it","blogspot.jp","blogspot.kr","blogspot.li","blogspot.lt","blogspot.lu","blogspot.md","blogspot.mk","blogspot.mr","blogspot.mx","blogspot.my","blogspot.nl","blogspot.no","blogspot.pe","blogspot.pt","blogspot.qa","blogspot.re","blogspot.ro","blogspot.rs","blogspot.ru","blogspot.se","blogspot.sg","blogspot.si","blogspot.sk","blogspot.sn","blogspot.td","blogspot.tw","blogspot.ug","blogspot.vn","cloudfunctions.net","cloud.goog","codespot.com","googleapis.com","googlecode.com","pagespeedmobilizer.com","publishproxy.com","withgoogle.com","withyoutube.com","awsmppl.com","fin.ci","free.hr","caa.li","ua.rs","conf.se","hs.zone","hs.run","hashbang.sh","hasura.app","hasura-app.io","hepforge.org","herokuapp.com","herokussl.com","myravendb.com","ravendb.community","ravendb.me","development.run","ravendb.run","bpl.biz","orx.biz","ng.city","biz.gl","ng.ink","col.ng","firm.ng","gen.ng","ltd.ng","ngo.ng","ng.school","sch.so","häkkinen.fi","*.moonscale.io","moonscale.net","iki.fi","dyn-berlin.de","in-berlin.de","in-brb.de","in-butter.de","in-dsl.de","in-dsl.net","in-dsl.org","in-vpn.de","in-vpn.net","in-vpn.org","biz.at","info.at","info.cx","ac.leg.br","al.leg.br","am.leg.br","ap.leg.br","ba.leg.br","ce.leg.br","df.leg.br","es.leg.br","go.leg.br","ma.leg.br","mg.leg.br","ms.leg.br","mt.leg.br","pa.leg.br","pb.leg.br","pe.leg.br","pi.leg.br","pr.leg.br","rj.leg.br","rn.leg.br","ro.leg.br","rr.leg.br","rs.leg.br","sc.leg.br","se.leg.br","sp.leg.br","to.leg.br","pixolino.com","ipifony.net","mein-iserv.de","test-iserv.de","iserv.dev","iobb.net","myjino.ru","*.hosting.myjino.ru","*.landing.myjino.ru","*.spectrum.myjino.ru","*.vps.myjino.ru","*.triton.zone","*.cns.joyent.com","js.org","kaas.gg","khplay.nl","keymachine.de","kinghost.net","uni5.net","knightpoint.systems","oya.to","co.krd","edu.krd","git-repos.de","lcube-server.de","svn-repos.de","leadpages.co","lpages.co","lpusercontent.com","lelux.site","co.business","co.education","co.events","co.financial","co.network","co.place","co.technology","app.lmpm.com","linkitools.space","linkyard.cloud","linkyard-cloud.ch","members.linode.com","nodebalancer.linode.com","we.bs","loginline.app","loginline.dev","loginline.io","loginline.services","loginline.site","krasnik.pl","leczna.pl","lubartow.pl","lublin.pl","poniatowa.pl","swidnik.pl","uklugs.org","glug.org.uk","lug.org.uk","lugs.org.uk","barsy.bg","barsy.co.uk","barsyonline.co.uk","barsycenter.com","barsyonline.com","barsy.club","barsy.de","barsy.eu","barsy.in","barsy.info","barsy.io","barsy.me","barsy.menu","barsy.mobi","barsy.net","barsy.online","barsy.org","barsy.pro","barsy.pub","barsy.shop","barsy.site","barsy.support","barsy.uk","*.magentosite.cloud","mayfirst.info","mayfirst.org","hb.cldmail.ru","miniserver.com","memset.net","cloud.metacentrum.cz","custom.metacentrum.cz","flt.cloud.muni.cz","usr.cloud.muni.cz","meteorapp.com","eu.meteorapp.com","co.pl","azurecontainer.io","azurewebsites.net","azure-mobile.net","cloudapp.net","mozilla-iot.org","bmoattachments.org","net.ru","org.ru","pp.ru","ui.nabu.casa","pony.club","of.fashion","on.fashion","of.football","in.london","of.london","for.men","and.mom","for.mom","for.one","for.sale","of.work","to.work","nctu.me","bitballoon.com","netlify.com","4u.com","ngrok.io","nh-serv.co.uk","nfshost.com","dnsking.ch","mypi.co","n4t.co","001www.com","ddnslive.com","myiphost.com","forumz.info","16-b.it","32-b.it","64-b.it","soundcast.me","tcp4.me","dnsup.net","hicam.net","now-dns.net","ownip.net","vpndns.net","dynserv.org","now-dns.org","x443.pw","now-dns.top","ntdll.top","freeddns.us","crafting.xyz","zapto.xyz","nsupdate.info","nerdpol.ovh","blogsyte.com","brasilia.me","cable-modem.org","ciscofreak.com","collegefan.org","couchpotatofries.org","damnserver.com","ddns.me","ditchyourip.com","dnsfor.me","dnsiskinky.com","dvrcam.info","dynns.com","eating-organic.net","fantasyleague.cc","geekgalaxy.com","golffan.us","health-carereform.com","homesecuritymac.com","homesecuritypc.com","hopto.me","ilovecollege.info","loginto.me","mlbfan.org","mmafan.biz","myactivedirectory.com","mydissent.net","myeffect.net","mymediapc.net","mypsx.net","mysecuritycamera.com","mysecuritycamera.net","mysecuritycamera.org","net-freaks.com","nflfan.org","nhlfan.net","no-ip.ca","no-ip.co.uk","no-ip.net","noip.us","onthewifi.com","pgafan.net","point2this.com","pointto.us","privatizehealthinsurance.net","quicksytes.com","read-books.org","securitytactics.com","serveexchange.com","servehumour.com","servep2p.com","servesarcasm.com","stufftoread.com","ufcfan.org","unusualperson.com","workisboring.com","3utilities.com","bounceme.net","ddns.net","ddnsking.com","gotdns.ch","hopto.org","myftp.biz","myftp.org","myvnc.com","no-ip.biz","no-ip.info","no-ip.org","noip.me","redirectme.net","servebeer.com","serveblog.net","servecounterstrike.com","serveftp.com","servegame.com","servehalflife.com","servehttp.com","serveirc.com","serveminecraft.net","servemp3.com","servepics.com","servequake.com","sytes.net","webhop.me","zapto.org","stage.nodeart.io","nodum.co","nodum.io","pcloud.host","nyc.mn","nom.ae","nom.af","nom.ai","nom.al","nym.by","nom.bz","nym.bz","nom.cl","nym.ec","nom.gd","nom.ge","nom.gl","nym.gr","nom.gt","nym.gy","nym.hk","nom.hn","nym.ie","nom.im","nom.ke","nym.kz","nym.la","nym.lc","nom.li","nym.li","nym.lt","nym.lu","nom.lv","nym.me","nom.mk","nym.mn","nym.mx","nom.nu","nym.nz","nym.pe","nym.pt","nom.pw","nom.qa","nym.ro","nom.rs","nom.si","nym.sk","nom.st","nym.su","nym.sx","nom.tj","nym.tw","nom.ug","nom.uy","nom.vc","nom.vg","static.observableusercontent.com","cya.gg","cloudycluster.net","nid.io","opencraft.hosting","operaunite.com","skygearapp.com","outsystemscloud.com","ownprovider.com","own.pm","ox.rs","oy.lc","pgfog.com","pagefrontapp.com","art.pl","gliwice.pl","krakow.pl","poznan.pl","wroc.pl","zakopane.pl","pantheonsite.io","gotpantheon.com","mypep.link","perspecta.cloud","on-web.fr","*.platform.sh","*.platformsh.site","dyn53.io","co.bn","xen.prgmr.com","priv.at","prvcy.page","*.dweb.link","protonet.io","chirurgiens-dentistes-en-france.fr","byen.site","pubtls.org","qualifioapp.com","qbuser.com","instantcloud.cn","ras.ru","qa2.com","qcx.io","*.sys.qcx.io","dev-myqnapcloud.com","alpha-myqnapcloud.com","myqnapcloud.com","*.quipelements.com","vapor.cloud","vaporcloud.io","rackmaze.com","rackmaze.net","*.on-k3s.io","*.on-rancher.cloud","*.on-rio.io","readthedocs.io","rhcloud.com","app.render.com","onrender.com","repl.co","repl.run","resindevice.io","devices.resinstaging.io","hzc.io","wellbeingzone.eu","ptplus.fit","wellbeingzone.co.uk","git-pages.rit.edu","sandcats.io","logoip.de","logoip.com","schokokeks.net","gov.scot","scrysec.com","firewall-gateway.com","firewall-gateway.de","my-gateway.de","my-router.de","spdns.de","spdns.eu","firewall-gateway.net","my-firewall.org","myfirewall.org","spdns.org","senseering.net","biz.ua","co.ua","pp.ua","shiftedit.io","myshopblocks.com","shopitsite.com","mo-siemens.io","1kapp.com","appchizi.com","applinzi.com","sinaapp.com","vipsinaapp.com","siteleaf.net","bounty-full.com","alpha.bounty-full.com","beta.bounty-full.com","stackhero-network.com","static.land","dev.static.land","sites.static.land","apps.lair.io","*.stolos.io","spacekit.io","customer.speedpartner.de","api.stdlib.com","storj.farm","utwente.io","soc.srcf.net","user.srcf.net","temp-dns.com","applicationcloud.io","scapp.io","*.s5y.io","*.sensiosite.cloud","syncloud.it","diskstation.me","dscloud.biz","dscloud.me","dscloud.mobi","dsmynas.com","dsmynas.net","dsmynas.org","familyds.com","familyds.net","familyds.org","i234.me","myds.me","synology.me","vpnplus.to","direct.quickconnect.to","taifun-dns.de","gda.pl","gdansk.pl","gdynia.pl","med.pl","sopot.pl","edugit.org","telebit.app","telebit.io","*.telebit.xyz","gwiddle.co.uk","thingdustdata.com","cust.dev.thingdust.io","cust.disrec.thingdust.io","cust.prod.thingdust.io","cust.testing.thingdust.io","arvo.network","azimuth.network","bloxcms.com","townnews-staging.com","12hp.at","2ix.at","4lima.at","lima-city.at","12hp.ch","2ix.ch","4lima.ch","lima-city.ch","trafficplex.cloud","de.cool","12hp.de","2ix.de","4lima.de","lima-city.de","1337.pictures","clan.rip","lima-city.rocks","webspace.rocks","lima.zone","*.transurl.be","*.transurl.eu","*.transurl.nl","tuxfamily.org","dd-dns.de","diskstation.eu","diskstation.org","dray-dns.de","draydns.de","dyn-vpn.de","dynvpn.de","mein-vigor.de","my-vigor.de","my-wan.de","syno-ds.de","synology-diskstation.de","synology-ds.de","uber.space","*.uberspace.de","hk.com","hk.org","ltd.hk","inc.hk","virtualuser.de","virtual-user.de","urown.cloud","dnsupdate.info","lib.de.us","2038.io","router.management","v-info.info","voorloper.cloud","v.ua","wafflecell.com","*.webhare.dev","wedeploy.io","wedeploy.me","wedeploy.sh","remotewd.com","wmflabs.org","myforum.community","community-pro.de","diskussionsbereich.de","community-pro.net","meinforum.net","half.host","xnbay.com","u2.xnbay.com","u2-local.xnbay.com","cistron.nl","demon.nl","xs4all.space","yandexcloud.net","storage.yandexcloud.net","website.yandexcloud.net","official.academy","yolasite.com","ybo.faith","yombo.me","homelink.one","ybo.party","ybo.review","ybo.science","ybo.trade","nohost.me","noho.st","za.net","za.org","now.sh","bss.design","basicserver.io","virtualserver.io","enterprisecloud.nu"]'); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ loaded: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/node module decorator */ +/******/ (() => { +/******/ __nccwpck_require__.nmd = (module) => { +/******/ module.paths = []; +/******/ if (!module.children) module.children = []; +/******/ return module; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __nccwpck_require__(20034); +/******/ module.exports = __webpack_exports__; +/******/ +/******/ })() +; \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index ba4f6240..30b9c205 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1633,9 +1633,9 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" @@ -3073,21 +3073,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/gensync": { "version": "1.0.0-beta.1", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js index 35054aa6..616ff837 100644 --- a/node_modules/ansi-regex/index.js +++ b/node_modules/ansi-regex/index.js @@ -2,7 +2,7 @@ module.exports = ({onlyFirst = false} = {}) => { const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' ].join('|'); diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json index 7af801f3..017f5311 100644 --- a/node_modules/ansi-regex/package.json +++ b/node_modules/ansi-regex/package.json @@ -1,6 +1,6 @@ { "name": "ansi-regex", - "version": "5.0.0", + "version": "5.0.1", "description": "Regular expression for matching ANSI escape codes", "license": "MIT", "repository": "chalk/ansi-regex", diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md index 3c2b77c4..4d848bc3 100644 --- a/node_modules/ansi-regex/readme.md +++ b/node_modules/ansi-regex/readme.md @@ -1,4 +1,4 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) +# ansi-regex > Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) diff --git a/node_modules/fsevents/LICENSE b/node_modules/fsevents/LICENSE deleted file mode 100644 index 5d70441c..00000000 --- a/node_modules/fsevents/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License ------------ - -Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller - -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/fsevents/README.md b/node_modules/fsevents/README.md deleted file mode 100644 index afa1d309..00000000 --- a/node_modules/fsevents/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# fsevents [![NPM](https://nodei.co/npm/fsevents.png)](https://nodei.co/npm/fsevents/) - -Native access to MacOS FSEvents in [Node.js](https://nodejs.org/) - -The FSEvents API in MacOS allows applications to register for notifications of -changes to a given directory tree. It is a very fast and lightweight alternative -to kqueue. - -This is a low-level library. For a cross-platform file watching module that -uses fsevents, check out [Chokidar](https://github.com/paulmillr/chokidar). - -## Installation - -Supports only **Node.js v8.16 and higher**. - -```sh -npm install fsevents -``` - -## Usage - -```js -const fsevents = require('fsevents'); -const stop = fsevents.watch(__dirname, (path, flags, id) => { - const info = fsevents.getInfo(path, flags, id); -}); // To start observation -stop(); // To end observation -``` - -The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a -a change in the file system. It takes three arguments: - -###### `fsevents.watch(dirname: string, (path: string, flags: number, id: string) => void): () => Promise` - - * `path: string` - the item in the filesystem that have been changed - * `flags: number` - a numeric value describing what the change was - * `id: string` - an unique-id identifying this specific event - - Returns closer callback which when called returns a Promise resolving when the watcher process has been shut down. - -###### `fsevents.getInfo(path: string, flags: number, id: string): FsEventInfo` - -The `getInfo` function takes the `path`, `flags` and `id` arguments and converts those parameters into a structure -that is easier to digest to determine what the change was. - -The `FsEventsInfo` has the following shape: - -```js -/** - * @typedef {'created'|'modified'|'deleted'|'moved'|'root-changed'|'cloned'|'unknown'} FsEventsEvent - * @typedef {'file'|'directory'|'symlink'} FsEventsType - */ -{ - "event": "created", // {FsEventsEvent} - "path": "file.txt", - "type": "file", // {FsEventsType} - "changes": { - "inode": true, // Had iNode Meta-Information changed - "finder": false, // Had Finder Meta-Data changed - "access": false, // Had access permissions changed - "xattrs": false // Had xAttributes changed - }, - "flags": 0x100000000 -} -``` - -## Engine compatibility - -- v2 supports node 8.16+ -- v1.2.8 supports node 6+ -- v1.2.7 supports node 4+ - -## License - -The MIT License Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller — see LICENSE file. - -Visit our [GitHub page](https://github.com/fsevents/fsevents) and [NPM Page](https://npmjs.org/package/fsevents) diff --git a/node_modules/fsevents/fsevents.d.ts b/node_modules/fsevents/fsevents.d.ts deleted file mode 100644 index adbb28d3..00000000 --- a/node_modules/fsevents/fsevents.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -declare type Event = - | 'created' - | 'cloned' - | 'modified' - | 'deleted' - | 'moved' - | 'root-changed' - | 'unknown'; -declare type Type = 'file' | 'directory' | 'symlink'; -declare type FileChanges = { - inode: boolean; - finder: boolean; - access: boolean; - xattrs: boolean; -}; -declare type Info = { - event: Event; - path: string; - type: Type; - changes: FileChanges; - flags: number; -}; -declare type WatchHandler = (path: string, flags: number, id: string) => void; -export declare function watch( - path: string, - handler: WatchHandler, -): () => Promise; -export declare function getInfo(path: string, flags: number): Info; -export declare const constants: { - None: 0x00000000; - MustScanSubDirs: 0x00000001; - UserDropped: 0x00000002; - KernelDropped: 0x00000004; - EventIdsWrapped: 0x00000008; - HistoryDone: 0x00000010; - RootChanged: 0x00000020; - Mount: 0x00000040; - Unmount: 0x00000080; - ItemCreated: 0x00000100; - ItemRemoved: 0x00000200; - ItemInodeMetaMod: 0x00000400; - ItemRenamed: 0x00000800; - ItemModified: 0x00001000; - ItemFinderInfoMod: 0x00002000; - ItemChangeOwner: 0x00004000; - ItemXattrMod: 0x00008000; - ItemIsFile: 0x00010000; - ItemIsDir: 0x00020000; - ItemIsSymlink: 0x00040000; - ItemIsHardlink: 0x00100000; - ItemIsLastHardlink: 0x00200000; - OwnEvent: 0x00080000; - ItemCloned: 0x00400000; -}; -export {} diff --git a/node_modules/fsevents/fsevents.js b/node_modules/fsevents/fsevents.js deleted file mode 100644 index 8dae5d57..00000000 --- a/node_modules/fsevents/fsevents.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - ** © 2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller - ** Licensed under MIT License. - */ - -/* jshint node:true */ -'use strict'; - -if (process.platform !== 'darwin') { - throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`); -} - -const Native = require('./fsevents.node'); -const events = Native.constants; - -function watch(path, handler) { - if (typeof path !== 'string') { - throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`); - } - if (typeof handler !== 'function') { - throw new TypeError(`fsevents argument 2 must be a function and not a ${typeof handler}`); - } - - let instance = Native.start(path, handler); - if (!instance) throw new Error(`could not watch: ${path}`); - return () => { - const result = instance - ? Promise.resolve(instance).then(Native.stop) - : Promise.resolve(undefined); - instance = undefined; - return result; - }; -} - -function getInfo(path, flags) { - return { - path, - flags, - event: getEventType(flags), - type: getFileType(flags), - changes: getFileChanges(flags) - }; -} - -function getFileType(flags) { - if (events.ItemIsFile & flags) return 'file'; - if (events.ItemIsDir & flags) return 'directory'; - if (events.ItemIsSymlink & flags) return 'symlink'; -} -function anyIsTrue(obj) { - for (let key in obj) { - if (obj[key]) return true; - } - return false; -} -function getEventType(flags) { - if (events.ItemRemoved & flags) return 'deleted'; - if (events.ItemRenamed & flags) return 'moved'; - if (events.ItemCreated & flags) return 'created'; - if (events.ItemModified & flags) return 'modified'; - if (events.RootChanged & flags) return 'root-changed'; - if (events.ItemCloned & flags) return 'cloned'; - if (anyIsTrue(flags)) return 'modified'; - return 'unknown'; -} -function getFileChanges(flags) { - return { - inode: !!(events.ItemInodeMetaMod & flags), - finder: !!(events.ItemFinderInfoMod & flags), - access: !!(events.ItemChangeOwner & flags), - xattrs: !!(events.ItemXattrMod & flags) - }; -} - -exports.watch = watch; -exports.getInfo = getInfo; -exports.constants = events; diff --git a/node_modules/fsevents/fsevents.node b/node_modules/fsevents/fsevents.node deleted file mode 100755 index 8d952b5d..00000000 Binary files a/node_modules/fsevents/fsevents.node and /dev/null differ diff --git a/node_modules/fsevents/package.json b/node_modules/fsevents/package.json deleted file mode 100644 index 4b97a805..00000000 --- a/node_modules/fsevents/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "fsevents", - "version": "2.1.3", - "description": "Native Access to MacOS FSEvents", - "main": "fsevents.js", - "types": "fsevents.d.ts", - "os": [ - "darwin" - ], - "files": [ - "fsevents.d.ts", - "fsevents.js", - "fsevents.node" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - }, - "scripts": { - "clean": "node-gyp clean && rm -f fsevents.node", - "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean", - "test": "/bin/bash ./test.sh 2>/dev/null", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "https://github.com/fsevents/fsevents.git" - }, - "keywords": [ - "fsevents", - "mac" - ], - "contributors": [ - { - "name": "Philipp Dunkel", - "email": "pip@pipobscure.com" - }, - { - "name": "Ben Noordhuis", - "email": "info@bnoordhuis.nl" - }, - { - "name": "Elan Shankar", - "email": "elan.shanker@gmail.com" - }, - { - "name": "Miroslav Bajtoš", - "email": "mbajtoss@gmail.com" - }, - { - "name": "Paul Miller", - "url": "https://paulmillr.com" - } - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/fsevents/fsevents/issues" - }, - "homepage": "https://github.com/fsevents/fsevents", - "devDependencies": { - "node-gyp": "^6.1.0" - } -} diff --git a/package-lock.json b/package-lock.json index a2b0d177..78d10da5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1651,9 +1651,9 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" @@ -9509,9 +9509,9 @@ } }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": {